Troubleshooting
Problem
ASLR (Address Space Layout Randomization) is a feature that is enabled by default on most Linux distributions. It is designed to improve security by loading shared memory objects at random addresses instead of fixed addresses. In DB2, multiple processes attempt to map a shared memory object at the same address, which does not work reliably when ASLR is enabled, due to "address space conflicts".
Symptom
An "address space conflict" occurs when a process trying to attach a shared memory object to a specific fixed address fails because the current randomized address space layout conflicts with the specific fixed address being used. This is observed as a failure in the shmat subroutine.
FUNCTION: DB2 UDB, SQO Memory Management, sqlocshr, probe:180
MESSAGE : ZRC=0x850F0005=-2062614523=SQLO_NOSEG
"No Storage Available for allocation"
DIA8305C Memory allocation failure occurred.
CALLED : OS, -, shmat OSERR: EINVAL (22)
A subsequent attempt (which uses a new process) might have a different randomized address space layout, which might not conflict with the specific address being used, and might not see this failure.
Due to the random nature of the address space layout, these failures can occur randomly.
Various commands can encounter this problem, including db2pd, db2egcf, db2vend and db2fmp.
Due to the random nature of the address space layout, these failures can occur randomly.
Various commands can encounter this problem, including db2pd, db2egcf, db2vend and db2fmp.
The db2pd command (used for diagnostics) can print the following message:
Exceeded re-exec max count trying to attach to the database manager. This is likely due to ASLR currently being enabled on this system. Please retry the db2pd command.
The db2egcf process (used for HA monitoring) might incorrectly determine that the instance is down and initiate a failover.
The db2vend process (used for backup and log archiving) might fail with an error indicating a child process could not be started:
SQL2043N Unable to start a child process or thread.
The db2fmp process (used for fenced UDFs and stored procedures) might fail with an error:
$ db2 "SELECT T.RESULT FROM T1, TABLE(MYUDF(T1.C1)) AS T"
RESULT
------------------------
SQL0430N User defined function "MYUDF" (specific name "SQL123456789012345") has abnormally terminated. SQLSTATE=38503
[{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSEPGG","label":"Db2 for Linux, UNIX and Windows"},"Component":"Operating System \/ Hardware - Other OS\/Hardware","Platform":[{"code":"PF016","label":"Linux"}],"Version":"11.5;11.1;10.5;10.1;9.7;9.5","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]
Log InLog in to view more of this document
This document has the abstract of a technical article that is available to authorized users once you have logged on. Please use Log in button above to access the full document. After log in, if you do not have the right authorization for this document, there will be instructions on what to do next.
Was this topic helpful?
Document Information
Modified date:
30 April 2025
UID
swg21365583