From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from conssluserg-06.nifty.com (conssluserg-06.nifty.com [210.131.2.91]) by sourceware.org (Postfix) with ESMTPS id 9AF3B3946C36 for ; Sat, 9 Apr 2022 10:18:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 9AF3B3946C36 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-06.nifty.com with ESMTP id 239AHhui024682; Sat, 9 Apr 2022 19:17:44 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-06.nifty.com 239AHhui024682 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.ne.jp; s=dec2015msa; t=1649499464; bh=yVRNlv75a1mPlPbfGAj1cGuXVhJ9PaVOR1A68yOJpQ0=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=Bw8bgw/y6LMCxO1ZSqcg35+nI84dSwGiGcCcYU9f2AKsRv3FkrcFkpWY8/xKbtY8x PURgJ4J7ZzWWzy9BEDsQftyEFFaAiD50atK7B68iwFGpFe32BDr3s5qy0tB3D1jhkz aL24VLSxX1YWxyIbrWMhh1+HJfINZrgQjHaFwAWYlItE/5kydNDC5Wt2+03ljNmPNZ 9i4M7QRkMVETJyNbSVTteJ5E/m0wOoSC2fQnA4sya6GgolvCb1EV8Q35vCze4dBX86 g0+aM//TvDaGcz173jevSkh+eo/HLDtJHtkYHSz25Tq9AEKDS14ABC+axhfiXuLRtg mLyJLnE1pri7w== X-Nifty-SrcIP: [119.150.44.95] Date: Sat, 9 Apr 2022 19:17:43 +0900 From: Takashi Yano To: cygwin@cygwin.com Cc: Alexey Izbyshev Subject: Re: Deadlock of the process tree when running make Message-Id: <20220409191743.6da2268a36e8c9b4ab22c722@nifty.ne.jp> In-Reply-To: <9388316255ada0e0fcb2d849cce5a894@ispras.ru> References: <9388316255ada0e0fcb2d849cce5a894@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 10:18:35 -0000 On Fri, 08 Apr 2022 00:53:31 +0300 Alexey Izbyshev wrote: > Hi, > > I'm using 32-bit Cygwin 3.3.4 on 64-bit Windows 10 21H2. When running > parallel make (for testing my project), very rarely I get the whole > process tree hanging at some seemingly random point. An example of such > a tree: > > make-+-make-+-bash---find > | |-bash---find > | |-bash---find > | |-bash---find > | |-bash---find > | `-bash---javac > `-make-+-bash---bash---bash---readlink > `-bash---bash---bash-+-grep > `-grep > > (In the above tree, javac is the zombie parent of a native javac, and > the latter doesn't exist at this point). > > I got such hang two times while running make in a loop for several days. > ProcessHacker shows that all leaf processes are single-threaded and are > stuck on WaitForSingleObject(). > > I've skimmed git log of cygwin-3_3-branch after cygwin-3_3_4-release, > but couldn't find anything that seems definitely related. > > Has anybody seen something like this? > > Is there any way I can get useful data for diagnosing this hang from the > process tree that I currently have hanging (I'm going to keep it for > now)? Otherwise, what would be the best strategy? Attaching gdb to the hanging process and dumping stack by 'bt' command for each thread may diagnose more detail. -- Takashi Yano