public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: 1.7.15-1: pthread_cancel and pthread_kill not working as expected
Date: Wed, 23 May 2012 16:27:00 -0000	[thread overview]
Message-ID: <20120523160625.GL9200@calimero.vinschen.de> (raw)
In-Reply-To: <20120523085215.GG9200@calimero.vinschen.de>

On May 23 10:52, Corinna Vinschen wrote:
> On May 22 15:25, Otto Meta wrote:
> > >> 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.
> 
> Just to let you know I'm working on it.  This will take some time.
> During debugging I stumbled over a heisenbug.  As soon as I remove the
> "Thread %i woke up just fine" printf from your test application, the
> read function reurns with a "Bad address" error.  So far I have onlya
> vague hunch what the cause may be.  Stay tuned.

Half of the solution is now checked in to CVS.  The other half is a bad
hack to workaround a shortcoming in newlib's stdio functions.  I'd rather
have a solution in newlib.  see my request on the newlib ML:
http://cygwin.com/ml/newlib/2012/msg00188.html


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

  reply	other threads:[~2012-05-23 16:07 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-09 17:50 1.7.14-2: " Otto Meta
2012-05-18 10:23 ` 1.7.15-1: " Otto Meta
2012-05-18 11:43   ` Earnie Boyd
2012-05-21 10:26     ` Otto Meta
2012-05-21 10:47       ` Corinna Vinschen
2012-05-21 12:44         ` Otto Meta
2012-05-22 11:03           ` Corinna Vinschen
2012-05-22 13:26             ` Otto Meta
2012-05-23  8:53               ` Corinna Vinschen
2012-05-23 16:27                 ` Corinna Vinschen [this message]
2012-05-23 17:24                   ` Corinna Vinschen
2012-05-23 17:44                     ` David Rothenberger
2012-05-23 18:26                       ` Corinna Vinschen
2012-05-23 20:26                         ` Corinna Vinschen
2012-05-24  5:52                           ` David Rothenberger
2012-05-24  7:07                             ` Corinna Vinschen
2012-05-24 10:36                           ` Otto Meta
2012-05-24 10:59                             ` Otto Meta
2012-05-24 11:21                               ` Corinna Vinschen
2012-05-24 15:37                                 ` Otto Meta
2012-05-24 16:14                                   ` Corinna Vinschen
2012-05-24 19:15                                     ` Otto Meta
2012-05-25 10:04                                       ` Corinna Vinschen
2012-07-11 12:36             ` Otto Meta

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120523160625.GL9200@calimero.vinschen.de \
    --to=corinna-cygwin@cygwin.com \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).