Bug 47499


GemStone/S 64 Bit

3.4.2, 3.4.1, 3.4, 3.3.7, 3.3.6, 3.3.5, 3.3.4, 3.3.3, 3.3.2, 3.3.1, 3.3, 3.2.17, 3.2.16, 3.2.15, 3.2.14, 3.2.13, 3.2.12, 3.2.11, 3.2.10, 3.2.9,, 3.2.8, 3.2.7, 3.2.6, 3.2.5, 3.2.4, 3.2.3, 3.2.2, 3.2.1, 3.2,,,,,,, 3.1, 3.0.1, 3.0, 2.4.8, 2.4.7, 2.4.6,, 2.4.5,,,, 2.4.x,, 2.3.x,, 2.2.x, 2.x, 1.x

Linux using systemd

Stone crashes with semaphore problems on Linux / systemd

Customers running Linux using the systemd software suite may be subject to GemStone system crashes caused when the semaphore array used by GemStone for interprocess communication is prematurely deleted.  The actual errors will vary according to which GemStone process accesses the semaphore array first, but can include:

In the stone log:

   ERROR:Semaphore failure errno 43 (stnSemIdx = 240)
   SHUTDOWN command was generated by Stone failed in goToSleep, semaphore failed.
   [followed by normal stone shutdown messages]

In a gem log:

   Shared memory SemClear idx 240 failure:  for lock: noLock
   [followed by catastrophic error handling messages from HostCallDebugger]

During the subsequent system shutdown, the following error will appear in the SPC monitor log as it attempts to remove the already-deleted semaphore array:

   | semctl(131072, 0, IPC_RMID, ...) failed with errno=22,EINVAL, Invalid argument
   | (programmer error)                                                          |
   |  Gemstone could not destroy the array of semaphores.


This problem occurs because the systemd suite is configured to automatically delete any semaphore arrays created by a unix session when that session logs out.  So any stone started by that unix session will crash when it logs out.

To disable this mechanism, modify the systemd logind.conf file to set RemoveIPC under [Login] to 'no' (note that the default setting is 'yes'):

From /etc/systemd/logind.conf:

   . . .


Reconfigure systemd as described earlier.

Last updated: 6/27/18