mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Randy.Dunlap" <rdunlap@xenotime.net>
To: Esben Nielsen <simlo@phys.au.dk>
Cc: dsingleton@mvista.com, robustmutexes@lists.osdl.org,
	linux-kernel@vger.kernel.org, mingo@elte.hu
Subject: Re: robust futex heap support patch
Date: Tue, 6 Dec 2005 17:23:53 -0800	[thread overview]
Message-ID: <20051206172353.79758246.rdunlap@xenotime.net> (raw)
In-Reply-To: <Pine.OSF.4.05.10512061404140.23158-100000@da410.phys.au.dk>

On Tue, 6 Dec 2005 15:06:12 +0100 (MET) Esben Nielsen wrote:

> On Mon, 5 Dec 2005, david singleton wrote:
> 
> > 
> > On Dec 5, 2005, at 2:30 PM, Esben Nielsen wrote:
> > 
> > I'm currently trying to close a race condition between futex_wait_robust
> > and futex_wake_robust that Dave Carlson is seeing on his SMP system.
> > 
> > The scenario is as follows:
> > 
> > Thread A locks an pthread_mutex via the fast path and does not enter 
> > the kernel.
> > 
> > Thread B tries to lock the lock and sees it is already locked.  Thread 
> > B sets the
> > waiters flag in the lock and enters the kernel to lock the lock on 
> > behalf of
> > thread A and then block on the mutex waiting for it's release.
> > 
> > Thread A unlocks the lock and sees the waiters flag set.  Thread A gets
> > to the futex_wake_robust before Thread B can get to futex_wait_robust.
> > 
> > Thread A sees that it does not own the lock in the kernel and was 
> > returning EINVAL.
> > 
> > patch-2.6.14-rt21-rf8 was a preliminary patch for Dave Carlson to try 
> > and get more information about
> > the race condition.   ( rf8 and rf9 are still returning EAGAIN from 
> > thread B trying to
> > do the futex_wait_robust and the library should be retrying with 
> > EAGAIN, but it currently isn't).
> > 
> 
> *nod*
> I just pointed out that you can't make thread A loop the way you do.
> 
> What I would do was to do the user space flag checks while having the
> raw spinlock of the rt_mutex. That way you are sure that stuff in the
> kernel is serialized. But I don't know what to do exactly to do in
> there....
> 
> 
> > When I get the race condition closed I'll post the patch and notify 
> > everyone on lkml
> > and the robustmutexes mailing lists.
> 
> Where can I sign up to that mailing list? I would like to follow the
> development, although I don't have much time to contibute.

http://lists.osdl.org/mailman/listinfo/robustmutexes/


---
~Randy

      parent reply	other threads:[~2005-12-07  1:23 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-26  7:42 david singleton
2005-11-26 13:31 ` Ingo Molnar
2005-11-26 20:51   ` david singleton
2005-12-05 22:30 ` Esben Nielsen
2005-12-06  4:51   ` david singleton
2005-12-06 14:06     ` Esben Nielsen
2005-12-06 15:23       ` david singleton
2005-12-07  1:23       ` Randy.Dunlap [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20051206172353.79758246.rdunlap@xenotime.net \
    --to=rdunlap@xenotime.net \
    --cc=dsingleton@mvista.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=robustmutexes@lists.osdl.org \
    --cc=simlo@phys.au.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®