1.7.15-1: pthread_cancel and pthread_kill not working as expected

Otto Meta otto.meta@sister-shadow.de
Tue May 22 13:26:00 GMT 2012


>> Testcase cancel deferred:
>> Works with 1.7.9 and 20120517 snapshot, fails (hangs) with 1.7.12-1
>> and 1.7.15-1.
> If that works in the snapshot anyway, I'm not going to look into that
> one.

It worked in the reduced testcase with sem_wait(). With read() it’s
still half-broken. See below.

>> Testcase cancel asynchronous:
>> Async cancel seems to have no effect with any tested version.
> I think I found a solution for this problem.  See the comment in the
> patch at
> http://sourceware.org/cgi-bin/cvsweb.cgi/src/winsup/cygwin/thread.cc.diff?cvsroot=src&r1=1.258&r2=1.259
> Please test the today's developer snapshot.

Asynchronous cancel seems to work as well as deferred cancel now. Thanks.

Both cancel types work with sem_wait() and pause() now, but for threads
blocked in read() they’re still unreliable. Only one of three blocked
threads is killed in the attached updated testcases.

>> Testcase signal/kill:
>> Signals may or may not reach the correct thread with 1.7.12-1 and newer.
> Confirmed. [...] This is cgf's domain so I leave it at that for now.

Okay, I’ll hope for him to respond then.

Otto
-------------- next part --------------
A non-text attachment was scrubbed...
Name: testcase_cancel_asynchronous.c
Type: text/x-csrc
Size: 2089 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20120522/607c8084/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: testcase_cancel_deferred.c
Type: text/x-csrc
Size: 1910 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20120522/607c8084/attachment-0001.bin>
-------------- next part --------------
--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


More information about the Cygwin mailing list