From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from conssluserg-05.nifty.com (conssluserg-05.nifty.com [210.131.2.90]) by sourceware.org (Postfix) with ESMTPS id 16295385801B for ; Fri, 25 Mar 2022 11:11:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 16295385801B 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-05.nifty.com with ESMTP id 22PBB3Cq015737; Fri, 25 Mar 2022 20:11:03 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-05.nifty.com 22PBB3Cq015737 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.ne.jp; s=dec2015msa; t=1648206663; bh=oauF6QS4HbhMzOHHf7EuM7deEZNZ3gk5KPgOVfuRxPw=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=bC4kkFa/qtO5lapskuDTLUNQle0eVLJbKTt5QYTdbCUJu7kTSr+3OYiBfQpqE/ec7 iYoNGyQ5ir+XvPbkTokHgHwLYj3RpYFhZxgAJRP+sE95A5IhzTFXLobuUTBF0JgNqI 4tpaTwmC0Pkci9rnkiI8lZ664LPqfAiwsjSkk3En+LD/1dOG4IoG7lJ7BuSxYLk+5q 7IYvhWgSeDQgSKdfy9qhi7niz7rytIcTCfOIVZGAPxUbj+J3TySKzaSJgtbrf0ABhT ryZBMRng9LxhaIbacW6+g74HTof7VkIzorwpmrXRWTvoTIVIvIcUaQDhvMT392a68h +msEneymXIdxw== X-Nifty-SrcIP: [119.150.44.95] Date: Fri, 25 Mar 2022 20:11:04 +0900 From: Takashi Yano To: cygwin@cygwin.com Cc: Jeremy Drake Subject: Re: pipe hang issue when running as SYSTEM Message-Id: <20220325201104.d4524e351143acbee689161f@nifty.ne.jp> In-Reply-To: References: <20220322191807.8348f074683c127b1723c5c2@nifty.ne.jp> <20220322221756.2b7e80ec0a51e7ebd9df5a53@nifty.ne.jp> <20220325144253.4053d19d7e7b0243dcefa79e@nifty.ne.jp> 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=-4.3 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: Fri, 25 Mar 2022 11:11:23 -0000 On Fri, 25 Mar 2022 00:09:59 -0700 (PDT) Jeremy Drake wrote: > On Fri, 25 Mar 2022, Takashi Yano wrote: > > > I can confirm the sample script hangs indeed if the script is > > running as SYSTEM account. However, in my test, the patch solves > > the issue. > > > > It would be very helpfull if a simple github repository with > > github actions, which can reproduce the issue, is provided. > > After much fighting with docker on windows, > https://github.com/jeremyd2019/msys2-pipe-hang-test/runs/5688176578?check_suite_focus=true Thanks much! I could reproduce the issue even with the patch. I also noticed what is the cause. The problem is that the command: docker run msys2-base c:\msys64\usr\bin\bash -lc "/c/test.sh" does not allocate tty. Therefore, kill_pgrp(__SIGNONCYGCHLD) is not called. If you use: docker run -t msys2-base c:\msys64\usr\bin\bash -lc "/c/test.sh" the problem does not occur. I will submit v3 patch shortly. -- Takashi Yano