delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2019/07/29/09:19:42

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:from:to:subject:date:message-id:references
:in-reply-to:content-type:content-id:content-transfer-encoding
:mime-version; q=dns; s=default; b=kwBNw49FsPHa8FYwW93Ox6FPVpclL
fGcxFTeq96+niUTkLwQz9RB1VEMDyMuOEjCTBsJqaVQ/Jm7FG5HgRSu+qypBDPqH
Hq1Yl5SkBTgQTNn23cZt9AaMXkkPfex5F7sStDNI8WlyV8JQu6QVquBbMQCivHHE
WDD4J+TAUbLn74=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:from:to:subject:date:message-id:references
:in-reply-to:content-type:content-id:content-transfer-encoding
:mime-version; s=default; bh=vRWtq3JE1HytlyhdhMBr8Ao0ILQ=; b=MMu
cC2SrCQDXY102NmlLEfa8eobhK2k1mlcDM0LFHmJHIVc/vByXuQzbzuT/h5tjh1/
5/uZY0ZKUyv6LnZlihRqLyAPhVeXD3qDDVBWGOSnJQMKBDWwuB+GVhpY+5yC6LSa
olZkJXXtdgHBp22CvgxxyZmF2smh2uMiowDBxd58=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Spam-SWARE-Status: No, score=-9.4 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_2,NORMAL_HTTP_TO_IP,NUMERIC_HTTP_ADDR,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.1 spammy=H*UA:10.0
X-HELO: NAM03-BY2-obe.outbound.protection.outlook.com
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=I+WJJZIXIdAirOpI41bD46ahnyp3FSH5I+kN/sNeJMnedBmL01K9zdujJ5ZurgNisMQwl6yflzSXtxO9uEnq7z527LlKLGrb5aueUkj/D63GRn25TpHlqlcnr8qbuVXuDWgTl2+LY9y0fu4eDtJquoBSK+F4fdQieiv73/vmxcjc3Y8GplbWA3vfU/yDdC2+I4BvD/u7Akvu/QGi1TPxrCOk0FYV0+1y509ExqV19kwTAGY+sIBGSfBbY23LksFwZ3Y5eJoltpY83uB7OhsteNs9rS/f3/rTQ/spx8eagd+zT5NwpDcITbD4dsYTWirwCMnv0aiKaYXAowOi+0KyMQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=XZmRXlC40FOdKuFiKnkJsyYHmldPRDQpB0ArDtlF+gk=; b=Vw7o4EdfDaghJk2jjCW1N3OYENFdJXTpjHDtScvK4bu1AehuC5JS87tEsYDR9B0No95X39ld0Hgf9xQchpnOsj6ltj7sZEqC8eW01avg8lVyy6V5VaAOIFqytb+wT5ahywohtdP9+GKixCtrLxC/P//yqRdR+lA+xpAyI8gijbh3CBnzoMkQBGN3e2G7G6Eo22C7ZJwYu8EJG0PjDQP35/UPL7wVGh6CRl7kUkW14EW1hpS2HohTzUU7ZD+/RYwluJ+Vwebu1mGgqHBVcoG7SbeCpCJOpND+1XL0XiZAUuOgM2sUNqC/lntA1Pn+bXa11XmBjXZHaWU+SWVxVi8VIw==
ARC-Authentication-Results: i=1; mx.microsoft.com 1;spf=pass smtp.mailfrom=cornell.edu;dmarc=pass action=none header.from=cornell.edu;dkim=pass header.d=cornell.edu;arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cornell.edu; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=XZmRXlC40FOdKuFiKnkJsyYHmldPRDQpB0ArDtlF+gk=; b=PAH0OP1N5FegcjuEm88UGNLALaV2SilfuPjzHEaK6GQfjl5OJjIPTuIYBQ14zeISHLva4DQtmFQ+oyUqjeXH+7QkdNVvZy9lDlbr6eDaeRsOnEtTWDcf1e/DYpvM1c4mtieQ4PhVNp0ueFg3vxCOKXg96xdkVzF8q+NAQj91bw8=
From: Ken Brown <kbrown AT cornell DOT edu>
To: "cygwin AT cygwin DOT com" <cygwin AT cygwin DOT com>
Subject: Re: Regression (last snapshot)
Date: Mon, 29 Jul 2019 13:18:45 +0000
Message-ID: <eea273ca-f190-c91a-7892-9407bfcf4326@cornell.edu>
References: <8f6a87faa9c8130241c026889a01d763 AT xs4all DOT nl> <5414d0e1-79d9-cab7-b1bd-4761265bf8bd AT cornell DOT edu> <265a2749-95b6-38aa-a191-7913bfcc98b6 AT cornell DOT edu> <20190722152016 DOT GE21169 AT calimero DOT vinschen DOT de> <20190722155340 DOT GF21169 AT calimero DOT vinschen DOT de> <20190722164509 DOT GG21169 AT calimero DOT vinschen DOT de> <eb8007691b20df0eb8032ca3d2fa445f AT smtp-cloud8 DOT xs4all DOT net> <b3b04db5-7f03-8281-f376-6cd10207ec01 AT cornell DOT edu> <4b59209a91e8384ec000e2724696791c AT smtp-cloud7 DOT xs4all DOT net> <935d8ce5-fd5c-3010-4664-bb2dc9b7ca2f AT cornell DOT edu> <20190729084552 DOT GL11632 AT calimero DOT vinschen DOT de>
In-Reply-To: <20190729084552.GL11632@calimero.vinschen.de>
user-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0
authentication-results: spf=none (sender IP is ) smtp.mailfrom=kbrown AT cornell DOT edu;
x-ms-exchange-purlcount: 1
x-ms-oob-tlc-oobclassifiers: OLM:9508;
received-spf: None (protection.outlook.com: cornell.edu does not designate permitted sender hosts)
x-ms-exchange-senderadcheck: 1
MIME-Version: 1.0
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: ksb2 AT cornell DOT edu
X-IsSubscribed: yes
X-MIME-Autoconverted: from base64 to 8bit by delorie.com id x6TDJOx8032057

