delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2013/12/09/16:02:44

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:date:from:to:subject:message-id:reply-to
:references:mime-version:content-type:in-reply-to; q=dns; s=
default; b=K6lSMvunOlDBGfXilDlEtLXpT7CwHWZ+S09H9/Rs9jG6DonBDIeeS
b/uov1YmrSkFrXyNUNRnACoeU8UuriicZwaI+DWMzxHWJct9Tzmu0nAu8XwSEasL
JgNpnugUBUR/KehPcZH3i2/pl3f517lTNrYg/Njpbx5eyC2o5P8a88=
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:date:from:to:subject:message-id:reply-to
:references:mime-version:content-type:in-reply-to; s=default;
bh=fMDj7iEAL0A1V93CCJBSIz40hyU=; b=aRgdOkB/mEXTAvs1S+SHUDxgacDz
bjVPRvfkk5Au5Er27clhDAoTJEIXT9VdsDPAczpettAPbU2vmBnbyJ/gUoKLcIFQ
NabgPoR/juWL9CH2XYhqNMuHY/S2blaxYNaZT4+dmQL1JNAdZkyf8hUKPHMkpIvi
WYx97KLmNEpkRMI=
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
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-0.8 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2
X-HELO: mho-01-ewr.mailhop.org
X-Mail-Handler: Dyn Standard SMTP by Dyn
X-Report-Abuse-To: abuse AT dyndns DOT com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information)
X-MHO-User: U2FsdGVkX1/3ZC2xVLezsDpfYIy+DEQ8
Date: Mon, 9 Dec 2013 16:02:17 -0500
From: Christopher Faylor <cgf-use-the-mailinglist-please AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: Signal occasionally causes thread inside win32 api to be suspended?
Message-ID: <20131209210217.GA3085@ednor.casa.cgf.cx>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <52A4AE10 DOT 8080303 AT dronecode DOT org DOT uk> <20131209204759 DOT GA1675 AT ednor DOT casa DOT cgf DOT cx> <52A62F2E DOT 8040908 AT dronecode DOT org DOT uk>
MIME-Version: 1.0
In-Reply-To: <52A62F2E.8040908@dronecode.org.uk>
User-Agent: Mutt/1.5.20 (2009-06-14)

On Mon, Dec 09, 2013 at 08:59:26PM +0000, Jon TURNEY wrote:
>On 09/12/2013 20:47, Christopher Faylor wrote:
>> On Sun, Dec 08, 2013 at 05:36:16PM +0000, Jon TURNEY wrote:
>>> I don't really understand the intricacies of cygwin signal delivery,
>>> but I see that it can suspend the target thread to determine if it's in
>>> a safe place to deliver the signal (outside a win32 API call).  I think
>>> that sometimes the thread is not correctly resumed.
>>>
>>> This appears to be the cause of been a long-standing problem with the
>>> X.org X server on cygwin, which we work around by disabling
>>> smart-scheduling (no great loss), but I've only just recently
>>> understood enough about the problem to produce a STC.
>>>
>>> If you run the attached for a while, it stops.  According to Process
>>> Hacker, the main thread is in the suspended state, inside ntdll.dll.
>>> e.g.:
>> 
>> I think I have worked around the problem: calling GetModuleName for the
>> address associated with ntdll.dll while the thread is suspended can cause
>> the program (thread?) to hang.
>
>Ah, makes sense.  It's probably deadlocked on the global loader lock, if you
>happen to suspend the thread while it is held.

Probably something like that.  I used to have tests in the code to avoid things
like that for Windows 9x.  Who would have guessed that you could still get into
this state with modern versions of Windows*?

cgf

*This is a rhetorical question.

--
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