[Bug nptl/3123] New: pthread_cond_wait cleanup handler

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[Bug nptl/3123] New: pthread_cond_wait cleanup handler

glaubitz at physik dot fu-berlin.de
One thread blocks in pthread_cond_wait, another thread signals the condition
variable and immediatley afterwards cancels the first thread.
A new thread blocking on the same condition variable can't be woken up with
pthread_cond_signal.

remark: pthread_cond_timedwait shows the same behaviour

workaround: if pthread_cond_broadcast is used instead of pthread_cond_signal,
it works

The attached testcase is a try to make a minimal example, the situation
occurred in a large C++ project.
In this project there are three threads with different realtime priorities
involved (one waites, one signals and one cancels).


Testsystem:
Linux 2.6.15.4 #1 PREEMPT Mon Jul 10 15:39:46 CEST 2006 i686 i686 i386 GNU/Linux
gcc 3.4.4
glibc 2.3.5 (productive system) also: glibc 2.3.6 and glibc 2.4

Testcase build:
gcc -lpthread synctest.c -o synctest

The program shows an error output.
 1. signal and cancel
 2. signal
 !!!error thread didn't get 2. signal

--
           Summary: pthread_cond_wait cleanup handler
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: nptl
        AssignedTo: drepper at redhat dot com
        ReportedBy: walter dot stocker at datacon dot at
                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=3123

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
Reply | Threaded
Open this post in threaded view
|

[Bug nptl/3123] pthread_cond_wait cleanup handler

glaubitz at physik dot fu-berlin.de

------- Additional Comments From walter dot stocker at datacon dot at  2006-08-24 13:45 -------
Created an attachment (id=1245)
 --> (http://sourceware.org/bugzilla/attachment.cgi?id=1245&action=view)
testcase

this is the testcase mentioned

--


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

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
Reply | Threaded
Open this post in threaded view
|

[Bug nptl/3123] pthread_cond_wait cleanup handler

glaubitz at physik dot fu-berlin.de
In reply to this post by glaubitz at physik dot fu-berlin.de

------- Additional Comments From drepper at redhat dot com  2006-09-09 11:07 -------
Fixed in cvs.

--
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


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

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