public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug nptl/342] New: Threads hang after condvar destruction
@ 2004-08-23 13:16 sebastien dot decugis at ext dot bull dot net
  2004-08-23 13:31 ` [Bug nptl/342] " sebastien dot decugis at ext dot bull dot net
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: sebastien dot decugis at ext dot bull dot net @ 2004-08-23 13:16 UTC (permalink / raw)
  To: glibc-bugs

The POSIX standard requires that it is safe to destroy a condvar when no more
threads are blocked on it, even if the threads are still inside the
pthread_cond_{timed}wait routine. Please refer to the pthread_cond_destroy()
page and especially to the Example section.

The current implementation does not respect this assertion. The routines
pthread_cond_wait or timedwait still need to access some condition data, but the
pthread_cond_destroy succeeds anyway. The result is a hang when the memory of
the destroyed condvar is re-used.

Maybe the pthread_cond_destroy should block until every other thread leaves the
pthread_cond_* routines, as it is done in the barriers? -- I'm not sure if this
is possible...

Regards,
Sebastien.

-- 
           Summary: Threads hang after condvar destruction
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: nptl
        AssignedTo: drepper at redhat dot com
        ReportedBy: sebastien dot decugis at ext dot bull dot net
                CC: glibc-bugs at sources dot redhat dot com
 GCC build triplet: gcc3.4.1


http://sources.redhat.com/bugzilla/show_bug.cgi?id=342

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2006-04-01 20:03 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-08-23 13:16 [Bug nptl/342] New: Threads hang after condvar destruction sebastien dot decugis at ext dot bull dot net
2004-08-23 13:31 ` [Bug nptl/342] " sebastien dot decugis at ext dot bull dot net
2004-09-03  8:08 ` jakub at redhat dot com
2006-03-29 15:25 ` iamwithyou at gmail dot com
2006-04-01 20:03 ` drepper at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).