public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Takashi Yano <takashi.yano@nifty.ne.jp>
To: cygwin@cygwin.com
Subject: Re: 3.2.0-1: possible regression Cygwin DDL bug (W10) when using multiple pipes
Date: Thu, 29 Apr 2021 08:39:30 +0900	[thread overview]
Message-ID: <20210429083930.2009d62275677f9c8c93eee6@nifty.ne.jp> (raw)
In-Reply-To: <d1b90199-1b3f-6a90-177f-85971e537ef7@libero.it>

On Wed, 28 Apr 2021 22:17:44 +0200
M2 via Cygwin <cygwin@cygwin.com> wrote:
> 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/

I got it. Could you please try the latest cygwin snapshot?
https://cygwin.com/snapshots/

Thanks.

-- 
Takashi Yano <takashi.yano@nifty.ne.jp>

  reply	other threads:[~2021-04-28 23:39 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-28 13:38 M2
2021-04-28 14:36 ` Takashi Yano
2021-04-28 20:17   ` M2
2021-04-28 23:39     ` Takashi Yano [this message]
2021-04-30 13:05       ` M2

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210429083930.2009d62275677f9c8c93eee6@nifty.ne.jp \
    --to=takashi.yano@nifty.ne.jp \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).