IBM Support

ENOMEM error during logical recovery

Troubleshooting


Problem

The error 'shmat: [ENOMEM][12]' is not always an operating system problem.

Symptom

When you try to start the database server it fails to go online and you find error messages in the message log similar to:

12:44:24  Physical Recovery Started.
12:44:25  Physical Recovery Complete: 324 Pages Restored.
12:44:25  Logical Recovery Started.
12:44:51  Rollforward of log record failed. iserrno = 126
12:44:52  shmat: [ENOMEM][12]: out of available data
space,check system MAXMEM
12:44:52  out of virtual shared memory

Note: The time stamps of the errors may be different than those shown.

Cause

ENOMEM is an operating system error that occurs when a process requests memory but there is not enough available. Your system might not have enough available memory. However, if you are sure that you have enough memory, it is possible the logical log record could be corrupted. If the database server recently exited without shutting down properly, logical log corruption is likely.

Follow these steps to determine if the logical logs are causing the problem:


1. Edit the value of the SHMTOTAL parameter in the ONCONFIG configuration file to be the same as the SHMVIRTSIZE parameter in the ONCONFIG file.

2. Stop and restart the database server. You will see an error similar to this in the message log:


13:13:43  Size of resident + virtual segments 11920KB +
10009640KB > 20000KB
13:13:43  total allowed by configuration parameter SHMTOTAL
13:13:43  out of virtual shared memory

3. Look at the sizes of the resident and virtual segments listed in the error. Compare the value of virtual segment size listed in the error with the value of the SHMVIRTSIZE parameters in the ONCONFIG file. If the virtual segment size listed in the error is larger than the SHMVIRTSIZE value then the logical log is corrupted. Similarly, compare the value of resident segment size listed in the error with the value of “Resident Shared Memory size” in onmonitor -> Parameters -> Shared-Memory. If the resident segment size listed in the error is larger, the logical log is corrupted.

In the error output in step 2, the database server is trying to allocate an amount of memory for the virtual segment that is more than the setting of the SHMVIRTSIZE parameter, indicating logical log corruption.

Resolving The Problem

Contact your local IBM technical support office for advice on how to proceed.

[{"Product":{"code":"SSGU8G","label":"Informix Servers"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"--","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF025","label":"Platform Independent"},{"code":"PF008","label":"DYNIX\/ptx"},{"code":"PF010","label":"HP-UX"},{"code":"PF015","label":"IRIX"},{"code":"PF016","label":"Linux"},{"code":"PF026","label":"Reliant UNIX"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"7.2;7.3;9.2;9.3;9.4;10.0","Edition":"","Line of Business":{"code":"","label":""}},{"Product":{"code":"SSGU5D","label":"Informix Extended Parallel Server"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"Not Applicable","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All Versions","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
16 June 2018

UID

swg21153194