X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id:references :in-reply-to:content-type:mime-version; q=dns; s=default; b=FKLY bazrAEVm0t+yKOK48G2+sUPzzEpifr4oZxb6h/kwZdx+itETqE5VESpWERQifRgp /TqtdnK/znENIPJ/DQyHJFEbMb5BBPvGQbMsFBRfyj4H3PWr/gLHg0OOppmDPAGg Uf8i8sSr2b3blmAqysiJRjRKcJVjqc/KUW4y1UQ= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id:references :in-reply-to:content-type:mime-version; s=default; bh=WtukK9EyvO 32sAm9r6vpuw7pXtM=; b=sYG+NIavb8pAgyZuGS1nprf//U+CRoKNSkNR502fUI NGw/46uB+o/3FuXwG3Y7B0y4E5mlVjRuDldOOoHqiU2Z+hjZZPUy/xis70h6WCHp HSCYEgTtVKaHAi+BzUPGXuBnbMu6tQj8AUMc0+Y5zgJafaMKj2isvtQRrTM4YvJT E= 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 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.1 required=5.0 tests=BAYES_50,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: gwo5.mbox.net X-USANET-Received: from gwo5.mbox.net [127.0.0.1] by gwo5.mbox.net via mtad (C8.MAIN.4.02J) with ESMTP id 999TJVciM5248Mo5; Thu, 22 Oct 2015 02:08:38 -0000 X-USANET-Routed: 5 gwsout-gwsd Q:gwsd X-USANET-Routed: 3 gwsout-vs Q:bmvirus X-USANET-GWS2-Tenant: electric-cloud.com X-USANET-GWS2-Tagid: ECLD X-USANET-Source: 165.212.120.254 OUT aeolus AT electric-cloud DOT com S1P5HUB8.EXCHPROD.USA.NET TLS X-USANET-MsgId: XID543TJVciM6152Xo5 From: John Carey To: "cygwin AT cygwin DOT com" Subject: RE: pthread_kill: signals remain pending after target thread exits Date: Thu, 22 Oct 2015 02:08:38 +0000 Message-ID: <28F5B565B6F6424C87E4AC0DCC84316575D73A86@S1P5DAG5C.EXCHPROD.USA.NET> References: <28F5B565B6F6424C87E4AC0DCC84316575D71070 AT S1P5DAG5C DOT EXCHPROD DOT USA DOT NET>,<20151021114810 DOT GQ5319 AT calimero DOT vinschen DOT de> In-Reply-To: <20151021114810.GQ5319@calimero.vinschen.de> Content-Type: multipart/mixed; boundary="_002_28F5B565B6F6424C87E4AC0DCC84316575D73A86S1P5DAG5CEXCHPR_" MIME-Version: 1.0 X-IsSubscribed: yes --_002_28F5B565B6F6424C87E4AC0DCC84316575D73A86S1P5DAG5CEXCHPR_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable > From: Corinna Vinschen [corinna-cygwin AT cygwin DOT com] > Sent: Wednesday, October 21, 2015 4:48 AM > Subject: Re: pthread_kill: signals remain pending after target thread exi= ts ... > > On Sep 11 18:11, John Carey wrote: > > There seems to be a problem with pthread_kill: a pending signal > > targeting a particular thread prevents other threads from receiving > > signals sharing the same signal number--even after the original target > > thread exits and is joined. ... > The important thing here is to get rid of the pending signal. Yes, I agree that is the most important thing. > > In my view it would be desirable if: > > > > - Pending signals targeting a particular thread would not outlast > > that thread. >=20 > Since you looked into the code anyway, do you have an idea how to > implement that? For a start, do you have a simple testcase, only > the bare code needed to reproduce the issue? I've attached a test case that I *think* gets into the right spot, at least= for 64-bit Cygwin 2.0.4. That is, it hangs trying to receive the signal, = instead of terminating. (This test passes (terminates) in 32-bit Cygwin 1.= 7.9 and 64-bit Ubuntu 14.04.3 LTS.) As to a fix: sorry, but though I looked at the code, I am not sufficiently = confident to suggest a specific change. I think that the internal signal h= andling thread has exclusive access to the pending signal collection, which= is one difficulty. And I'm not sure how the race is resolved between some= thing trying to use the cygtls and the cygtls being destroyed. At a guess,= there are at least two general approaches to a fix: 1. Somehow prevent new signals from being sent to the terminating thread, t= hen notify the internal signal handling thread of the need to purge pending= signals targeting the doomed thread, then delay cygtls destruction until c= onfirmation that that purge is complete. 2. In the pending signal representation, replace the direct cygtls address = with a pointer to some small reference-counted object associated with the c= ygtls. That small object could live on for a while, even after the origina= l cygtls has been destroyed and its memory reused for a new cygtls, so that= the signal processing thread can take its time purging references. But th= ere has to be some way to atomically do two things: 1) check whether this s= mall object still points to a valid cygtls, and 2) if it does, delay destru= ction of that cygtls until some task has been performed (such as processing= a signal). Perhaps this small object could contain an invalidation flag a= nd some synchronization objects (mutex, condition variable, etc.) in additi= on to the raw cygtls pointer. > > - Multiple pending signals targeting different threads could > > coexist, even if they shared the same signal number. This happens > > on Linux (Ubuntu 14.04.3), where I can generate two signals for two > > different threads, then sleep for a bit in each target thread, and > > finally have each thread receive its signal with sigwait()--neither > > signal is lost during the sleeping period. >=20 > That requires to extend the handling for pending signals. That's > a rather bigger task... Yeah. It's nice if threads don't interfere with each other, but this part = would indeed be harder to change. -- John Carey --_002_28F5B565B6F6424C87E4AC0DCC84316575D73A86S1P5DAG5CEXCHPR_ Content-Type: text/x-csrc; name="test_pending_signal.c" Content-Description: test_pending_signal.c Content-Disposition: attachment; filename="test_pending_signal.c"; size=6688; creation-date="Thu, 22 Oct 2015 01:10:32 GMT"; modification-date="Thu, 22 Oct 2015 01:10:32 GMT" Content-Transfer-Encoding: base64 LyogQ29weXJpZ2h0IChjKSAyMDE1LCBFbGVjdHJpYyBDbG91ZCwgSW5jLgog KiBBbGwgcmlnaHRzIHJlc2VydmVkLgogKgogKiBSZWRpc3RyaWJ1dGlvbiBh bmQgdXNlIGluIHNvdXJjZSBhbmQgYmluYXJ5IGZvcm1zLCB3aXRoIG9yIHd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GhyZWFkX2NvbmRfdCBj b25kID0gUFRIUkVBRF9DT05EX0lOSVRJQUxJWkVSOwpzdGF0aWMgaW50IGZ1 bGx5X3VwID0gMDsKc3RhdGljIGludCBhbGxvd19leGl0ID0gMDsKc3RhdGlj IGludCBhYm91dF90b19zaWd3YWl0ID0gMDsKc3RhdGljIGludCBzaWduYWxf cmVjZWl2ZWQgPSAtMTsKCnN0YXRpYyB2b2lkIGNoZWNrX3N5c2NhbGwoY2hh ciBjb25zdCAqY29udGV4dCwgaW50IHJlc3VsdCkKewogICAgaWYgKHJlc3Vs dCA9PSAtMSkgewogICAgICAgIGZwcmludGYoc3RkZXJyLCAiJXM6ICVzXG4i LCBjb250ZXh0LCBzdHJlcnJvcihlcnJubykpOwogICAgICAgIGV4aXQoRVhJ VF9GQUlMVVJFKTsKICAgIH0KfQoKc3RhdGljIHZvaWQgY2hlY2tfdGhyZWFk Y2FsbChjaGFyIGNvbnN0ICpjb250ZXh0LCBpbnQgZXJyb3JfbnVtYmVyKQp7 CiAgICBpZiAoZXJyb3JfbnVtYmVyKSB7CiAgICAgICAgZnByaW50ZihzdGRl cnIsICIlczogJXNcbiIsIGNvbnRleHQsIHN0cmVycm9yKGVycm9yX251bWJl cikpOwogICAgICAgIGV4aXQoRVhJVF9GQUlMVVJFKTsKICAgIH0KfQoKc3Rh dGljIHZvaWQgKnRocmVhZDEodm9pZCAqYXJnKQp7CiAgICBjaGVja190aHJl YWRjYWxsKCJwdGhyZWFkX211dGV4X2xvY2siLAogICAgICAgICAgICBwdGhy ZWFkX211dGV4X2xvY2soJm11dGV4KSk7CgogICAgZnVsbHlfdXAgPSAxOwoK ICAgIGNoZWNrX3RocmVhZGNhbGwoInB0aHJlYWRfY29uZF9icm9hZGNhc3Qi LAogICAgICAgICAgICBwdGhyZWFkX2NvbmRfYnJvYWRjYXN0KCZjb25kKSk7 CgogICAgd2hpbGUgKCEgYWxsb3dfZXhpdCkgewogICAgICAgIHB0aHJlYWRf Y29uZF93YWl0K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Cg== --_002_28F5B565B6F6424C87E4AC0DCC84316575D73A86S1P5DAG5CEXCHPR_ Content-Type: text/plain; charset=us-ascii -- 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 --_002_28F5B565B6F6424C87E4AC0DCC84316575D73A86S1P5DAG5CEXCHPR_--