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/salomeContext.py", 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/salomeContext.py", line 316, in _runAppli
runSalome.runSalome()
File "/home/centos/SALOME-8.2.0-CO7.2/BINARIES-CO7.2/KERNEL/bin/salome/runSalome.py", line 843, in runSalome
clt,args = main()
File "/home/centos/SALOME-8.2.0-CO7.2/BINARIES-CO7.2/KERNEL/bin/salome/runSalome.py", 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/searchFreePort.py", line 117, in searchFreePort
queue = Queue()
File "/home/centos/SALOME-8.2.0-CO7.2/BINARIES-CO7.2/Python/lib/python2.7/multiprocessing/__init__.py", line 218, in Queue
return Queue(maxsize)
File "/home/centos/SALOME-8.2.0-CO7.2/BINARIES-CO7.2/Python/lib/python2.7/multiprocessing/queues.py", line 63, in __init__
self._rlock = Lock()
File "/home/centos/SALOME-8.2.0-CO7.2/BINARIES-CO7.2/Python/lib/python2.7/multiprocessing/synchronize.py", 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/synchronize.py", 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