1.7.15-1: pthread_cancel and pthread_kill not working as expected

Otto Meta otto.meta@sister-shadow.de
Mon May 21 10:26:00 GMT 2012

> You should always try the most recent http://cygwin.com/snapshots.

Thanks for the suggestion, that did indeed change something: The tests
yield the same half-broken behaviour for pthread_cancel as with 1.7.7
and 1.7.9. That’s better than the almost completely broken behaviour
from 1.7.12-1 to 1.7.15-1. pthread_kill is still as unreliable as in
1.7.12-1 and newer, though.

Results with cygwin1-20120517.dll:

Test 1:
  Blocking on semaphore: Works
  Blocking on pause(): Works
  Blocking on read(): Not deterministic: One thread is killed, the other
    two stay

Test 2:
  Independent of what the threads are blocked on, nothing is cancelled.

Test 3:
  Blocking on semaphore: May or may not signal the correct thread.
  Blocking on pause(): Same as semaphore.
  Blocking on read(): One thread executes the signal handler, the other
    two don't. Thread chosen seemingly at random.

Test 4:
  Not deterministic: Targeted thread either executes the signal handler
  every time or not at all.

Test 5:
  Not deterministic: Threads may or may not exit after being poked.

Test 6:
  Not deterministic: Threads may or may not exit after being poked.

In short:
- Deferred pthread_cancel seems to work.
- Asynchronous pthtread_cancel seems to have no effect.
- pthread_kill is basically hit or miss.


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