Bug 47499

Informational

GemStone/S 64 Bit

3.7.1, 3.7, 3.6.8, 3.6.7, 3.6.6, 3.6.5, 3.6.4, 3.6.3, 3.6.2, 3.6.1, 3.6, 3.5.8, 3.5.7, 3.5.6, 3.5.5, 3.5.4, 3.5.3, 3.5.2, 3.5.1, 3.5, 3.4.5, 3.4.4, 3.4.3, 3.4.2, 3.4.1, 3.4, 3.3.9, 3.3.8, 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.1, 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.0.6, 3.1.0.5, 3.1.x, 3.0.1, 3.0, 2.4.8, 2.4.7, 2.4.6, 2.4.5.1, 2.4.5, 2.4.4.8, 2.4.4.7, 2.4.4.4, 2.4.x, 2.3.1.6, 2.3.x, 2.2.5.4, 2.2.x, earlier versions

Linux using systemd

Linux configuration needed to avoid Stone crash with semaphore problem

Customers running Linux 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 systemd is configured to automatically delete any semaphore arrays created by a unix session when that session logs out. So a 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:

   [Login]
   #NAutoVTs=6
   #ReserveVT=6
   #KillUserProcesses=no
   . . .
   #IdleAction=ignore
   #IdleActionSec=30min
   #RuntimeDirectorySize=10%
   RemoveIPC=no
   #UserTasksMax=12288

Workaround

Update /etc/systemd/logind.conf to ensure RemoveIPC is set to no.


                

Last updated: 8/18/23