This is the mail archive of the
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
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
Summary: Race between pthread_cancel and pthread_join (tst-join5)
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
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.