From owner-freebsd-bugs@FreeBSD.ORG Thu Mar 12 09:10:03 2009 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6DBC51065672 for ; Thu, 12 Mar 2009 09:10:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 5BE4A8FC21 for ; Thu, 12 Mar 2009 09:10:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n2C9A3bZ010480 for ; Thu, 12 Mar 2009 09:10:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n2C9A3ne010479; Thu, 12 Mar 2009 09:10:03 GMT (envelope-from gnats) Date: Thu, 12 Mar 2009 09:10:03 GMT Message-Id: <200903120910.n2C9A3ne010479@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Bruce Simpson Cc: Subject: Re: kern/127545: [sysvipc] POSIX (1003.1b) semaphores can become negative X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Bruce Simpson List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Mar 2009 09:10:03 -0000 The following reply was made to PR kern/127545; it has been noted by GNATS. From: Bruce Simpson To: freebsd-gnats-submit@freebsd.org Cc: Subject: Re: kern/127545: [sysvipc] POSIX (1003.1b) semaphores can become negative Date: Thu, 12 Mar 2009 08:51:57 +0000 I just managed to reproduce this on RELENG_7, and I clearly see the semaphore value becoming negative. I am attempting to track down why Python multiprocessing doesn't work. It looks like it's related to how Python processes hang on FreeBSD when a thread forks a new process. On the other hand, multiprocessing does use POSIX semaphores for synchronization; the Python interpreter's use of this itself is optional, and it tries to emulate it with condition variables and mutexes. jhb@ recently merged some cleanups however they don't have much to do with the issue here, they just make the implementation cleaner.