Possible bug in multiprocessing.Queue() on Ubuntu

J

Jerrad Genson

Hello,

While working with the multiprocessing module in Python 2.6.6 on
Ubuntu 10.10 64-bit, the following exception was raised:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.6/multiprocessing/__init__.py", line 213, in
Queue
return Queue(maxsize)
File "/usr/lib/python2.6/multiprocessing/queues.py", line 37, in
__init__
self._rlock = Lock()
File "/usr/lib/python2.6/multiprocessing/synchronize.py", line 117,
in __init__
SemLock.__init__(self, SEMAPHORE, 1, 1)
File "/usr/lib/python2.6/multiprocessing/synchronize.py", line 49,
in __init__
sl = self._semlock = _multiprocessing.SemLock(kind, value,
maxvalue)
OSError: [Errno 30] Read-only file system

The same exception was also raised in Python 3.1.2 on the same
platform:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python3.1/multiprocessing/__init__.py", line 212, in
Queue
return Queue(maxsize)
File "/usr/lib/python3.1/multiprocessing/queues.py", line 37, in
__init__
self._rlock = Lock()
File "/usr/lib/python3.1/multiprocessing/synchronize.py", line 121,
in __init__
SemLock.__init__(self, SEMAPHORE, 1, 1)
File "/usr/lib/python3.1/multiprocessing/synchronize.py", line 49,
in __init__
sl = self._semlock = _multiprocessing.SemLock(kind, value,
maxvalue)
OSError: [Errno 30] Read-only file system

This also occurs in Ubuntu 10.04 64-bit, but it works just fine in
Ubuntu 10.10 32-bit. Out of curiosity, I downloaded the latest version
of the Python 3.2a3+ source from the official Subversion repository,
configured it for debugging mode, compiled, and ran the same commands.
import multiprocessing [66271 refs]
input_queue = multiprocessing.Queue()
Traceback (most recent call last):
File "/home/jerrad/Development/py3k/Lib/multiprocessing/
synchronize.py", line 28, in <module>
from _multiprocessing import SemLock
ImportError: cannot import name SemLock

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/jerrad/Development/py3k/Lib/multiprocessing/
__init__.py", line 212, in Queue
from multiprocessing.queues import Queue
File "/home/jerrad/Development/py3k/Lib/multiprocessing/queues.py",
line 22, in <module>
from multiprocessing.synchronize import Lock, BoundedSemaphore,
Semaphore, Condition
File "/home/jerrad/Development/py3k/Lib/multiprocessing/
synchronize.py", line 33, in <module>
" function, see issue 3770.")
ImportError: This platform lacks a functioning sem_open
implementation, therefore, the required synchronization primitives
needed will not function, see issue 3770.
[69570 refs]

After checking issue 3770 in Roundup, it appears this is a known issue
for FreeBSD and OpenBSD, but not for Ubuntu (and it works fine in 32-
bit Ubuntu!). I just want to ensure I'm not doing something stupid
before I submit this to the issue tracker.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,763
Messages
2,569,563
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top