From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from conssluserg-03.nifty.com (conssluserg-03.nifty.com [210.131.2.82]) by sourceware.org (Postfix) with ESMTPS id 129633858D28 for ; Sat, 9 Apr 2022 11:47:12 +0000 (GMT) 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 Received: from Express5800-S70 (ak044095.dynamic.ppp.asahi-net.or.jp [119.150.44.95]) (authenticated) by conssluserg-03.nifty.com with ESMTP id 239BkJlW028951; Sat, 9 Apr 2022 20:46:20 +0900 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 To: cygwin@cygwin.com Cc: Alexey Izbyshev Subject: Re: Deadlock of the process tree when running make Message-Id: <20220409204619.dd0e53902d5e108ef462e510@nifty.ne.jp> In-Reply-To: References: <9388316255ada0e0fcb2d849cce5a894@ispras.ru> <20220409191743.6da2268a36e8c9b4ab22c722@nifty.ne.jp> <1ecd670b1cdff43e0b0d7e5ee4c9cfc5@ispras.ru> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.30; i686-pc-mingw32) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Apr 2022 11:47:16 -0000 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