Article ID: 123064, created on Oct 4, 2014, last review on Oct 4, 2014

  • Applies to:
  • Virtuozzo
  • Virtuozzo containers for Linux
  • Virtual Automation

Symptoms

  1. Power Panel cannot be started
  2. Similar messages can be found in /var/log/pva/pp/cpcon.log log:

    11/06/2014 05:03:43.7887700 [12949] : bool InitializeCriticalSection() at XDocCache.cpp:923 : failed to init semaphores for cache: No space left on device.
    11/06/2014 05:04:35.8897860 [14761] : bool InitializeCriticalSection() at XDocCache.cpp:923 : failed to init semaphores for cache: No space left on device.
    
  3. Similar errors can be found in /var/log/messages:

    Server Administrator (Shared Library): Data Engine EventID: 0  A semaphore set has to be created but the system limit for the maximum number of semaphore sets has been exceeded
    

Cause

The number of semaphore arrays has reached the maximum configured limit:

# ipcs -s | grep ^0 | wc -l
128
# ipcs -ls

------ Semaphore Limits --------
max number of arrays = 128
max semaphores per array = 250
max semaphores system wide = 32000
max ops per semop call = 32
semaphore max value = 32767

Resolution

Run "ipcs -s" to list all of the semaphores currently allocated on the system and then use "ipcrm -s <semid>" to remove the semaphore if it is no longer needed.

To make sure there are no leaks, "ipcs -s -i <semid>" command can be used to track down the program that created the semaphore. Usually most leaks come from programs that were interrupted (e.g by segfaults) before they could run their cleanup code.

If the system really needs all of the semaphores currently allocated, it is possible to increase the number of semaphores available. Run "sysctl -a | grep kernel.sem" to check what the current settings are:

 # sysctl -a | grep kernel.sem
kernel.sem = 250        32000   32      128

The last value is the number of semaphores available on the system (normally 128).

  • Copy the whole line into /etc/sysctl.conf,
  • Change the last value to a larger value,
  • Save the changes,
  • Execute "sysctl -p" command to load the new settings.

Search Words

failed to init semaphores for cache: No space left on device

Server Administrator (Shared Library): Data Engine EventID: 0 A semaphore set has to be created but the system limit for the maximum number of semaphore sets has been exceeded

failed to init semaphores for cache

XDocCache.cpp:923

A semaphore set has to be created but the system limit for the maximum number of semaphore sets has been exceeded

bool InitializeCriticalSection() at XDocCache.cpp:923

d02f9caf3e11b191a38179103495106f 2897d76d56d2010f4e3a28f864d69223 e8e50b42231236b82df27684e7ec0beb 319940068c5fa20655215d590b7be29b 0dd5b9380c7d4884d77587f3eb0fa8ef

Email subscription for changes to this article
Save as PDF