• 1 reply
  • Latest Post - ‏2013-06-14T14:26:40Z by amccarl
73 Posts

Pinned topic Problems with Address Space Layout Randomization (ASLR)

‏2013-06-11T18:55:12Z |

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:


This is also covered by the technical article 1365583


  • amccarl
    73 Posts

    Re: Problems with Address Space Layout Randomization (ASLR)

    Hello!  We've had a number of clients respond through feedback to our technical documents indicating that they have further questions or comments that require additional dialogue.  Unfortunately, our feedback is anonymous, so unless an email address or other contact information is included, we have no way to get back in touch with you.
    Within DB2 support, the management team asked if we could somehow link our documents to the forums so that we could invite more discussion - like this!   As a start, we chose about 30 technical articles and "seeded" the forum with initial entries so that we could have a starting place for conversation.  The documents have now been updated with links to the forums as well.  
    Hopefully, we will make DB2 support better by providing more interaction around our technical information!