ASLR or Address Space Layout Randomization is a feature that is activated by default on some of the newer linux distributions. It is designed to load shared memory objects in random addresses.
In DB2, multiple processes map a shared memory object at the same address across the processes. In versions prior to 10.1, it was found that DB2 cannot guarantee the availability of address for the shared memory object when ASLR is turned on.
When this problem is suspected, check db2diag.log for the shmat failure like the following. Note that the same error message can also occur for a different cause. Hence, it's important to note the process that reported this error.
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)
To resolve the problem:
1) Disable ASLR temporarily (change is only effective until next boot):
Run "sysctl -w kernel.randomize_va_space=0" as root.
2) Disable ASLR immediately and on all subsequent reboots:
Add the following line to /etc/sysctl.conf:
and then run "sysctl -p" as root to make the change take effect immediately.
Note that you may find more information about sysctl -p at: http://pic.dhe.ibm.com/infocenter/db2luw/v9r7/topic/com.ibm.db2.luw.qb.server.doc/doc/t0008238.html