This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug nptl/3123] New: pthread_cond_wait cleanup handler


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]