Jan 182010
 

The following  error on the Sybase ASE intalled on Sun Solaris can occur if the Maximum shared memory allocated is max’d out or if none is allocated, it takes the default value which is “Total Physical Memory /4”.

Backup Server: 4.142.2.58: [0] The ‘shmget’ call failed with error number 22 (Invalid argument). Refer to your operating system documentation for further details.

To confirm, if maximum shared memory has been manually set,

# projects -l

user.asetest
projid : 101
comment: “Sybase ASE”
users  : (none)
groups : (none)
attribs: project.max-shm-memory=(privileged,4294967296,deny)

For instance, here we have set the Maximum Shared memory to 4GB to the user account which owns and runs the Sybase ASE. And, the last line “attribs: project.max-shm-memory=(privileged,4294967296,deny)” basically, sets the maximum shared memory for the user processes to 4GB (4294967296).

This is equivalent to doing

# cat /etc/projects

If something similar doesn’t exist then the ASE is using the system defaults.

In any case, we need to increase the Maximum Shared memory. In our case increasing it to 7GB fixed the problem.

To add a new Project entry,

# projadd -p 101 -U asetest -c “Sybase ASE” -K “max-shm-memory=(privileged,7GB,deny)” user.asetest

This would create a new project with ID 101, name user.asetest for user asetest and set the Maximum Shared Memory to 7GB.

To modify an existing Project entry,

# projmod -sK “project.max-shm-memory=(privileged,7GB,deny)” user.asetest

This should help!

  One Response to “Error ‘shmget’ call failed with error number 22 (Invalid argument)”

  1. Actually you can also try

    ipcs -ma and verify that all of your data segments are actually current and that you dont have any expired processes holding open a segment. When we had this problem there were actually over 90 spinning processes because of failed backups that needed to be deleted.

    so after identifying the suspects just run ipcs -r segment# from the list

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)