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 744083857404
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-01.nifty.com 22P5ghch018345
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.ne.jp;
 s=dec2015msa; t=1648186963;
 bh=lLNwbkpW9pMkwtqDaQrYCxDVKUtP1Jv9HjgPobCy82g=;
 h=Date:From:To:Cc:Subject:In-Reply-To:References:From;
 b=Iwcw7CnN1DHjpFfm/5SWh91SW+mhoTxFaIoSbLR3RpGqwATR0gppB8OYhNT/5xbw8
 lo2/dzIHF1nSWTnz44IqFh8bHqgMoK599K9lZYknG2MBryBDw8hReY0kJfKnD+j92h
 TS2GeARLlnaPF3AA1ATugVoA7K2tpuJX3HrKu4m+wzmNcrv4fTC3s/XLGDPJ4Zupw+
 igzlkTSsSsDuYYmC1ZjK59ZDzx5Ag4J5UlL+C23t71jfeyIpzqdQLcOR88lQ3QWkgu
 xQ5bL+uGNKynnBlQoqcZTDmVoEdKwTG2J5JHMK4tWNc20sBX9AbK6N6d/QJJSvcDi3
 r6SLCB77HtMvQ==
X-Nifty-SrcIP: [119.150.44.95]
Date: Fri, 25 Mar 2022 14:42:53 +0900
From: Takashi Yano <takashi.yano@nifty.ne.jp>
To: cygwin@cygwin.com
Subject: Re: pipe hang issue when running as SYSTEM
Message-Id: <20220325144253.4053d19d7e7b0243dcefa79e@nifty.ne.jp>
In-Reply-To: <alpine.BSO.2.21.2203242039010.56460@resin.csoft.net>
References: <alpine.BSO.2.21.2203211141320.56460@resin.csoft.net>
 <20220322191807.8348f074683c127b1723c5c2@nifty.ne.jp>
 <20220322221756.2b7e80ec0a51e7ebd9df5a53@nifty.ne.jp>
 <alpine.BSO.2.21.2203242039010.56460@resin.csoft.net>
X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.30; i686-pc-mingw32)
Mime-Version: 1.0
X-Spam-Status: No, score=-4.4 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: Jeremy Drake <cygwin@jdrake.com>
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 Thu, 24 Mar 2022 20:42:50 -0700 (PDT)
Jeremy Drake wrote:
> On Tue, 22 Mar 2022, Takashi Yano wrote:
> 
> > > Thanks for the report. This is expected problem as mentioned
> > > in b531d6b commit message. However, I could not imagin the
> > > situation that the service has multiple writer for the pipe
> > > and one of them is a non-cygwin app.
> > >
> > > Question is: Does the docker invoke the command using SYSTEM
> > > account? Or is the processes in docker determined as running
> > > as a service?
> >
> > I confirmed the processes in Windows docker are running as
> > well_known_service_sid. Let me consider a while.
> >
> 
> Just got another report to MSYS2 of this behavior, this time from a Gitlab
> CI runner that is running as a service and trying to pipe output from
> Microsoft cl.exe while running configure.  This user reports that 3.3.4
> with your "[PATCH v2] Cygwin: pipe: Avoid deadlock for non-cygwin writer."
> applied to it does not solve the problem.
> 
> https://github.com/msys2/MSYS2-packages/issues/2893

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.

-- 
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
