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

Reply via email to