delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2021/04/28/16:17:51

X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C34EE39CE427
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1619641068;
bh=aOOmSJf7mYtW9oFKGZP2Y66C0f9Kc64ZXhqZMMy/S9k=;
h=Subject:To:References:Date:In-Reply-To:List-Id:List-Unsubscribe:
List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:
From;
b=nT/mc3GFbuRheUZLIkS6Lh0kMffOivVrCcm0joYtOUbCkVSNgwOOjfGLu3qKAWCHk
FUbtBMNgkLUqLF0OcyekM9ncwbQvM/54+HRqQWIkrry2hqCwhvLvLvA284Zg9YxcdN
P9yFhHhUMw8/Nu0ykdxcn21YEHctSy3XD3cTokjI=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 98DD5385482C
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 AT cygwin DOT com" <cygwin AT cygwin DOT com>
References: <499327fb-2b0d-d176-152c-58b195391b01 AT libero DOT it>
<20210428233630 DOT 1fd7f4d01d0d452f2f1e7205 AT nifty DOT ne DOT jp>
Message-ID: <d1b90199-1b3f-6a90-177f-85971e537ef7@libero.it>
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>
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 AT cygwin DOT com
X-Mailman-Version: 2.1.29
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
From: M2 via Cygwin <cygwin AT cygwin DOT com>
Reply-To: M2 <m2f2 AT libero DOT it>
Errors-To: cygwin-bounces AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces AT cygwin DOT com>
X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 13SKHoQL027710

On 28/04/2021 16:36, Takashi Yano wrote:
> On Wed, 28 Apr 2021 15:38:13 +0200
> M2 via Cygwin <cygwin AT cygwin DOT com> 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!




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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019