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.
Note that processes running as the root user, and system users (defined as unix users with uids < 1000) are not subject to this issue.
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
Update /etc/systemd/logind.conf to ensure RemoveIPC is set to no.
Last updated: 10/11/24