X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-2.8 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RCVD_IN_DNSWL_NONE,RCVD_IN_HOSTKARMA_NO,RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Message-ID: <4FBD217B.8000803@acm.org> Date: Wed, 23 May 2012 10:42:19 -0700 From: David Rothenberger <daveroth AT acm DOT org> User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20120428 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> <CA+sc5mkqAoFoO=Jh19WMFe7FDq0337nz5r3-o6ogvGMvt3qPYw AT mail DOT gmail DOT com> <4FBA1846 DOT 6020005 AT sister-shadow DOT de> <20120521104717 DOT GC7763 AT calimero DOT vinschen DOT de> <4FBA38A5 DOT 5030408 AT sister-shadow DOT de> <20120522110238 DOT GC15843 AT calimero DOT vinschen DOT de> <4FBB93D6 DOT 90408 AT sister-shadow DOT de> <20120523085215 DOT GG9200 AT calimero DOT vinschen DOT de> <20120523160625 DOT GL9200 AT calimero DOT vinschen DOT de> <20120523171834 DOT GM9200 AT calimero DOT vinschen DOT de> In-Reply-To: <20120523171834.GM9200@calimero.vinschen.de> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit X-IsSubscribed: yes Reply-To: cygwin AT cygwin DOT com Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: <cygwin.cygwin.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 5/23/2012 10:18 AM, Corinna Vinschen wrote: > On May 23 18:06, Corinna Vinschen wrote: >> 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 > > Ok, for the time being I checked in my workaround. Please test the > today's developer snapshot. I tried installing this snapshot and found most things hung. Specifically, I ran ash in a Windows cmd window, then tried /bin/echo foo I tried mintty too but bash hangs before I get a prompt. "echo foo" worked fine, though. -- David Rothenberger ---- daveroth AT acm DOT org Glib's Fourth Law of Unreliability: Investment in reliability will increase until it exceeds the probable cost of errors, or until someone insists on getting some useful work done. -- 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