delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2012/05/21/06:48:08

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Date: Mon, 21 May 2012 12:47:17 +0200
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT 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 AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <4FAAAE25 DOT 40204 AT sister-shadow DOT de> <4FB62304 DOT 2000100 AT sister-shadow DOT de> <CA+sc5mkqAoFoO=Jh19WMFe7FDq0337nz5r3-o6ogvGMvt3qPYw AT mail DOT gmail DOT com> <4FBA1846 DOT 6020005 AT sister-shadow DOT de>
MIME-Version: 1.0
In-Reply-To: <4FBA1846.6020005@sister-shadow.de>
User-Agent: Mutt/1.5.21 (2010-09-15)
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019