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/21422] Deadlock in 2.25 pthread_cond_broadcast after process abort


https://sourceware.org/bugzilla/show_bug.cgi?id=21422

--- Comment #7 from Florian Weimer <fweimer at redhat dot com> ---
(In reply to Dimitri Staessens from comment #6)
> Hi Torvald,
> 
> thank you for the insights. I have a question, though: 
> 
> POSIX does define pthread_cond_wait() as a cancellation point. So, if the
> calling thread is cancelled, shouldn't the condition variable handle this
> correctly?

If you use pthread_cancel, then yes, it should work.  If the thread is
terminated by other means, the condition variable may end up in an inconsistent
state.

> I also observe the process sending the pthread_cond_broadcast()
> lock up if the process blocking on the condvar was interrupted with SIGINT,
> and another process is started, for instance.

What happens due to the SIGINT?  Does a futex system call return EINTR or
something like that?

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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