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/21291] pthread cancellation fails when contending lock


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

--- Comment #12 from Dimitri Staessens <dimitri.staessens at ugent dot be> ---
I'm just going to quote the full paragraph that you referenced before:

Whenever a thread has cancelability enabled and a cancellation request has been
made with that thread as the target, and the thread then calls any function
that is a cancellation point (such as pthread_testcancel() or read()), the
cancellation request shall be acted upon before the function returns. If a
thread has cancelability enabled and a cancellation request is made with the
thread as a target while the thread is suspended at a cancellation point, the
thread shall be awakened and the cancellation request shall be acted upon. It
is unspecified whether the cancellation request is acted upon or whether the
cancellation request remains pending and the thread resumes normal execution
if:

    The thread is suspended at a cancellation point and the event for which it
is waiting occurs

    A specified timeout expired

before the cancellation request is acted upon.

The current implementation of pthread_cond_timedwait() is clearly violating the
very first statement of this paragraph. This is definitely a bug.

-- 
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]