This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug nptl/2843] New: Race between pthread_cancel and pthread_join (tst-join5)
- From: "paul at codesourcery dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: 24 Jun 2006 20:36:15 -0000
- Subject: [Bug nptl/2843] New: Race between pthread_cancel and pthread_join (tst-join5)
- Reply-to: sourceware-bugzilla at sourceware dot org
I'm seeing intermittent failures in nptl/ tst-join5
Consider two threads, A and B:
Thread A calls pthread_cancel(B); pthread_join(B).
Some time later thread B calls pthread_join(A).
pthread_join is a cancellation point, so I would expect thread B to be cancelled
at that point. However what thread B sees thread A waiting and mistakenly
returns EDEADLK.
The attached testcase is based on tst-join5, with an extra busy look added to
make the failure reproducible.
The patch fixes this by checking if the current thread has been cancelled before
returning EDEADLK.
--
Summary: Race between pthread_cancel and pthread_join (tst-join5)
Product: glibc
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: nptl
AssignedTo: drepper at redhat dot com
ReportedBy: paul at codesourcery dot com
CC: glibc-bugs at sources dot redhat dot com
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
http://sourceware.org/bugzilla/show_bug.cgi?id=2843
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.