X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Message-ID: <4FBA1846.6020005@sister-shadow.de> Date: Mon, 21 May 2012 12:26:14 +0200 From: Otto Meta Reply-To: cygwin AT cygwin DOT com User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20120430 Thunderbird/12.0.1 MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: 1.7.15-1: pthread_cancel and pthread_kill not working as expected References: <4FAAAE25 DOT 40204 AT sister-shadow DOT de> <4FB62304 DOT 2000100 AT sister-shadow DOT de> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com > 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. Otto -- 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