delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2013/12/09/15:59:47

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:message-id:date:from:mime-version:to:subject
:references:in-reply-to:content-type:content-transfer-encoding;
q=dns; s=default; b=iBt79NpAArwdvbKAbIWu71/COqJUcqhie17tKYM72q5
yetY1lQaHV9MIVu47F7xxU85loh65pw34F0W2hU5P8ax0qHYA+aRRWNfwDqLdAfS
IkzdU/tDNZ1HsO3rv+N5UMwGZuL8AwbgoFMxZL74Qrrxjq4Fp4REBtOY7sktBwp8
=
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:message-id:date:from:mime-version:to:subject
:references:in-reply-to:content-type:content-transfer-encoding;
s=default; bh=dVtKNNYccvV9Hs9c5H6l3OA4GiU=; b=jbyJtAA40pXADFZsP
1MU8DnJ2sYoiclaS9KpmyVXr3cOttJoZpEhlN0y6FIJBlNJJ4+erhPIKg5N0Lq6n
+LLiAsu6BpxkhDhqf7CmpgPDbhFSUIMmUcCm2LMKe3LQkLKVK7J/KO7EXjMhgrEG
XQ8OilXJKHi8/6bNYy2d8el3H8=
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.1 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2
X-HELO: smtpout03.bt.lon5.cpcloud.co.uk
X-CTCH-RefID: str=0001.0A090204.52A62F28.0044,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0
X-Junkmail-Premium-Raw: score=27/97,refid=2.7.2:2013.12.9.173615:17:27.888,ip=86.174.32.56,rules=__MOZILLA_MSGID, __HAS_MSGID, __SANE_MSGID, __HAS_FROM, __USER_AGENT, __MOZILLA_USER_AGENT, __MIME_VERSION, __TO_MALFORMED_2, __TO_NO_NAME, __BOUNCE_CHALLENGE_SUBJ, __BOUNCE_NDR_SUBJ_EXEMPT, __IN_REP_TO, __CT, __CT_TEXT_PLAIN, __CTE, __CP_NOT_1, __SUBJ_ALPHA_NEGATE, __FORWARDED_MSG, BODYTEXTP_SIZE_3000_LESS, BODY_SIZE_1200_1299, __MIME_TEXT_ONLY, RDNS_GENERIC_POOLED, SXL_IP_DYNAMIC[56.32.174.86.fur], HTML_00_01, HTML_00_10, BODY_SIZE_5000_LESS, RDNS_SUSP_GENERIC, RDNS_SUSP, BODY_SIZE_2000_LESS, BODY_SIZE_7000_LESS, NO_URI_FOUND
X-CTCH-Spam: Unknown
Message-ID: <52A62F2E.8040908@dronecode.org.uk>
Date: Mon, 09 Dec 2013 20:59:26 +0000
From: Jon TURNEY <jon DOT turney AT dronecode DOT org DOT uk>
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:24.0) Gecko/20100101 Thunderbird/24.1.1
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: Signal occasionally causes thread inside win32 api to be suspended?
References: <52A4AE10 DOT 8080303 AT dronecode DOT org DOT uk> <20131209204759 DOT GA1675 AT ednor DOT casa DOT cgf DOT cx>
In-Reply-To: <20131209204759.GA1675@ednor.casa.cgf.cx>

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.

> This should be rectified in today's snapshot.

-- 
Jon TURNEY
Volunteer Cygwin/X X Server maintainer

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