public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug nptl/11588] New: pthread condvars are not priority inheritance aware
@ 2010-05-11 18:46 dvhltc at us dot ibm dot com
  2010-05-11 18:48 ` [Bug nptl/11588] " dvhltc at us dot ibm dot com
                   ` (17 more replies)
  0 siblings, 18 replies; 19+ messages in thread
From: dvhltc at us dot ibm dot com @ 2010-05-11 18:46 UTC (permalink / raw)
  To: glibc-bugs

When using a PTHREAD_PRIO_INHERIT mutex with a condvar, the pthread_cond* calls 
can still cause an unbounded priority inversion via the internal condvar lock. 
The POSIX specification doesn't provide a mechanism to specify the protocol of 
the condvar. We would like to do this at runtime, but unfortunately it is legal 
to call pthread_cond_signal() or pthread_cond_broadcast() without first waiting 
on the lock, so the mutex type may not be known the first time the condvar is 
used. A new API, pthread_condattr_setprotocol_np() and 
pthread_condattr_getprotocol_np(), would allow the user to create a 
PTHREAD_PRIO_INHERIT condvar. This would use a PTHREAD_PRIO_INHERIT mutex for 
the internal condvar lock, eliminating the potential for hitting an unbounded 
priority inversion on that lock.

This topic was initially discussed here:
http://sources.redhat.com/ml/libc-alpha/2010-01/msg00011.html

And again here:
http://sources.redhat.com/ml/libc-alpha/2010-02/msg00089.html

Test cases and patches for evaluation will be attached.

-- 
           Summary: pthread condvars are not priority inheritance aware
           Product: glibc
           Version: 2.12
            Status: NEW
          Severity: normal
          Priority: P2
         Component: nptl
        AssignedTo: drepper at redhat dot com
        ReportedBy: dvhltc at us dot ibm dot com
                CC: dvhltc at us dot ibm dot com,glibc-bugs at sources dot
                    redhat dot com


http://sourceware.org/bugzilla/show_bug.cgi?id=11588

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2010-06-17 22:17 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-11 18:46 [Bug nptl/11588] New: pthread condvars are not priority inheritance aware dvhltc at us dot ibm dot com
2010-05-11 18:48 ` [Bug nptl/11588] " dvhltc at us dot ibm dot com
2010-05-11 18:50 ` dvhltc at us dot ibm dot com
2010-05-11 18:51 ` dvhltc at us dot ibm dot com
2010-05-11 18:56 ` dvhltc at us dot ibm dot com
2010-05-12  5:02 ` dino at in dot ibm dot com
2010-05-12 11:06 ` pasky at suse dot cz
2010-05-13  1:55 ` dvhltc at us dot ibm dot com
2010-05-13  8:03 ` dvhltc at us dot ibm dot com
2010-05-13  8:05 ` dvhltc at us dot ibm dot com
2010-05-13  8:07 ` dvhltc at us dot ibm dot com
2010-05-13  8:08 ` dvhltc at us dot ibm dot com
2010-05-13  8:11 ` dvhltc at us dot ibm dot com
2010-05-13  8:13 ` dvhltc at us dot ibm dot com
2010-05-13 18:45 ` dvhltc at us dot ibm dot com
2010-05-27 23:19 ` dvhltc at us dot ibm dot com
2010-05-28 20:35 ` dvhltc at us dot ibm dot com
2010-06-17 20:59 ` dvhltc at us dot ibm dot com
2010-06-17 22:17 ` tglx at linutronix dot de

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).