From owner-freebsd-emulation@FreeBSD.ORG Sat Jan 22 09:14:48 2011 Return-Path: Delivered-To: emulation@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1233) id F03961065670; Sat, 22 Jan 2011 09:14:48 +0000 (UTC) Date: Sat, 22 Jan 2011 09:14:48 +0000 From: Alexander Best To: Andrew Pantyukhin Message-ID: <20110122091448.GA60450@freebsd.org> References: <269E4CF4-7C22-49CC-A263-D3F3E48F5E18@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <269E4CF4-7C22-49CC-A263-D3F3E48F5E18@FreeBSD.org> Cc: emulation@freebsd.org, zvqops Subject: Re: linux futex deadlock X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Jan 2011 09:14:49 -0000 On Thu Jan 20 11, Andrew Pantyukhin wrote: > Hello! > > I've stumbled upon an easily reproducible problem, seemingly somewhere around the linux_futex.c code. > > When genpuid (from port audio/linux-genpuid) is run in several copies simultaneously, all the processes but the very first one end up in states futex or nanslp. If a make linux futex calls a noop (commenting out a few body functions), the processes work fine in parallel. > > You can reproduce this way: > - install linux-genpuid > - get a few mp3's, say 1.mp3, 2.mp3, 3.mp3 > - run: > for i in 1 2 3;do > genpuid e4230822bede81ef71cde723db743e27 -xml -data -print rmd=2 $i.mp3 & > done > > Works fine under a recent ubuntu. > > Anyone interested to look at this? i haven't tried reproducing your example case, but i've also experienced the same problem with other applications, such as adobe's flash. right now i have about 10 instances of npviewer.bin stuck in the futex state. apparently this issue has been known for several years now. unfortunetaly nobody is able to do something about it. rdivacky@ is pretty much the only person working on the linux code, but he doesn't have time atm. i think the netbsd folks have been dealing with linux emulation, too. you might want to go through their commit log and see, if they fixed any futex related problems. the fixes (if they exist) should be portable to freebsd without any major adjustments. cheers. alex -- a13x