delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2013/05/08/16:48:14

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=F3Ex2tBY0IM12Noxj+3cCAI8qlhcuYSaP2hxu6OyVJF
Q0foD6Kzr1onVJV1Am5uWqFuDEMswrXqu5yueB52iQIua439plsp57yJhkChTzSo
K8FFTGnMMUPJ5W/TgDgzGb5hJ34+sv5fVVB3xb5I//6o4MMp1Fc+/jdOJT7BYdVE
=
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=JPwaL2bugVyKxfEB7/QCwIznjI8=; b=e8ge8Ox8eO3/9toh2
UclekjgglJ/JGb3wOo2GTAdLhjMbG5ZM3TC/gyIESHMWufOIqRq/742y7ggq34rm
BzFMwGUHCwT95g7RMI0mSg7yaykRj1JpzVVnt9Ik1WRTubnlhFmbDKqkhxsc4SA5
ONfY61QPNv11QtCAkLKdULSkHE=
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
X-Spam-SWARE-Status: No, score=-3.9 required=5.0 tests=BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,MAY_BE_FORGED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_NO,RCVD_IN_HOSTKARMA_YE,RP_MATCHES_RCVD,SPF_NEUTRAL autolearn=ham version=3.3.1
Message-ID: <518AB9F2.6050501@cs.utoronto.ca>
Date: Wed, 08 May 2013 16:47:46 -0400
From: Ryan Johnson <ryan DOT johnson AT cs DOT utoronto DOT ca>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130328 Thunderbird/17.0.5
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: printf + pthreads+gdb+mintty = hang?
References: <5189627F DOT 3050801 AT cs DOT utoronto DOT ca> <20130508183617 DOT GA8072 AT ednor DOT casa DOT cgf DOT cx>
In-Reply-To: <20130508183617.GA8072@ednor.casa.cgf.cx>

On 08/05/2013 2:36 PM, Christopher Faylor wrote:
> On Tue, May 07, 2013 at 04:22:23PM -0400, Ryan Johnson wrote:
>> Hi all,
>>
>> Running the attached STC inside gdb hangs (zero CPU util, have to kill
>> gdb from Task Manager, killing a.exe doesn't cut it).
>>
>> Compile line used: g++ -Wall -g -mthreads -DBUG bug.cpp
>>
>> I currently have the following package versions:
>> cygwin-1.7.18(0.263/5/3) 2013-04-19
>> mintty-1.1.3-1
>> gdb-7.6.50-1
>> gcc-4.5.3-3
>>
>> The problem seems to be related to threads calling fprintf inside gdb,
>> it runs fine from the command line, or with printf instead; both fprintf
>> and printf sometimes trigger "warning: SuspendThread failed. (winerr 6)"
>> (not sure if that matters).
>>
>> Known issue? Easy workaround? New bug?
> Known, long-standing issue.  I put a workaround in the latest snapshot.
Hmm. The STC still hangs about 25% of the time (down from ~100%), so 
things are improved but not fixed.

Also, when I hit an assertion failure in my code, gdb successfully 
breaks in at my breakpoint on abort()---which used to hang---but then 
hangs as soon as I say "up 2" to see the actual source of the assertion 
failure. Unfortunately, I haven't been able to distill that one down to 
a reasonable STC: just arranging for a threaded toy app to call abort 
from multiple threads simultaneously doesn't seem to tickle the bug.

Ryan


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