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:date:from:to:cc:subject:message-id:reply-to :references:mime-version:content-type:in-reply-to; q=dns; s= default; b=Xtq7UJA+pydNxD/njiUw/zQnMhXiKZwhnBEJQuaXJLR5CzyB1jSN6 0DfEbSJZBGNwbc7Dowpx3mPMJH82mYbzC2W+VXnebjsG09BoDQZeeby29uFpzGdd 1hUm3jV3rBmC6Tr7kiSQc0WUrHPwt5qPlGjSmbsnWoVPPUFcRDAghY= 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:date:from:to:cc:subject:message-id:reply-to :references:mime-version:content-type:in-reply-to; s=default; bh=wEsAyB2WPb6e+kUU/zkMZxdqOj8=; b=bshHyzovBA4Rw/RihqqYNyTbhVon CR0XZGQXXewT0+VxMOy6b5gbXALBh3MLEoo9Wb7qKtmSorGBcUwys0o4orndXUiR In5F+tiKAyC3X+hk928bEv105yRq1KQbDZHJfmxJLUCtjHT9YJka1D1spD6LyDwO DNG9gnWV/0Nfbts= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , 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=-106.3 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_2,GOOD_FROM_CORINNA_CYGWIN,NORMAL_HTTP_TO_IP,NUMERIC_HTTP_ADDR,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 spammy= X-HELO: mout.kundenserver.de Date: Mon, 22 Jul 2019 17:53:40 +0200 From: Corinna Vinschen To: Ken Brown Cc: "cygwin AT cygwin DOT com" , "Erik M. Bray" Subject: Re: Regression (last snapshot) Message-ID: <20190722155340.GF21169@calimero.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: Ken Brown , "cygwin AT cygwin DOT com" , "Erik M. Bray" 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> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="IvGM3kKqwtniy32b" Content-Disposition: inline In-Reply-To: <20190722152016.GE21169@calimero.vinschen.de> User-Agent: Mutt/1.11.3 (2019-02-01) --IvGM3kKqwtniy32b Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Jul 22 17:20, Corinna Vinschen wrote: > On Jul 22 13:44, Ken Brown wrote: > > On 7/22/2019 8:23 AM, Ken Brown wrote: > > > On 7/20/2019 6:55 PM, Houder wrote: > > >> 64-@@ uname -a > > >> CYGWIN_NT-6.1 Seven 3.1.0s(0.339/5/3) 2019-07-12 15:28 x86_64 Cygwin > > >> > > >> 64-@@ ls -lL <(grep bash .bashrc) > > >> ls: /dev/fd/63: No such file or directory > > >> pr-------- 1 Henri None 0 Jul 21 00:41 /dev/fd/63 > > >=20 > > > Thanks for the report. This is probably caused by my new FIFO code. = I'm > > > looking into it. > >=20 > > Actually, a bisection shows that the regression is due to the following= commit: > >=20 > > commit 2607639992f6600135532831c8357c10cb248821 > > Author: Erik M. Bray > > Date: Wed Apr 10 17:05:22 2019 +0200 > >=20 > > Improve error handling in /proc/[pid]/ virtual files. > >=20 > > * Changes error handling to allow /proc/[pid]/ virtual files to be > > empty in some cases (in this case the file's formatter should re= turn > > -1 upon error, not 0). > >=20 > > * Better error handling of /proc/[pid]/stat for zombie processes: > > previously trying to open this file on zombie processes resulted > > in an EINVAL being returned by open(). Now the file can be read, > > and fields that can no longer be read are just zeroed. > >=20 > > * Similarly for /proc/[pid]/statm for zombie processes. > >=20 > > * Similarly for /proc/[pid]/maps for zombie processes (in this cas= e the > > file can be read but is zero-length, which is consistent with ob= served > > behavior on Linux. > >=20 > >=20 > > Erik, can you take a look? >=20 > I have a hunch. It's this change: >=20 > @@ -355,7 +355,7 @@ fhandler_process::fill_filebuf () > } > else > filesize =3D process_tab[fileid].format_func (p, filebuf); > - return !filesize ? false : true; > + return filesize < 0 ? false : true; > } > return false; > } >=20 > The formatter for /proc/PID/fd, format_process_fd, returns *valid* > negative values. But the above patch treats all negative values as > error now. >=20 > The fact that format_process_fd returns negative values has historical > reasons. Negative values of type virtual_ftype_t are files, positive > values are directories. >=20 > One way to fix this is to change this to all positive values. At a > first glance I don't see any check for an explicit negative > virtual_ftype_t value, especially not in the only consumer > path_conv::check in path.cc, and the simple numbers have long been > replaced with enum values. A second glance shows a few problems in the code... Corinna --=20 Corinna Vinschen Cygwin Maintainer --IvGM3kKqwtniy32b Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEoVYPmneWZnwT6kwF9TYGna5ET6AFAl013AQACgkQ9TYGna5E T6DJUg//fL7SCDKA3O9WyT4rS5qmrVABNW4teQ6pOrmMbjfzLBvpB07CFpwgQ2en WOML0uU6sec4R0z6BPWjatL/qFN4+Q2vXHaRmAdeptKyVbPiPj/JSFAxFhBoAlK5 bqSNzJ8xHgXXFt46nfZNknNmB5vBVlYsZAKqO8P3MLaLT1pZhvSEYJthnKNcIhQs CXWWDkp1Dt8ArMJZ5UbD9RMna6Z0k+0BII6DONh90WhQQr5P181qNSDqVLdeZeE8 gGMbM1LsVDQEobfI8GeB06ds6cm7pjPhndPMmOv/ReYxxEf/qKW824BciS1z0x5Y s+4P8StVSX9WPrjZoe2ssc4ojpsBvKYwUXTckgox5rSOSyeYFnj7YNlflLKUvHKN 0o11Ytnfc7/HfipP5qfr/CEru1NKH/p2nw6Xn7Y6jO7BYXYdcZ4GWYd7cCxsJ73I LwDwwFRrrkW3++IzmKKcvhXB5zU3iT4sa6eGT3Zz36XLTZmGXhHg/fBwpvTJbmb/ BS925k+B/7oWjs9fADbwfwh9t+kQMUM8pSxafgADFv4VrYGb/AS+v2I84Wj1asiX PuPOQsRVriS+cZzA91vtxsH4uNspmkVWOUGd6EQJAkGbRLhX3231v8Zo+WcBWuRz v8Yl5X1M/uFeniMW0Vl5BN2dGYaR1dYiDd3Le2aSnWd41ZYObbA= =Bm40 -----END PGP SIGNATURE----- --IvGM3kKqwtniy32b--