Re: multiprocessing.queues.Queue does not work in pbuilder?
Hello,
On 29 January 2015 at 09:01, Ole Streicher <olebole@debian.org> wrote:
> Hi,
>
> I am trying to get the release candidate for python-astropy
> packaged. The packaging includes a number of tests, where many fail in
> pbuilder, which can be traced back to:
>
> $ sudo pbuilder login
> # apt-get install python
> # python
> Python 2.7.9 (default, Dec 11 2014, 08:58:12)
> [GCC 4.9.2] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
>>>> from multiprocessing.queues import Queue
>>>> q = Queue(8)
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> File "/usr/lib/python2.7/multiprocessing/queues.py", line 63, in __init__
> self._rlock = Lock()
> File "/usr/lib/python2.7/multiprocessing/synchronize.py", line 147, in __init__
> SemLock.__init__(self, SEMAPHORE, 1, 1)
> File "/usr/lib/python2.7/multiprocessing/synchronize.py", line 75, in __init__
> sl = self._semlock = _multiprocessing.SemLock(kind, value, maxvalue)
> OSError: [Errno 38] Function not implemented
>
> The cause for this seems to be that /run/user is not mounted; if I mount
> manually, it works fine:
>
> # mkdir /run/user
> # mount none /run/user -t tmpfs
> # python
> Python 2.7.9 (default, Dec 11 2014, 08:58:12)
> [GCC 4.9.2] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
>>>> from multiprocessing.queues import Queue
>>>> q = Queue(8)
>>>>
>
> However, how can/should I do this in debian/rules?
/run/user is XDG_RUNTIME_DIR type of stuff, which shouldn't be needed
during normal builds.
In your case i think you need /dev/shm. I'm not quite sure why
pbuilder is not providing it, but the Debian standard build
environment - sbuild, does provide it out of the box:
$ mk-sbuild sid
$ sbuild -A -d sid *.dsc
I have tested your example as:
$ schroot -u root -c sid-amd64
And it works fine without /run/user, with /dev/shm available (the
default chroot had it).
(mk-sbuild is available from Debian package ubuntu-dev-tools and may
install additional things on first chroot setup)
Another alternative is to do source only upload, and it should build
fine on the distribution buildd network.
--
Regards,
Dimitri.
Reply to: