Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: pkgsrc/lang/python26

On Wed, 15 Aug 2012 13:54:54 -0400
Greg Troxel <> wrote:
>   Log Message:
>   as with python27: avoid POSIX semaphores on NetBSD, this is broken
>   at least on -current
> We've seen some flakiness that may be related to this (python26,
> netbsd-6 from late March, i386).  Does anyone understand what's wrong,
> and if any of the atf tests show it, and whether it's likely to be
> wrong on netbsd-6?

I've seen problems with ipython. It seems that there is something
in Python which closes all file descriptors >2 in a "for" loop,
probably in the course of an "exec". This made that following
accesses to semaphores failed.
Other problems were with xen - "xend" died from locking problems
on certain operations, in particular when I tried to start an
HVM domain.

The problem did probably start when libpthread started to use
"ksem" kernel semaphores which was after the netbsd-6 branch.
This means that netbsd-6 is likely not affected.

IMHO the whole design is fundamentally broken - a close(2) should
not affect semaphores. (And the other way, a sem_close(3) should
not be able to close file descriptors.) Another nonstandard
behavior is that the semaphores don't close-on-exec (but should,
according to POSIX). This is easily fixed - I did it locally, but
it didn't fix any of the problems observed.

best regards

Attachment: signature.asc
Description: PGP signature

Home | Main Index | Thread Index | Old Index