View Issue Details

IDProjectCategoryView StatusLast Update
00003881003.1(2008)/Issue 7System Interfacespublic2011-05-05 16:10
Reporterdvhart Assigned Toajosey  
PrioritynormalSeverityObjectionTypeEnhancement Request
Status ClosedResolutionRejected 
NameDarren Hart
OrganizationIntel
User Reference
Sectionpthread_cond_init
Page NumberOf which document?
Line NumberOf which document?
Interp Status---
Final Accepted Text
Summary0000388: pthread condvars are not priority inheritance aware
DescriptionWhen 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() and
pthread_condattr_getprotocol(), 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 have been provided in the bugzilla record for glibc:
http://sources.redhat.com/bugzilla/show_bug.cgi?id=11588
Desired ActionAdd pthread_condattr_setprotocol() and pthread_condattr_getprotocol() to the specification in order to specify PTHREAD_PRIOR_INHERIT in the condattr at pthread_cond_init() time.
TagsNo tags attached.

Activities

msbrown

2011-05-05 16:10

manager   bugnote:0000778

Given that there is no existing practice for this, we are closing until there is an existing implementation, or until a complete specification for one is received.

At such time this issue can be re-evaluated.

Issue History

Date Modified Username Field Change
2011-02-28 18:09 dvhart New Issue
2011-02-28 18:09 dvhart Status New => Under Review
2011-02-28 18:09 dvhart Assigned To => ajosey
2011-02-28 18:09 dvhart Name => Darren Hart
2011-02-28 18:09 dvhart Organization => Intel
2011-02-28 18:09 dvhart Section => pthread_cond_init
2011-02-28 18:09 dvhart Page Number => Of which document?
2011-02-28 18:09 dvhart Line Number => Of which document?
2011-05-05 16:10 msbrown Interp Status => ---
2011-05-05 16:10 msbrown Note Added: 0000778
2011-05-05 16:10 msbrown Status Under Review => Closed
2011-05-05 16:10 msbrown Resolution Open => Rejected