X-Recipient: archive-cygwin@delorie.com
X-Original-To: cygwin@cygwin.com
Delivered-To: cygwin@cygwin.com
DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 129633858D28
Authentication-Results: sourceware.org;
 dmarc=fail (p=none dis=none) header.from=nifty.ne.jp
Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=nifty.ne.jp
DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-03.nifty.com 239BkJlW028951
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.ne.jp;
 s=dec2015msa; t=1649504783;
 bh=HYe7qJ3Ko7EcgPQuuLiUG5B/UmafHtNJpcLw8Y9RZvo=;
 h=Date:From:To:Cc:Subject:In-Reply-To:References:From;
 b=rAE7zV/tLDxMEDisfNbDaZ3AklZMCHCncgxBU6wiAcALEzZJ8zEUmsHfFZcXiw0GA
 ns4Y8M7k9E3VkYq2P8mdTmSmY3H3PLiHBRatBeMiIpHPcH3ghW/AEr0HRulxyqtcPF
 JkYnIGem7uBafh82RLXZpLkhAha6pjMIKon2OgoWEp9jjaGatTd26zeHhS7DaX+/gQ
 MFfz5HhxYKm3+jqf9tLZD6MBylv2atyO6sf2YugKj/vN6OWUY9CbDcb2mUzI9Y/puz
 gYoK7Ig7cp1DyN1p4yoO/OkCqKwDYUE58H8mdgOdJGEH3AiV7/fjkxJsUp5y8jr7iv
 XKAMOaFOJNl5Q==
X-Nifty-SrcIP: [119.150.44.95]
Date: Sat, 9 Apr 2022 20:46:19 +0900
From: Takashi Yano <takashi.yano@nifty.ne.jp>
To: cygwin@cygwin.com
Subject: Re: Deadlock of the process tree when running make
Message-Id: <20220409204619.dd0e53902d5e108ef462e510@nifty.ne.jp>
In-Reply-To: <ab3971adb8f441fd16bb62e480547a95@ispras.ru>
References: <9388316255ada0e0fcb2d849cce5a894@ispras.ru>
 <20220409191743.6da2268a36e8c9b4ab22c722@nifty.ne.jp>
 <1ecd670b1cdff43e0b0d7e5ee4c9cfc5@ispras.ru>
 <ab3971adb8f441fd16bb62e480547a95@ispras.ru>
X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.30; i686-pc-mingw32)
Mime-Version: 1.0
X-Spam-Status: No, score=-6.0 required=5.0 tests=BAYES_00, DKIM_SIGNED,
 DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, RCVD_IN_DNSWL_NONE,
 SPF_HELO_NONE, SPF_PASS, TXREP,
 T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4
X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on
 server2.sourceware.org
X-BeenThere: cygwin@cygwin.com
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
 <mailto:cygwin-request@cygwin.com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-request@cygwin.com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
 <mailto:cygwin-request@cygwin.com?subject=subscribe>
Cc: Alexey Izbyshev <izbyshev@ispras.ru>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: cygwin-bounces+archive-cygwin=delorie.com@cygwin.com
Sender: "Cygwin" <cygwin-bounces+archive-cygwin=delorie.com@cygwin.com>

On Sat, 09 Apr 2022 14:02:38 +0300
Alexey Izbyshev wrote:
> On 2022-04-09 14:00, Alexey Izbyshev wrote:
> > On 2022-04-09 13:17, Takashi Yano wrote:
> > 
> >> Attaching gdb to the hanging process and dumping stack by 'bt'
> >> command for each thread may diagnose more detail.
> > 
> > I decided to simply look at assembly at the point shown in
> > ProcessHacker stack trace (cygwin1.dll!feinitialise+0x5ecab) to avoid
> > disturbing the process by gdb. And it's clear that the hang is in
> > fhandler_pty_slave::reset_switch_to_pcon() at [1]. I've checked that
> > there were some changes in that function since 3.3.4. Could they fix
> > this deadlock?
> > 
> > [1] 
> > https://cygwin.com/git/?p=newlib-cygwin.git;a=blob;f=winsup/cygwin/fhandler_tty.cc;h=7bef6958c106c5e78cc90e014081022fd3a205bc;hb=cygwin-3_3_4-release
> > 
> 
> Missed the line in the link above: 
> https://cygwin.com/git?p=newlib-cygwin.git;a=blob;f=winsup/cygwin/fhandler_tty.cc;h=7bef6958c106c5e78cc90e014081022fd3a205bc;hb=cygwin-3_3_4-release#l1199

Thanks for finding that. It would be very helpfull if you could
find another process which holds pcon_mutex and where it is stopping.

-- 
Takashi Yano <takashi.yano@nifty.ne.jp>

-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple
