From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from libero.it (smtp-16.italiaonline.it [213.209.10.16]) by sourceware.org (Postfix) with ESMTPS id 98DD5385482C for ; Wed, 28 Apr 2021 20:17:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 98DD5385482C Received: from [192.168.1.42] ([93.36.162.82]) by smtp-16.iol.local with ESMTPA id bqcylUEvPf2ANbqcylgSNx; Wed, 28 Apr 2021 22:17:44 +0200 x-libjamoibt: 1601 X-CNFS-Analysis: v=2.4 cv=Adt0o1bG c=1 sm=1 tr=0 ts=6089c2e8 cx=a_exe a=Ie/zTReq2ru65vTQOZ14hg==:117 a=Ie/zTReq2ru65vTQOZ14hg==:17 a=IkcTkHD0fZMA:10 a=w_pzkKWiAAAA:8 a=U0QGnskjTDOJslGNdJUA:9 a=QEXdDO2ut3YA:10 a=sRI3_1zDfAgwuvI8zelB:22 Subject: Re: 3.2.0-1: possible regression Cygwin DDL bug (W10) when using multiple pipes To: "cygwin@cygwin.com" References: <499327fb-2b0d-d176-152c-58b195391b01@libero.it> <20210428233630.1fd7f4d01d0d452f2f1e7205@nifty.ne.jp> From: M2 Message-ID: Date: Wed, 28 Apr 2021 22:17:44 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.10.0 MIME-Version: 1.0 In-Reply-To: <20210428233630.1fd7f4d01d0d452f2f1e7205@nifty.ne.jp> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-CMAE-Envelope: MS4xfJLgVmtwl1zY5mAoSjIxXJxOHvfiAzMR3333aY2LjaJepd5p/baV+mZGz+FdOK/qgkw7pEts2zLPOttMqDGeEdLdI6kU3qK1RSJIbiCC61xBOLZJMufN Tkayqjx0lGo4XELSf0tgJ8BnxpQ8MpnscICbRIRmofeF52QBvYMU2gFkF+Y7ksQgsYd9jASAhXl1IQ== X-Spam-Status: No, score=1.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, NICE_REPLY_A, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Level: * X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) 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: Wed, 28 Apr 2021 20:17:47 -0000 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/ Thanks!