os_create_region: shmget (0x%x): %s
os_create_region: Shared memory segment %d is in the way
os_create_region: uninitialized shared memory descriptor
os_create_region: shmat (%d): %s
os_create_region: can't allocate %d bytes
This error may be caused by a hardware problem.
Adaptive Server uses the following functions to manage shared memory:
os_get_shmid – create a shared memory identifier.
os_create_region – create a region based on a shared memory identifier.
os_attach_region – attach to a region based on a shared memory identifier.
os_detach_region – detach from (and delete) the shared region.
os_format_shmid – format a shared memory identifier for printing.
When the os_create_region errors occur, Adaptive Server will not start.
The message texts shown here apply to UNIX systems only. Other operating systems raise slightly different errors.
This message is written to the error log when Adaptive Server fails to get a shared memory segment. In this message, <%x> is a shared memory key based on the shared memory identifier and <%s> is an operating system error message.
This error follows the shmget message and is also written to the Adaptive Server error log. A value of -1 for <%d> means the region does not exist.
During creation of a shared memory region, Adaptive Server attempts to validate the descriptor for the memory region. This message is written to the error log if the descriptor is found to be invalid.
This message is written to the error log when Adaptive Server fails to attach at an address. In this message, <%d> is the shared memory identifier and <%s> is an operating system error message.
Adaptive Server is unable to allocate the number of bytes it requested for the shared memory region.
At the operating system level, check which shared memory processes are using Adaptive Server, and whether any shared memory segments are being used by Adaptive Server.
On UNIX, run this command as the “sybase” user:
% ipcs -m
IPC status from workstation1 as of Fri May 26 14:08:25 2007 T ID KEY MODE OWNER GROUP Shared Memory: m 256 0x699b7e24 --rw------- sybase sybase m 257 0x699b7e25 --rw------- sybase sybase
If shared memory segments are being used by Adaptive Server, reboot the operating system to clear shared memory or remove them using the ipcrm operating system command.
Before removing the shared memory segments, identify the process that created them using the command ipcs -ma to ensure you only remove the appropriate segments.
Check the $SYBASE directory to determine whether there are any *.krg or *.srg files left from an abnormal Adaptive Server exit. If any such files exist, delete them.
os_create_region errors can occur when shared memory is not configured properly on your operating system. For information about configuring shared memory properly, refer to:
The Adaptive Server installation and configuration guide for your platform and version
System Administration Guide: Volume 2, Chapter 3, “Configuring Memory
The error message “os_create_region:
can't allocate %d bytes
” indicates
that one or more kernel parameters needs to be reset. Logically, resetting shm-max should
allow Adaptive Server to configure shared memory. However, other
operating system kernel parameters also affect allocation. Consult
your operating system documentation for details.
Refer to the operating system man pages for the shget() and shmat() system calls.
Refer to the operating system man pages for ipcs and ipcrm.