os_create_region errors

Message text

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

NoteThis error may be caused by a hardware problem.

Explanation

Adaptive Server uses the following functions to manage shared memory:

When the os_create_region errors occur, Adaptive Server will not start.

NoteThe message texts shown here apply to UNIX systems only. Other operating systems raise slightly different errors.


os_create_region: shmget (0x<%x>): <%s>

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.


os_create_region: Shared memory segment <%d> is in the way

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.


os_create_region: Uninitialized shared memory descriptor

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.


os_create_region: shmat (<%d>): <%s>

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.


os_create_region: Can't allocate <%d> bytes

Adaptive Server is unable to allocate the number of bytes it requested for the shared memory region.

Action

  1. 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.

    NoteBefore removing the shared memory segments, identify the process that created them using the command ipcs -ma to ensure you only remove the appropriate segments.

  2. 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:


Shared memory error on Digital Unix

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.

Additional information