Running ccmdb check results in "shmat: [22]: operating system error"

Technote (troubleshooting)


Problem(Abstract)

Attempts to run the ccmdb check on IBM Rational Synergy Database results in the error "shmat: [22]: operating system".

Symptom

Informix logs shows a message similar to the following:

Contiguous shared memory segment allocation failed at 0x4c23f000.
Check SHMBASE is consistent with the value in $INFORMIXDIR/etc/onconfig.std
shmat: [22]: operating system error
Client could not attach server shared memory segment, use IFX_XFER_SHMBASE.

Cause

As the server runs, ccmdb is attempting to grab segments of shared memory multiple times, and getting an OS failure when there is not enough available.

Diagnosing the problem

Check the output for onstat -g seg:


Segment Summary:
id              key            addr         size           ovhd     class  blkused   blkfree
2195458    52574801   44000000 366460928  2370476  R     89465    3
2228228    52574802   59d7c000 157286400  922760   V     16824    21576
2260997    52574803   6337c000 544768     4160     M     133      0
2293766    52574804   63401000 544768     4160     M     133      0
2326535    52574805   63486000 544768     4160     M     133      0
2359304    52574806   6350b000 544768     4160     M     133      0
2392073    52574807   63590000 544768     4160     M     133      0
2424842    52574808   63615000 544768     4160     M     133      0
2490380    52574809   6369a000 78880768   463328   V     114      19144
2818062    5257480a   681d4000 78880768   463328   V     114      19144
Total:     -          -        684777472  -        -     107315   59867


The goal would be to have the one resident segment (R) and one virtual memory segment (V), the message segments are okay (M)


Resolving the problem

The solution is to have Informix grab a larger amount of shared memory when coming online and also increasing the additional amount it will grab if needed.


This will result in a single resident segment and one virtual segment.

Increasing the parameters below will reduce the number of times (hopefully to zero or one) that Informix needs to increase its memory footprint.

As user informix edit the onconfig file withe the below mentioned values:

Procedure:

  1. Navigate to the following directory:

    $CCM_HOME/informix/etc/file

  2. Make a backup copy of the onconfig file

  3. Open the onconfig file

  4. Edit the file and make changes to the following lines:

    Before:
      SHMBASE 0x44000000L
    After:  SHMBASE 0x40000000L -->(To allow for a contiguous allocation, as the current address was causing the allotment to interfere with other shared memory used by the system.)

    Before: SHMVIRTSIZE 32656
    After: SHMVIRTSIZE 90000 -->(32656 + 8192*6 + one extra segment of 8192)

    Before: SHMADD 8192
    After: SHMADD 16384 --> (twice the size from 8192)

  5. Save the file

  6. Restart the Informix server

Related information

Allocate large memory space for Informix shared mem
How to optimize Informix shared memory

Rate this page:

(0 users)Average rating

Document information


More support for:

Rational Synergy
Informix Dyn Srvr V10.0 for Synergy

Software version:

7.1

Operating system(s):

Linux

Reference #:

1639635

Modified date:

2013-06-21

Translate my page

Machine Translation

Content navigation