On 7/29/2019 4:45 AM, Corinna Vinschen wrote:
> On Jul 27 15:24, Ken Brown wrote:
>> On 7/27/2019 6:21 AM, Houder wrote:
>>> On Fri, 26 Jul 2019 22:12:43, Ken Brown  wrote:
>>>
>>>> On 7/22/2019 2:47 PM, Houder wrote:
>>>
>>>>> The specific regression as reported, has gone.
>>>>>
>>>>> 64-@@ uname -a
>>>>> CYGWIN_NT-6.1 Seven 3.1.0s(0.339/5/3) 2019-07-22 16:43 x86_64 Cygwin
>>>>> 64-@@ ls -lL <(grep bash .bashrc)
>>>>> pr-------- 1 Henri None 0 Jul 22 20:36 /dev/fd/63
>>>>
>>> Over all the behavior has simularity w/ the error reported by David Karr:
>>>
>>>       https://cygwin.com/ml/cygwin/2019-07/msg00150.html
>>>       ( Piping input from subprocess loses track of temp file )
>>
>> Thanks, I hadn't noticed that.
>>
>> The situation is more complicated than what I reported.  First, it happens even
>> in cygwin-3.0.7, as David Karr's report suggests.  Second, it's true that I can
>> only reproduce it under X11, but the pattern is not as regular as I thought.  I
>> just ran the ls command 1000 times in an xterm window under cygwin-3.0.7, and I
>> got the "Broken pipe" error 390 times, with a varying number of consecutive
>> successful runs between the errors.
>>
>> Repeating this under the 20190722 or 20190725 snapshots gave slightly worse
>> results (close to 500 errors).  Using my own unoptimized build of cygwin1.dll,
>> the error count went up to about 650.
> 
> I just tried this myself and I can't reproduce the problem.  1000 runs,
> no error.

Interesting.  And you ran this under X11 in an xterm window?

>> I tried running under gdb, but I couldn't get grep to fail.  More precisely, I
>> didn't see an error message from grep.  Every run looked like this:
>>
>> $ gdb bash
>> GNU gdb (GDB) (Cygwin 8.2.1-1) 8.2.1
>> [...]
>> (gdb) r -c 'ls -lL <(grep bash .bashrc)'
>> Starting program: /usr/bin/bash -c 'ls -lL <(grep bash .bashrc)'
>> [...]
>> pr-------- 1 kbrown None 0 2019-07-27 11:07 /dev/fd/63
>> [...]
>> [Inferior 1 (process 21712) exited normally]
>>
>> It would be better to be able to debug ls and/or grep, but I don't know how to
>> get to subprocesses in gdb.  And I think I have to start with 'gdb bash' in
>> order for the process substitution to happen.
> 
> Yeah, subprocess debugging is a problem in GDB.  Given how this works,
> you can at least take grep out of the picture.  Bash is doing all the
> lifting, so it's just bash and ls.   Did you try to reproduce this under
> strace?

Yes, but there I get an error (even under mintty) for a different reason:

$ strace -o trace.out ls -lL <(grep bash .bashrc) 
ls: cannot access '/dev/fd/63': No such file or directory

The strace output shows a call to fhandler_process::exists on /proc/45036/fd/63; 
here 45036 is the PID of 'ls'.  And then I see an EBADF error.  But I think 
what's happening here might be that bash is parsing '<(grep bash .bashrc)' too 
soon, so that '/dev/fd/63' isn't related to the 'ls' command.

By the way, I've just tried a different experiment, in which I simplify the ls 
command to 'ls <(grep bash .bashrc)'.  When I run this under xterm, I get the 
broken pipe error 98% of the time or more.  But it's fine under mintty.

Ken

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


- Raw text -


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