From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.ispras.ru (mail.ispras.ru [83.149.199.84]) by sourceware.org (Postfix) with ESMTPS id F336B385B236 for ; Mon, 11 Apr 2022 10:10:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org F336B385B236 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=ispras.ru Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=ispras.ru Received: from mail.ispras.ru (unknown [83.149.199.84]) by mail.ispras.ru (Postfix) with ESMTPSA id 1A94640594EB; Mon, 11 Apr 2022 10:10:15 +0000 (UTC) MIME-Version: 1.0 Date: Mon, 11 Apr 2022 13:10:15 +0300 From: Alexey Izbyshev To: Takashi Yano Cc: cygwin@cygwin.com Subject: Re: Deadlock of the process tree when running make In-Reply-To: <20220411173526.6243b9492e0fc3d4132a58a8@nifty.ne.jp> References: <9388316255ada0e0fcb2d849cce5a894@ispras.ru> <20220409191743.6da2268a36e8c9b4ab22c722@nifty.ne.jp> <1ecd670b1cdff43e0b0d7e5ee4c9cfc5@ispras.ru> <20220409204619.dd0e53902d5e108ef462e510@nifty.ne.jp> <907ce1b4416a826cb07990dd601bd687@ispras.ru> <20220410015753.753e2a238513eaf2a3da81e9@nifty.ne.jp> <20220410025410.196aa0a04368147dbbb31d3e@nifty.ne.jp> <7204ed0aa2d6b3fcfb239010e6b67646@ispras.ru> <20220410163432.00dd7b9f81f8f322d97688f2@nifty.ne.jp> <0e1a53626639cb21369225ff9092ecfc@ispras.ru> <20220411173526.6243b9492e0fc3d4132a58a8@nifty.ne.jp> User-Agent: Roundcube Webmail/1.4.4 Message-ID: X-Sender: izbyshev@ispras.ru Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_00, DOS_RCVD_IP_TWICE_B, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=no 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: Mon, 11 Apr 2022 10:10:21 -0000 On 2022-04-11 11:35, Takashi Yano wrote: > On Sun, 10 Apr 2022 23:49:29 +0300 > Alexey Izbyshev wrote: >> >> Is it safe to create an *inheritable* handle in another process here? >> Could it be that the target process spawns a child at the wrong moment >> (e.g. before it even knows about the newly created handle), and that >> handle unintentionally leaks into the child, triggering the hang >> afterwards? > > Thanks for finding that! As you pointed out, hWritePipe should not > be inheritable. That might be the cause. > > A countermeasure version is available at the following location: > https://tyan0.yr32.net/cygwin/x86/test/cygwin1-20220411.dll.xz > https://tyan0.yr32.net/cygwin/x86_64/test/cygwin1-20220411.dll.xz > > Could you please test? To keep the hanging tree, please install > cygwin another directory, and replace cygwin1.dll with the > countermeasure version. > Thank you for providing the binaries! I've started testing in a separate cygwin installation on the same machine, as you suggested. The hang previously took many hours to reproduce, so I'll keep tests running for a while and then report back. Alexey