X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A108A3950434 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1619653203; bh=JbBx454scTIaaDucQqZrX3gR0ZV9YPMARJH/hCRGgcw=; h=Date:To:Subject:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=gzbddewqDPH4kBhQeU7SvqmN7DLx8KyF3lFaeARw2pj3TrCOAdKPk4QXG+pwPuIti xIiqLRuqYh3Gg5IRn0YXYriZTkv8gCaplZmF/x5MZrn9zA9dVOED2Rxrw3l4FUB+S2 w+b5toM7R9T4ElP+SBptGoQygwaCNRJ0o/bSaPdg= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 7456439450E8 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-06.nifty.com 13SNdMKU014725 X-Nifty-SrcIP: [124.155.50.190] Date: Thu, 29 Apr 2021 08:39:30 +0900 To: cygwin AT cygwin DOT com Subject: Re: 3.2.0-1: possible regression Cygwin DDL bug (W10) when using multiple pipes Message-Id: <20210429083930.2009d62275677f9c8c93eee6@nifty.ne.jp> In-Reply-To: References: <499327fb-2b0d-d176-152c-58b195391b01 AT libero DOT it> <20210428233630 DOT 1fd7f4d01d0d452f2f1e7205 AT nifty DOT ne DOT jp> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.30; i686-pc-mingw32) Mime-Version: 1.0 X-Spam-Status: No, score=-4.1 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 autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: cygwin AT cygwin DOT 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: , From: Takashi Yano via Cygwin Reply-To: Takashi Yano Content-Type: text/plain; charset="utf-8" Errors-To: cygwin-bounces AT cygwin DOT com Sender: "Cygwin" Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 13SNe6ce009945 On Wed, 28 Apr 2021 22:17:44 +0200 M2 via Cygwin wrote: > On 28/04/2021 16:36, Takashi Yano wrote: > > On Wed, 28 Apr 2021 15:38:13 +0200 > > M2 via Cygwin wrote: > >> Hi, > >> I found a possible regression issue between cygwin 3.1.7-1 and 3.2.0-1. > >> > >> The issue happens with "short" output in multiple piping, such as the following example: > >> > >> dir | grep c | sed "s/^/foo/" | sed "s/oo/OO/" > >> > >> (the case I run is different, but the bug is exposed by something silly/simple as this) > >> > >> > >> In 3.1.7, all is fine and you get what you expect. > >> > >> In 3.2.0, 3 out of 4 executions hang: the last command on the pipeline (i.e. `sed "s/oo/OO/"`) > >> hangs forever, while all preceding commands (i.e. both `grep c` and `sed "s/^/foo/"`) terminate correctly. > >> > >> Attached, cygcheck outputs for both 3.1.7 and 3.2.0 > > I cannot reproduce your problem. > > > > In 64 bit cygwin: > > > > ... > > > > In 32 bit cygwin: > > ... > > > Some clarification: I run a mixed configuration with Cygwin commands > mostly ran in CMD.EXE shell. > > In my installation it seems that output from a WINDOWS console program > causes trouble when piped to a CYGWIN process. > > Close repetition such as loops tend to cause the bug. > > > Consider the following cases. I have CYGWIN\BIN in my (CMD) PATH, and > drive prefix set to "/" > > Case 1: BASH shell - all CYGWIN commands - WORKS > >  for i in {1..20} ; do ls -la | grep . | sed s/./foo/ | sed s/oo/OO/ ; done > > > Case 2: BASH shell - first command is a WINDOWS command - WORKS > >  for i in {1..20} ; do /c/windows/system32/ipconfig.exe /all | grep . | > sed s/./foo/ | sed s/oo/OO/ ; done > > > Case 3: CMD shell - all CYGWIN commands - WORKS > >  for /l %i in (1,1,20) do ls -la | grep . | sed s/./foo/ | sed s/oo/OO/ > > > Case 4: CMD shell - first command is a WINDOWS command - HANGS 50% of times > >  for /l %i in (1,1,20) do ipconfig.exe /all | grep . | sed s/./foo/ | > sed s/oo/OO/ I got it. Could you please try the latest cygwin snapshot? https://cygwin.com/snapshots/ Thanks. -- Takashi Yano -- 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