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.
Was this topic helpful?
Document Information
Modified date:
16 June 2018
UID
swg21153194