Cannot import name SemLock in Lucid

Bug #556477 reported by David Coconut
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python3.1 (Ubuntu)
Fix Released
High
Unassigned

Bug Description

Binary package hint: python3.1

Ubuntu 10.04 Lucid Lynx Beta 2, AMD-64
Linux kernel 2.6.32.19-generic

Ubuntu 10.04 Lucid Lynx Beta 2, x86
Linux kernel 2.6.32.16-generic

Latest version of Python 3.1.2 in Lucid repositories on both systems.

When using the multiprocessing module, the below error is returned, specifically when trying to create a new JoinableQueue. This should not happen.

Created a Python bug report but initial responses indicate this may be a problem with Lucid's packaging. The code worked flawlessly on Karmic Koala.

----

Traceback (most recent call last):

File "/usr/lib/python3.1/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 "main.py", line 16, in <module>
q = JoinableQueue()

File "/usr/lib/python3.1/multiprocessing/__init__.py", line 218, in JoinableQueue from multiprocessing.queues import JoinableQueue
File "/usr/lib/python3.1/multiprocessing/queues.py", line 22, in <module> from multiprocessing.synchronize import Lock, BoundedSemaphore, Semaphore, Condition
File "/usr/lib/python3.1/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.

Related branches

David Coconut (coconut)
summary: - Cannot import name SemLock
+ Cannot import name SemLock in Lucid
Changed in python3.1 (Ubuntu):
status: New → Confirmed
Revision history for this message
Matthias Klose (doko) wrote :

these tests fail on the buildds ...

checking whether POSIX semaphores are enabled... no
checking for broken sem_getvalue... yes

#include <unistd.h>
#include <fcntl.h>
#include <stdio.h>
#include <semaphore.h>
#include <sys/stat.h>

int main(void) {
  sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
  if (a == SEM_FAILED) {
    perror("sem_open");
    return 1;
  }
  sem_close(a);
  sem_unlink("/autoconf");
  return 0;
}

Revision history for this message
Matthias Klose (doko) wrote :

sem_open: Function not implemented
1
$ uname -a
Linux ronne 2.6.24-25-server #1 SMP Tue Oct 20 07:20:02 UTC 2009 i686 GNU/Linux

the buildds are running hardy kernels

Revision history for this message
Matthias Klose (doko) wrote :

caused by introducing a configure check in 3.1.2, regression compared to karmic. will work around it

Changed in python3.1 (Ubuntu):
importance: Undecided → High
milestone: none → ubuntu-10.04
status: Confirmed → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package python3.1 - 3.1.2-0ubuntu2

---------------
python3.1 (3.1.2-0ubuntu2) lucid; urgency=low

  * Overwrite the sem_open autoconf check, depending on a newer
    kernel version not available on the buildd. LP: #556477.
  * debian/patches/issue8032.dpatch: Update to version from the
    trunk. Upload for beta2 to avoid apport errors.
    - Handle PyFrameObject's: LP: #543624, #548723.
    - Detect cycles in object reference graph and add extra
      protection: LP: #544823, LP: #552356.
 -- Matthias Klose <email address hidden> Wed, 14 Apr 2010 23:54:59 +0200

Changed in python3.1 (Ubuntu):
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.