diff --git a/src/commands.py b/src/commands.py index 3d699c85e..f683f3fde 100644 --- a/src/commands.py +++ b/src/commands.py @@ -101,7 +101,17 @@ def process(f, *args, **kwargs): except Exception as e: raise e - q = multiprocessing.Queue() + try: + q = multiprocessing.Queue() + except OSError: + log.error('Using multiprocessing.Queue raised an OSError.\n' + 'This is probably caused by your system denying semaphore\n' + 'usage. You should run these two commands:\n' + '\tsudo rmdir /dev/shm\n' + '\tsudo ln -Tsf /{run,dev}/shm\n' + '(See https://github.com/travis-ci/travis-core/issues/187\n' + 'for more informations about this bug.)\n') + raise def newf(f, q, *args, **kwargs): if resource: rsrc = resource.RLIMIT_DATA