Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 22 Jan 2011 16:37:14 +0300
From:      Andrew Pantyukhin <infofarmer@FreeBSD.org>
To:        Alexander Best <arundel@freebsd.org>
Cc:        emulation@freebsd.org, zvqops <zvqops@dreamindustries.ru>, kib@FreeBSD.org, dchagin@FreeBSD.org
Subject:   Re: linux futex deadlock
Message-ID:  <20110122133714.GA1469@vocha.office.zvq.me>
In-Reply-To: <20110122091448.GA60450@freebsd.org>
References:  <269E4CF4-7C22-49CC-A263-D3F3E48F5E18@FreeBSD.org> <20110122091448.GA60450@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Jan 22, 2011 at 09:14:48AM +0000, Alexander Best wrote:
> On Thu Jan 20 11, Andrew Pantyukhin wrote:
> > I've stumbled upon an easily reproducible problem, seemingly
> > somewhere around the linux_futex.c code.
> 
> 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.

Okay, it looks like there's a fix for this in NetBSD:
http://mail-index.netbsd.org/tech-kern/2008/06/06/msg001587.html
http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/compat/linux/common/linux_futex.c.diff?r1=1.14&r2=1.15&only_with_tag=MAIN

However, Dmitry Chagin (cc'ed with kib, who reviewed the patch) has
since reworked the futexes into something more fine-grained:
http://svn.freebsd.org/viewvc/base/head/sys/compat/linux/linux_futex.c?r1=191269&r2=191719

So porting the fix, even if it's correct, is not perfectly
straightforward.

Dmitry, do you think you might have time to look at it? Please check
this thread for an easy way to reproduce the problem.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110122133714.GA1469>