From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21386 invoked by alias); 21 May 2012 10:47:57 -0000 Received: (qmail 21338 invoked by uid 22791); 21 May 2012 10:47:32 -0000 X-Spam-Check-By: sourceware.org Received: from aquarius.hirmke.de (HELO calimero.vinschen.de) (217.91.18.234) by sourceware.org (qpsmtpd/0.83/v0.83-20-g38e4449) with ESMTP; Mon, 21 May 2012 10:47:19 +0000 Received: by calimero.vinschen.de (Postfix, from userid 500) id 30E942C14FC; Mon, 21 May 2012 12:47:17 +0200 (CEST) Date: Mon, 21 May 2012 10:47:00 -0000 From: Corinna Vinschen To: cygwin@cygwin.com Subject: Re: 1.7.15-1: pthread_cancel and pthread_kill not working as expected Message-ID: <20120521104717.GC7763@calimero.vinschen.de> Reply-To: cygwin@cygwin.com Mail-Followup-To: cygwin@cygwin.com References: <4FAAAE25.40204@sister-shadow.de> <4FB62304.2000100@sister-shadow.de> <4FBA1846.6020005@sister-shadow.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <4FBA1846.6020005@sister-shadow.de> User-Agent: Mutt/1.5.21 (2010-09-15) Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com X-SW-Source: 2012-05/txt/msg00429.txt.bz2 On May 21 12:26, Otto Meta wrote: > > 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. Would you mind to provide *simple* testcases to allow easy debugging of your observations? Thanks, Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Project Co-Leader cygwin AT cygwin DOT com Red Hat -- 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