Bug 516469 - PTHREAD_PRIO_INHERIT does not mix well with POSIX condition variables
Summary: PTHREAD_PRIO_INHERIT does not mix well with POSIX condition variables
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: glibc
Version: rawhide
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Andreas Schwab
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 516995 F12Blocker, F12FinalBlocker
TreeView+ depends on / blocked
 
Reported: 2009-08-10 02:05 UTC by Lennart Poettering
Modified: 2009-08-17 16:10 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-08-17 16:10:42 UTC


Attachments (Terms of Use)
test case (1.38 KB, text/x-csrc)
2009-08-10 02:06 UTC, Lennart Poettering
no flags Details

Description Lennart Poettering 2009-08-10 02:05:25 UTC
The attached test case blocks forever on kernel-2.6.31-0.139.rc5.git3.fc12.x86_64/glibc-2.10.90-12.x86_64. It works fine on Program works as intended on kernel-2.6.31-0.38.rc1.git7.fc12.i586/glibc-2.10.1-2.i686.

Disabling PTHREAD_PRIO_INHERIT for the mutex in question makes the test case work properly.

Not sure if this is a kernel or glibc problem.

Comment 1 Lennart Poettering 2009-08-10 02:06:22 UTC
Created attachment 356836 [details]
test case

Comment 2 Lennart Poettering 2009-08-10 14:25:09 UTC
peterz thinks it's a kernel problem. Reassigning.

Comment 3 Andreas Schwab 2009-08-10 14:55:26 UTC
No, it isn't.

<http://sourceware.org/ml/libc-alpha/2009-08/msg00024.html>

Comment 4 Darren Hart 2009-08-10 16:21:02 UTC
Took a look at the trace, the kernel is doing what it should.  If you put the thread to sleep with FUTEX_WAIT_REQUEUE_PI_PRIVATE (0x8b) you have to wake it up with FUTEX_CMP_REQUEUE_PI_PRIVATE (0x8c), but the trace shows a call to FUTEX_WAKE_PRIVATE instead.  This causes the kernel routine the thread is blocked in to wake, detect invalid usage, and return EINVAL.  This is a glibc bug.

Comment 5 Andreas Schwab 2009-08-17 16:10:42 UTC
Fixed in 2.10.90-14.


Note You need to log in before you can comment on or make changes to this bug.