Salome OSError: [Errno 13] Permission denied

I recently came across an error with Salome on CentOS7 running on an Amazon Webservice instances which dumped a mysterious “OSError: [Errno 13] Permission denied”, with the full stack trace looking like:

runSalome running on ip-address-hidden.compute.internal
ERROR:salomeContext:Unexpected error:
Traceback (most recent call last):
File "/home/centos/SALOME-8.2.0-CO7.2/BINARIES-CO7.2/SALOME/bin/salome/", line 257, in _startSalome
res = getattr(self, command)(options) # run appropriate method
File "/home/centos/SALOME-8.2.0-CO7.2/BINARIES-CO7.2/SALOME/bin/salome/", line 316, in _runAppli
File "/home/centos/SALOME-8.2.0-CO7.2/BINARIES-CO7.2/KERNEL/bin/salome/", line 843, in runSalome
clt,args = main()
File "/home/centos/SALOME-8.2.0-CO7.2/BINARIES-CO7.2/KERNEL/bin/salome/", line 770, in main
searchFreePort(args, save_config, args.get('useport'))
File "/home/centos/SALOME-8.2.0-CO7.2/BINARIES-CO7.2/KERNEL/bin/salome/", line 117, in searchFreePort
queue = Queue()
File "/home/centos/SALOME-8.2.0-CO7.2/BINARIES-CO7.2/Python/lib/python2.7/multiprocessing/", line 218, in Queue
return Queue(maxsize)
File "/home/centos/SALOME-8.2.0-CO7.2/BINARIES-CO7.2/Python/lib/python2.7/multiprocessing/", line 63, in __init__
self._rlock = Lock()
File "/home/centos/SALOME-8.2.0-CO7.2/BINARIES-CO7.2/Python/lib/python2.7/multiprocessing/", line 147, in __init__
SemLock.__init__(self, SEMAPHORE, 1, 1)
File "/home/centos/SALOME-8.2.0-CO7.2/BINARIES-CO7.2/Python/lib/python2.7/multiprocessing/", line 75, in __init__
sl = self._semlock = _multiprocessing.SemLock(kind, value, maxvalue)
OSError: [Errno 13] Permission denied

I’m still not sure what caused the error but I’d made two changes to the AMI before I noticed this:

  1. Updated CentOS7 to the latest patch release via yum
  2. Changed the AMI to a lower spec with less RAM

I suspect the second was what caused the problem but it turns out that Salome needs access to the shared RAM facility.  My temporary fix is:

sudo chmod 777 /dev/shm

I’d like to find a better long term fix through.

Site Footer