From unknown Fri Aug 15 15:34:04 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#33946 <33946@debbugs.gnu.org> To: bug#33946 <33946@debbugs.gnu.org> Subject: Status: tail -f stops abruptly in AIX when piped. Reply-To: bug#33946 <33946@debbugs.gnu.org> Date: Fri, 15 Aug 2025 22:34:04 +0000 retitle 33946 tail -f stops abruptly in AIX when piped. reassign 33946 coreutils submitter 33946 "Ayappan P2" severity 33946 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 01 12:05:25 2019 Received: (at submit) by debbugs.gnu.org; 1 Jan 2019 17:05:25 +0000 Received: from localhost ([127.0.0.1]:44114 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1geNTo-0008Kf-In for submit@debbugs.gnu.org; Tue, 01 Jan 2019 12:05:25 -0500 Received: from eggs.gnu.org ([208.118.235.92]:44357) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1geLLT-000503-Nn for submit@debbugs.gnu.org; Tue, 01 Jan 2019 09:48:40 -0500 Received: from lists.gnu.org ([208.118.235.17]:37165) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1geLLT-0007Pi-H8 for submit@debbugs.gnu.org; Tue, 01 Jan 2019 09:48:39 -0500 Received: from eggs.gnu.org ([208.118.235.92]:58578) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1geLLS-0006vy-NK for bug-coreutils@gnu.org; Tue, 01 Jan 2019 09:48:39 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.1 required=5.0 tests=BAYES_50,HTML_MESSAGE, RCVD_IN_DNSWL_LOW autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1geLLO-0007ML-LP for bug-coreutils@gnu.org; Tue, 01 Jan 2019 09:48:38 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:46946) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1geLLO-0007JH-Cs for bug-coreutils@gnu.org; Tue, 01 Jan 2019 09:48:34 -0500 Received: from pps.filterd (m0098409.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id x01EhvNO001630 for ; Tue, 1 Jan 2019 09:48:30 -0500 Received: from smtp.notes.na.collabserv.com (smtp.notes.na.collabserv.com [192.155.248.66]) by mx0a-001b2d01.pphosted.com with ESMTP id 2pr5qa9y0q-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 01 Jan 2019 09:48:30 -0500 Received: from localhost by smtp.notes.na.collabserv.com with smtp.notes.na.collabserv.com ESMTP for from ; Tue, 1 Jan 2019 14:48:29 -0000 Received: from us1a3-smtp07.a3.dal06.isc4sb.com (10.146.103.14) by smtp.notes.na.collabserv.com (10.106.227.127) with smtp.notes.na.collabserv.com ESMTP; Tue, 1 Jan 2019 14:48:27 -0000 Received: from us1a3-mail127.a3.dal06.isc4sb.com ([10.146.45.135]) by us1a3-smtp07.a3.dal06.isc4sb.com with ESMTP id 2019010114482641-324783 ; Tue, 1 Jan 2019 14:48:26 +0000 Subject: tail -f stops abruptly in AIX when piped. To: bug-coreutils@gnu.org From: "Ayappan P2" Date: Tue, 1 Jan 2019 20:18:26 +0530 X-KeepSent: C427FA59:6F671430-00258375:00505251; type=4; name=$KeepSent X-Mailer: IBM Notes Release 9.0.1FP10 SHF68 March 06, 2018 X-LLNOutbound: False X-Disclaimed: 56435 X-TNEFEvaluated: 1 x-cbid: 19010114-6357-0000-0000-000008F52AAF X-IBM-SpamModules-Scores: BY=0; FL=0; FP=0; FZ=0; HX=0; KW=0; PH=0; SC=0.439231; ST=0; TS=0; UL=0; ISC=; MB=0.001681 X-IBM-SpamModules-Versions: BY=3.00010328; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000272; SDB=6.01140220; UDB=6.00593327; IPR=6.00920436; BA=6.00006191; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00024929; XFM=3.00000015; UTC=2019-01-01 14:48:29 X-IBM-AV-DETECTION: SAVI=unsuspicious REMOTE=unsuspicious XFE=unused X-IBM-AV-VERSION: SAVI=2019-01-01 13:49:36 - 6.00009413 x-cbparentid: 19010114-6358-0000-0000-000054F12DFB Message-Id: Content-type: multipart/alternative; boundary="0__=8FBB09E6DFC3D4C18f9e8a93df938690918c8FBB09E6DFC3D4C1" Content-Disposition: inline MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-01-01_08:, , signatures=0 X-Proofpoint-Spam-Reason: safe X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy] X-Received-From: 148.163.156.1 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Tue, 01 Jan 2019 12:05:23 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) --0__=8FBB09E6DFC3D4C18f9e8a93df938690918c8FBB09E6DFC3D4C1 Content-type: text/plain; charset=US-ASCII Content-Transfer-Encoding: Quoted-printable Hi, I am running coreutils 8.30 in AIX machine and it seems like " tail -f " is not working as it used to be when the output is piped. # ./tail -f test_file | grep 123 (1) root @ aixoss-automation-3: 6.1.0.0: / It stops immediately and it seems like this commit https://github.com/coreutils/coreutils/commit/ce0415fda108b7ec35181118fd7a2= c9ee70331ee has introduce this behavior. I checked in Linux with coreutils 8.30 where it works as like earlier versions. Thanks Ayappan P --0__=8FBB09E6DFC3D4C18f9e8a93df938690918c8FBB09E6DFC3D4C1 Content-Transfer-Encoding: quoted-printable Content-type: text/html; charset=US-ASCII Content-Disposition: inline

Hi,

I am run= ning coreutils 8.30 in AIX machine and it seems like " tail -f " = is not working as it used to be when the output is piped.

# ./tail -f test=5Ffile | grep 123

(1) root @ aixoss-automation-3: 6.1.0.0: /

It stops immediately and it seems like this commit https://github.com/coreutils/coreutils/co= mmit/ce0415fda108b7ec35181118fd7a2c9ee70331ee h= as introduce this behavior.

I checked in Lin= ux with coreutils 8.30 where it works as like earlier versions.
<= br>Thanks
Ayappan P
--0__=8FBB09E6DFC3D4C18f9e8a93df938690918c8FBB09E6DFC3D4C1-- From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 03 12:39:45 2019 Received: (at 33946) by debbugs.gnu.org; 3 Jan 2019 17:39:45 +0000 Received: from localhost ([127.0.0.1]:45926 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gf6y1-0001gy-TB for submit@debbugs.gnu.org; Thu, 03 Jan 2019 12:39:45 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:43580) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gf6y0-0001gq-9v for 33946@debbugs.gnu.org; Thu, 03 Jan 2019 12:39:36 -0500 Received: from pps.filterd (m0098394.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id x03Hd2SQ126237 for <33946@debbugs.gnu.org>; Thu, 3 Jan 2019 12:39:35 -0500 Received: from smtp.notes.na.collabserv.com (smtp.notes.na.collabserv.com [192.155.248.90]) by mx0a-001b2d01.pphosted.com with ESMTP id 2psmtu7gc8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for <33946@debbugs.gnu.org>; Thu, 03 Jan 2019 12:39:34 -0500 Received: from localhost by smtp.notes.na.collabserv.com with smtp.notes.na.collabserv.com ESMTP for <33946@debbugs.gnu.org> from ; Thu, 3 Jan 2019 17:39:33 -0000 Received: from us1a3-smtp07.a3.dal06.isc4sb.com (10.146.103.14) by smtp.notes.na.collabserv.com (10.106.227.141) with smtp.notes.na.collabserv.com ESMTP; Thu, 3 Jan 2019 17:39:32 -0000 Received: from us1a3-mail127.a3.dal06.isc4sb.com ([10.146.45.135]) by us1a3-smtp07.a3.dal06.isc4sb.com with ESMTP id 2019010317393170-752250 ; Thu, 3 Jan 2019 17:39:31 +0000 To: 33946@debbugs.gnu.org In-Reply-To: Subject: bug#33946: tail -f stops abruptly in AIX when piped. From: "Ayappan P2" Date: Thu, 3 Jan 2019 17:39:31 +0000 X-Mailer: IBM Traveler 10.0.0.0 Build 201809171646_20 on behalf of device with id TO1...P64, type 450 (ios) and description iPhone 6s:Apple-iPhone8C1/1505.216 (OS 11) X-KeepSent: F1AC5B43:BA27C228-00258377:00610099; type=4; name=$KeepSent X-LLNOutbound: False X-Disclaimed: 50939 X-TNEFEvaluated: 1 x-cbid: 19010317-9717-0000-0000-00000A8DB501 X-IBM-SpamModules-Scores: BY=0.021639; FL=0; FP=0; FZ=0; HX=0; KW=0; PH=0; SC=0.439231; ST=0; TS=0; UL=0; ISC=; MB=0.000458 X-IBM-SpamModules-Versions: BY=3.00010338; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000272; SDB=6.01141226; UDB=6.00593936; IPR=6.00921450; BA=6.00006193; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00024955; XFM=3.00000015; UTC=2019-01-03 17:39:33 X-IBM-AV-DETECTION: SAVI=unsuspicious REMOTE=unsuspicious XFE=unused X-IBM-AV-VERSION: SAVI=2019-01-03 14:02:11 - 6.00009421 x-cbparentid: 19010317-9718-0000-0000-000042E2D169 Message-Id: Content-type: multipart/alternative; boundary="0__=8FBB09E4DFF286098f9e8a93df938690918c8FBB09E4DFF28609" Content-Disposition: inline MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-01-03_08:, , signatures=0 X-Proofpoint-Spam-Reason: safe X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 33946 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --0__=8FBB09E4DFF286098f9e8a93df938690918c8FBB09E4DFF28609 Content-type: text/plain; charset=US-ASCII Content-Transfer-Encoding: Quoted-printable Anyone has any idea on this issue ? Thanks Ayappan P > On 01-Jan-2019, at 10:36 PM, Ayappan P2 wrote: > > > > Hi, > > I am running coreutils 8.30 in AIX machine and it seems like " tail -f " is > not working as it used to be when the output is piped. > > # ./tail -f test_file | grep 123 > > (1) root @ aixoss-automation-3: 6.1.0.0: / > > It stops immediately and it seems like this commit > https://github.com/coreutils/coreutils/commit/ce0415fda108b7ec35181118fd7a2= c9ee70331ee > has introduce this behavior. > > I checked in Linux with coreutils 8.30 where it works as like earlier > versions. > > Thanks > Ayappan P > --0__=8FBB09E4DFF286098f9e8a93df938690918c8FBB09E4DFF28609 Content-type: text/html; charset=US-ASCII Content-Disposition: inline Content-Transfer-Encoding: Quoted-printable

Anyone has any idea on this issue ?

Thanks
Ayappan P

>= ; On 01-Jan-2019, at 10:36 PM, Ayappan P2 <ayappap2@in.ibm.com> wrote= :
>
>
>
> Hi,
>
> I am running coreutils = 8.30 in AIX machine and it seems like " tail -f " is
> not working as it used to be when the output is piped.<= br>
>
> # ./tail -= f test_file | grep 123
>
> (1) root @ aixoss-automation-3: 6.1.0.0: /
>
> It stops immediately and it = seems like this commit
> https://github.com/coreutils/coreutils/commit/ce0415fda108b7ec35181118f= d7a2c9ee70331ee
> has introduce this beha= vior.
>
> I ch= ecked in Linux with coreutils 8.30 where it works as like earlier
> versions.
>
> Thanks
> Ayappan P
=
>

--0__=8FBB09E4DFF286098f9e8a93df938690918c8FBB09E4DFF28609-- From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 03 13:22:28 2019 Received: (at 33946) by debbugs.gnu.org; 3 Jan 2019 18:22:28 +0000 Received: from localhost ([127.0.0.1]:45942 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gf7dT-0004iM-Po for submit@debbugs.gnu.org; Thu, 03 Jan 2019 13:22:27 -0500 Received: from mout.kundenserver.de ([212.227.17.13]:45185) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gf7dR-0004i9-FA for 33946@debbugs.gnu.org; Thu, 03 Jan 2019 13:22:25 -0500 Received: from [192.168.101.10] ([91.12.163.134]) by mrelayeu.kundenserver.de (mreue106 [212.227.15.183]) with ESMTPSA (Nemesis) id 1MsIbU-1hTF9040C2-00toDw; Thu, 03 Jan 2019 19:22:17 +0100 Subject: Re: bug#33946: tail -f stops abruptly in AIX when piped. To: Ayappan P2 , 33946@debbugs.gnu.org References: From: Bernhard Voelker Openpgp: preference=signencrypt Autocrypt: addr=mail@bernhard-voelker.de; prefer-encrypt=mutual; keydata= mQENBFPirzMBCACyzYldTjQ4ufFOkByY5Nn5USb5GFoL48nWBwNHjd9KUbtRRNlQiPNKd6hK Gvd3BGi5aoFKA4ytfRk6jbAbW3jVb3R8wYaV08mOy4KVEKxqN4bxsXlMjNChXVR+rtKDmfI+ oPTL+cPH2X6gW4W02IRbVw0uUhNm6zEedC/gNrY/mTlf1enZ46jxZ7BTUZaG+kx38UMISIMB zSzLRtdkwgmHj4jS3p1fF2cwRqLclIfMjKGpbNFPEXeXKWrCLcqHw78795eAR9q0YvrDkfIn GdDBwfb3VM4NdulwIFzvYZMSXvSbbyPLB5YkHU5aAWQHUse4WlfT5ccDpbzUYldRAvF9ABEB AAG0K0Jlcm5oYXJkIFZvZWxrZXIgPG1haWxAYmVybmhhcmQtdm9lbGtlci5kZT6JATkEEwEC ACMFAlPirzMCGwMHCwkIBwMCAQYVCAIJCgsEFgIDAQIeAQIXgAAKCRBGUC73lpFxle5wCACC dbs0QaJ0vR3Sff2cKdTk41rUq3YfWngsR///IOU0C5DdkePmCnJE/lUsUy0LRTxcUDLxQR+x QHU8ssRT0JUO9726dI3miy36UdsgmBYaOtLvQcidGmW1R7o0PYYf04+TFtyqKgngOUBPpMgR 6o4UsQxy/OD4bN1WDqOgIjL+D/qJpkKmgp6L6+hhaBCpiOFKRmmV7YyQ3SqVlfQNiHs5ZtkR nXpIjgZARV+GllKucI17bO0CGmTJZ1tstVy0+W3DQT1lbBkTTc++5LONM99D3jjn23l1ocOp folR53F7I4cb2RNfT23v1I59RH37lB9wMOqrKj0UjYAC2YoPGQ3BuQENBFPirzMBCADXLWWp QihBldY6reca8ZKdc3T9qXEOa3akE3DWKztIBmNJhtYOjmpLYajQTkGa7UoJTnbmZE2Rn6ZE oNnvb0gcFNAIcY95KOI+bjOR8HEgh4cx2REXh6L6olIgyXqt/KFusE4wtVZAFxZl+30HzN6n D+1HvrjXxPJRX6MsIYOYyyX9/6OofwJK6QHODYGp8WL2olHDnmsXg4AT6Wlr7qKpKrQELlcF R4xkvdmgL/Ghw/tK0yJTxMIcewCCZWLPOXRmFRbvAadZWPAgVsJ63siNyUlVnVMSzDgTJl+s l/DMabXpqrJQx3/1Yy6mTaDs3XZT/wmBKaTLXx/LByaPxQQ7ABEBAAGJAR8EGAECAAkFAlPi rzMCGwwACgkQRlAu95aRcZWVPwgAqZT6iTXkoP37wYb41323RzhBcJ8JSk4cyBDBUXX0lMrM 3qhiClKG7phpxVdu817Gwc6Hsecg7FfjQAV8MHQ0ZFeEFdk3b2rKBqfsStc+h49/xF3Fb+if CzR9qeQF82fMSxkg18++7hMcHCMO/hPZ/Q0xRi+lrSr2QKDJQuLzSyVU14TxrCkevZjEhtma VNvcJlJzCbiBXee9Fpc5jITUXPFG8E8dxqo1n+duOyIMgozrAnzP7X5V/Ob/Ozf/aGGX9+Jd inyfCX18nWcHALKMU/36Eua/ylalf/2c2YkBp9KCLVmGgPkUgW52EeRPgroIsiwu+rwCSV6Z UyCJ+OymCg== Message-ID: <71ba1d06-2bdb-392f-8a54-1eb02085a1bf@bernhard-voelker.de> Date: Thu, 3 Jan 2019 19:22:00 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.3 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:3c5fwQlxN95OG0xvy/gfHpmKHHUNPgjoNAbBbVQFnkSe+buA1r+ Xc9F+xqXM1/SXmekVc75yAZJtWOWxXab8qdVADQnrVXHjSBdkLJvnEoLKhbJM9g41pNteUF QutJjck5TGjT4joPQlDq/DlkTGEjiMNe9E8H+zmo6vlcbInURBMQVtgxc1q2Yt8ZSBHfk+J eQa4cUR38fKmT6fj+aI6w== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:GohVfh3REVs=:kzpuK1nCtjMWqfGv1F4WYo JqrOLXtiB/KNKYaEi3RilSkDhJ/iVG1Qk3dVdMeATRvYe4q3QUbwotKowRswdgM/3I9RGUn6l jZx4kPZ3N8lOcJ2vJjgpWyM4/SgsIxkKRTUBABgm7+TtZuksyj2ToPmW24ryte4BY9UGz3tVg /jAUXANBcGVHpjWYvnCsSeLazTcz2T4h+ud5nEz1yCDcEbHCkyIl+LuWiH38IGT+ZfY8NZUzN 7h+7U3LvyD1RLNwlIRSowjkhhqqWZeXGOustSfA0ZohB7wZ3LahcVrXJcqanpQeQ3dMB7EaHu U2jEeJdzNogIdZp1ggMlnZgfjRRite3k9c8lOEG79il4OuYlL1emhgnwlJmuqX9kBesEjnuNa LSzH0Yte/IClCFhPBmfF5CijTX0wJeTtRl4f33VQRjUUG26/AZA0XDNQH9KXlo2OYiMHgYmOb yXH1kEuE8TO20zk5t4/rLxT2xt/SFHH98iTvm18HzPuXZR+rx4f5mq4ulzYtiJKWbzzZFHTMR dR3MoRU2cFCZiAkY2YGZuNPOwp5ySSPDmYTc1uWmJfGF16cjnPEiPo+cbB443a9EKfmdo3SjJ t2Wt+Vu5kksYzizjKMQjq4Vtcp4gzuEUWMU2AacJZQPEyONfZstyaNXp1ZIbFP4kBOyqvKsQD pxLWNrjBO5Ja/mGTj6dpPhD9Pd2G4RQS/z+ds8rUf2Tk2Zq75Nzs9uYuVo/JvxBT3pTMCuLvu TqzQCeMequUxcmLKVluHolz4aLrtiTjEJtknk7GZrE15ICf+3+DRn6/mj26CH2Mdbv3fnrDPP ohmUraC X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 33946 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On 1/3/19 6:39 PM, Ayappan P2 wrote: >> On 01-Jan-2019, at 10:36 PM, Ayappan P2 wrote: >> Hi, >> >> I am running coreutils 8.30 in AIX machine and it seems like "tail -f" is >> not working as it used to be when the output is piped. >> >> # ./tail -f test_file | grep 123 >> >> (1) root @ aixoss-automation-3: 6.1.0.0: / >> >> It stops immediately and it seems like this commit >> >> https://github.com/coreutils/coreutils/commit/ce0415fda108b7ec35181118fd7a2c9ee70331ee >> >> has introduce this behavior. >> >> I checked in Linux with coreutils 8.30 where it works as like earlier >> versions. >> >> Thanks >> Ayappan P > Anyone has any idea on this issue ? > > Thanks > Ayappan P Thanks for reporting. It's hard (at least for me) to get hold on to an AIX system, so would you post a trace file (from 'truss'), please? Second, is this specific to a certain AIX version? BTW: our tests should have caught this before the release. Do you also get an error during 'make check'? Have a nice day, Berny From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 04 02:01:20 2019 Received: (at 33946) by debbugs.gnu.org; 4 Jan 2019 07:01:20 +0000 Received: from localhost ([127.0.0.1]:46178 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gfJTs-00024E-Ec for submit@debbugs.gnu.org; Fri, 04 Jan 2019 02:01:20 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:57344 helo=mx0a-001b2d01.pphosted.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gfJTr-000245-4i for 33946@debbugs.gnu.org; Fri, 04 Jan 2019 02:01:19 -0500 Received: from pps.filterd (m0098413.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id x046wpSo136591 for <33946@debbugs.gnu.org>; Fri, 4 Jan 2019 02:01:18 -0500 Received: from smtp.notes.na.collabserv.com (smtp.notes.na.collabserv.com [192.155.248.74]) by mx0b-001b2d01.pphosted.com with ESMTP id 2psxrkrrpg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for <33946@debbugs.gnu.org>; Fri, 04 Jan 2019 02:01:16 -0500 Received: from localhost by smtp.notes.na.collabserv.com with smtp.notes.na.collabserv.com ESMTP for <33946@debbugs.gnu.org> from ; Fri, 4 Jan 2019 07:01:11 -0000 Received: from us1a3-smtp03.a3.dal06.isc4sb.com (10.106.154.98) by smtp.notes.na.collabserv.com (10.106.227.92) with smtp.notes.na.collabserv.com ESMTP; Fri, 4 Jan 2019 07:01:07 -0000 Received: from us1a3-mail127.a3.dal06.isc4sb.com ([10.146.45.135]) by us1a3-smtp03.a3.dal06.isc4sb.com with ESMTP id 2019010407010631-184290 ; Fri, 4 Jan 2019 07:01:06 +0000 In-Reply-To: <71ba1d06-2bdb-392f-8a54-1eb02085a1bf@bernhard-voelker.de> Subject: Re: bug#33946: tail -f stops abruptly in AIX when piped. To: Bernhard Voelker From: "Ayappan P2" Date: Fri, 4 Jan 2019 12:31:06 +0530 References: <71ba1d06-2bdb-392f-8a54-1eb02085a1bf@bernhard-voelker.de> X-KeepSent: 0F4713B1:64A3AB31-00258378:0023D3A9; type=4; name=$KeepSent X-Mailer: IBM Notes Release 9.0.1FP10 SHF68 March 06, 2018 X-LLNOutbound: False X-Disclaimed: 58135 X-TNEFEvaluated: 1 x-cbid: 19010407-7581-0000-0000-00000A7037BC X-IBM-SpamModules-Scores: BY=0.223322; FL=0; FP=0; FZ=0; HX=0; KW=0; PH=0; SC=0.394815; ST=0; TS=0; UL=0; ISC=; MB=0.000000 X-IBM-SpamModules-Versions: BY=3.00010341; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000272; SDB=6.01141488; UDB=6.00594097; IPR=6.00921718; BA=6.00006193; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00024962; XFM=3.00000015; UTC=2019-01-04 07:01:09 X-IBM-AV-DETECTION: SAVI=unsuspicious REMOTE=unsuspicious XFE=unused X-IBM-AV-VERSION: SAVI=2019-01-04 00:31:48 - 6.00009423 x-cbparentid: 19010407-7582-0000-0000-00006E38635F Message-Id: Content-type: multipart/related; boundary="0__=8FBB09EBDFB055398f9e8a93df938690918c8FBB09EBDFB05539" MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-01-04_03:, , signatures=0 X-Proofpoint-Spam-Reason: safe X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 33946 Cc: 33946@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --0__=8FBB09EBDFB055398f9e8a93df938690918c8FBB09EBDFB05539 Content-type: multipart/alternative; Boundary="1__=8FBB09EBDFB055398f9e8a93df938690918c8FBB09EBDFB05539" --1__=8FBB09EBDFB055398f9e8a93df938690918c8FBB09EBDFB05539 Content-type: text/plain; charset=US-ASCII Content-Transfer-Encoding: Quoted-printable The problem happens only when we pipe the output of "tail -f" . I am not sure how one can take the truss of "/tail -f test_file | grep 123" . I did little debugging on the tail code. This function "check_output_alive" introduced by the commit (mentioned earlier in the thread) sents SIGPIPE after doing a select () call in AIX. And that makes it exit immediately. fd_set rfd; FD_ZERO (&rfd); FD_SET (STDOUT_FILENO, &rfd); /* readable event on STDOUT is equivalent to POLLERR, and implies an error condition on output like broken pipe. */ if (select (STDOUT_FILENO + 1, &rfd, NULL, NULL, &delay) =3D=3D 1) raise (SIGPIPE); } I didn't understand the real reason behind this commit. Thanks Ayappan P From: Bernhard Voelker To: Ayappan P2 , 33946@debbugs.gnu.org Date: 01/03/2019 11:53 PM Subject: bug#33946: tail -f stops abruptly in AIX when piped. Sent by: "Bug-coreutils" On 1/3/19 6:39 PM, Ayappan P2 wrote: >> On 01-Jan-2019, at 10:36 PM, Ayappan P2 wrote: >> Hi, >> >> I am running coreutils 8.30 in AIX machine and it seems like "tail -f" is >> not working as it used to be when the output is piped. >> >> # ./tail -f test_file | grep 123 >> >> (1) root @ aixoss-automation-3: 6.1.0.0: / >> >> It stops immediately and it seems like this commit >> >> https://github.com/coreutils/coreutils/commit/ce0415fda108b7ec35181118fd7a2= c9ee70331ee >> >> has introduce this behavior. >> >> I checked in Linux with coreutils 8.30 where it works as like earlier >> versions. >> >> Thanks >> Ayappan P > Anyone has any idea on this issue ? > > Thanks > Ayappan P Thanks for reporting. It's hard (at least for me) to get hold on to an AIX system, so would you post a trace file (from 'truss'), please? Second, is this specific to a certain AIX version? BTW: our tests should have caught this before the release. Do you also get an error during 'make check'? Have a nice day, Berny --1__=8FBB09EBDFB055398f9e8a93df938690918c8FBB09EBDFB05539 Content-type: text/html; charset=US-ASCII Content-Disposition: inline Content-Transfer-Encoding: Quoted-printable

The problem happens only when we pipe the o= utput of "tail -f" .

I am not sur= e how one can take the truss of "/tail -f te= st_file | grep 123" .

I did little debu= gging on the tail code. This function "check_output_alive" introd= uced by the commit (mentioned earlier in the thread) sents SIGPIPE after do= ing a select () call in AIX.
And that makes it e= xit immediately.

fd_set rfd;
FD_ZERO (&rfd);

FD_SET = (STDOUT_FILENO, &rfd);

/* readable event on STDOUT is equivalent to POLLERR, and implies an error condition on output like broke= n pipe. */
if (select (STDOUT_FILENO + 1, &a= mp;rfd, NULL, NULL, &delay) =3D=3D 1)
r= aise (SIGPIPE);
}

I didn't understand the real reason behind this commit.

Thanks

Ayappan P

Bernhard Voelker ---01= /03/2019 11:53:17 PM---On 1/3/19 6:39 PM, Ayappan P2 wrote: >> On 01-= Jan-2019, at 10:36 PM, Ayappan P2 <ayappap2@in.ibm.com

From: Bernha= rd Voelker <mail@bernhard-voelker.de>
To: Ayappan P2 <ayappap2@in= .ibm.com>, 33946@debbugs.gnu.org
Date: 01/03/2019 11:53 PM
Subject: bu= g#33946: tail -f stops abruptly in AIX when piped.
Sent by: "Bug-core= utils" <bug-coreutils-bounces+ayappap2=3Din.ibm.com@gnu.org>





On 1/3/19 6:39 PM, Ayappan P2 w= rote:
>> On 01-Jan-2019, at 10:36 PM, Ayappan P2 <ayappap2@in.i= bm.com> wrote:
>> Hi,
>>
>> I am running core= utils 8.30 in AIX machine and it seems like "tail -f" is
>&= gt; not working as it used to be when the output is piped.
>>
&= gt;> # ./tail -f test_file | grep 123
>>
>> (1) root @= aixoss-automation-3: 6.1.0.0: /
>>
>> It stops immediate= ly  and it seems like this commit
>>
>>
= https://github.com/coreutils/c= oreutils/commit/ce0415fda108b7ec35181118fd7a2c9ee70331ee
>>
>> has introduce this behavior.>>
>> I checked in Linux with coreutils 8.30 where it works= as like earlier
>> versions.
>>
>> Thanks
&g= t;> Ayappan P

> Anyone has any idea on this issue ?
>> Thanks
> Ayappan P

Thanks for reporting.
It's hard (a= t least for me) to get hold on to an AIX system,
so would you post a tra= ce file (from 'truss'), please?

Second, is this specific to a certai= n AIX version?

BTW: our tests should have caught this before the rel= ease.
Do you also get an error during 'make check'?

Have a nice d= ay,
Berny







--1__=8FBB09EBDFB055398f9e8a93df938690918c8FBB09EBDFB05539-- --0__=8FBB09EBDFB055398f9e8a93df938690918c8FBB09EBDFB05539 Content-type: image/gif; name="graycol.gif" Content-Disposition: inline; filename="graycol.gif" Content-ID: <1__=8FBB09EBDFB055398f9e8a93df938690918c8FB@> Content-Transfer-Encoding: base64 R0lGODlhEAAQAKECAMzMzAAAAP///wAAACH5BAEAAAIALAAAAAAQABAAAAIXlI+py+0PopwxUbpu ZRfKZ2zgSJbmSRYAIf4fT3B0aW1pemVkIGJ5IFVsZWFkIFNtYXJ0U2F2ZXIhAAA7 --0__=8FBB09EBDFB055398f9e8a93df938690918c8FBB09EBDFB05539-- From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 04 12:36:27 2019 Received: (at 33946) by debbugs.gnu.org; 4 Jan 2019 17:36:27 +0000 Received: from localhost ([127.0.0.1]:47036 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gfTOV-0004bT-22 for submit@debbugs.gnu.org; Fri, 04 Jan 2019 12:36:27 -0500 Received: from mail.magicbluesmoke.com ([82.195.144.49]:42024) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gfTOS-0004bJ-Ia for 33946@debbugs.gnu.org; Fri, 04 Jan 2019 12:36:26 -0500 Received: from localhost.localdomain (unknown [109.77.212.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.magicbluesmoke.com (Postfix) with ESMTPSA id 0C0869965; Fri, 4 Jan 2019 17:36:23 +0000 (GMT) Subject: Re: bug#33946: tail -f stops abruptly in AIX when piped. To: Ayappan P2 , Bernhard Voelker References: <71ba1d06-2bdb-392f-8a54-1eb02085a1bf@bernhard-voelker.de> From: =?UTF-8?Q?P=c3=a1draig_Brady?= Message-ID: <7d786022-68a5-c379-ce2b-210d5b749a99@draigBrady.com> Date: Fri, 4 Jan 2019 09:36:22 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/mixed; boundary="------------0D4CC9901BA357BE1C017D6C" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 33946 Cc: 33946@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) This is a multi-part message in MIME format. --------------0D4CC9901BA357BE1C017D6C Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit On 03/01/19 23:01, Ayappan P2 wrote: > > The problem happens only when we pipe the output of "tail -f" . > > I am not sure how one can take the truss of "/tail -f test_file | grep > 123" . > > I did little debugging on the tail code. This function "check_output_alive" > introduced by the commit (mentioned earlier in the thread) sents SIGPIPE > after doing a select () call in AIX. > And that makes it exit immediately. > > fd_set rfd; > FD_ZERO (&rfd); > FD_SET (STDOUT_FILENO, &rfd); > > /* readable event on STDOUT is equivalent to POLLERR, > and implies an error condition on output like broken pipe. */ > if (select (STDOUT_FILENO + 1, &rfd, NULL, NULL, &delay) == 1) > raise (SIGPIPE); > } > > I didn't understand the real reason behind this commit. > > Thanks > Ayappan P > > > > From: Bernhard Voelker > To: Ayappan P2 , 33946@debbugs.gnu.org > Date: 01/03/2019 11:53 PM > Subject: bug#33946: tail -f stops abruptly in AIX when piped. > Sent by: "Bug-coreutils" +ayappap2=in.ibm.com@gnu.org> > > > > On 1/3/19 6:39 PM, Ayappan P2 wrote: >>> On 01-Jan-2019, at 10:36 PM, Ayappan P2 wrote: >>> Hi, >>> >>> I am running coreutils 8.30 in AIX machine and it seems like "tail -f" > is >>> not working as it used to be when the output is piped. >>> >>> # ./tail -f test_file | grep 123 >>> >>> (1) root @ aixoss-automation-3: 6.1.0.0: / >>> >>> It stops immediately and it seems like this commit >>> >>> > https://github.com/coreutils/coreutils/commit/ce0415fda108b7ec35181118fd7a2c9ee70331ee > >>> >>> has introduce this behavior. >>> >>> I checked in Linux with coreutils 8.30 where it works as like earlier >>> versions. >>> >>> Thanks >>> Ayappan P > >> Anyone has any idea on this issue ? >> >> Thanks >> Ayappan P > > Thanks for reporting. > It's hard (at least for me) to get hold on to an AIX system, > so would you post a trace file (from 'truss'), please? > > Second, is this specific to a certain AIX version? > > BTW: our tests should have caught this before the release. > Do you also get an error during 'make check'? Our tests were incorrect :/ Note the need for this extra check was discussed at: https://lists.gnu.org/archive/html/coreutils/2017-06/msg00010.html Note the initial implementation there was with poll() rather than select(). That may work better on AIX. Could you try the poll() solution at the above link, on your system? Attached is a fixup for the test and an avoidance of the issue on AIX. cheers, Pádraig. --------------0D4CC9901BA357BE1C017D6C Content-Type: text/x-patch; name="tail-aix.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="tail-aix.patch" =46rom 69f4b0db2af91b2b67608ae5205d54b7fff2a53c Mon Sep 17 00:00:00 2001 From: =3D?UTF-8?q?P=3DC3=3DA1draig=3D20Brady?=3D Date: Fri, 4 Jan 2019 09:29:13 -0800 Subject: [PATCH] tail: don't exit immediately with filters on AIX * src/tail.c: Avoid the check_output_available check on AIX. * tests/tail-2/pipe-f.sh: Fix the test which always passed due to only the exit code of sleep being checked. * NEWS: Mention the bug fix and rearrange alphabetically. Addresses http://bugs.gnu.org/33946 --- NEWS | 8 +++++--- src/tail.c | 5 +++++ tests/tail-2/pipe-f.sh | 5 ++++- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/NEWS b/NEWS index 4a57d22..6a9c0bc 100644 --- a/NEWS +++ b/NEWS @@ -4,6 +4,9 @@ GNU coreutils NEWS -*-= outline -*- =20 ** Bug fixes =20 + 'base64 a b' now correctly diagnoses 'b' as the extra operand, not 'a'= =2E + [bug introduced in coreutils-5.3.0] + When B already exists, 'cp -il A B' no longer immediately fails after asking the user whether to proceed. [This bug was present in "the beginning".] @@ -21,9 +24,8 @@ GNU coreutils NEWS -= *- outline -*- sync no longer fails for write-only file arguments. [bug introduced with argument support to sync in coreutils-8.24] =20 - In 'base64 a b', and likewise for base32, the tool now correctly - diagnoses 'b' as the extra operand, not 'a'. - [bug introduced in coreutils-5.3.0] + 'tail -f file | filter' no longer exits immediately on AIX. + [bug introduced in coreutils-8.28] =20 ** Changes in behavior =20 diff --git a/src/tail.c b/src/tail.c index 0270cbe..85de88d 100644 --- a/src/tail.c +++ b/src/tail.c @@ -336,6 +336,11 @@ named file in a way that accommodates renaming, remo= val and creation.\n\ static void check_output_alive (void) { +#ifdef _AIX + /* TODO: AIX was seen to give a readable event immediately. */ + return; +#endif + if (! monitor_output) return; =20 diff --git a/tests/tail-2/pipe-f.sh b/tests/tail-2/pipe-f.sh index 9231cac..4a5b444 100755 --- a/tests/tail-2/pipe-f.sh +++ b/tests/tail-2/pipe-f.sh @@ -37,7 +37,10 @@ compare exp out || fail=3D1 =20 # This would wait indefinitely before v8.28 due to no EPIPE being # generated due to no data written after the first small amount -timeout 10 tail -f $mode $fastpoll out | sleep .1 || fail=3D1 +(returns_ 124 timeout 10 tail -n2 -f $mode $fastpoll out && touch timed_= out) | + sed 2q > out2 +test -e timed_out && fail=3D1 +compare exp out2 || fail=3D1 =20 # This would wait indefinitely before v8.28 (until first write) (returns_ 1 timeout 10 tail -f $mode $fastpoll /dev/null >&-) || fail=3D= 1 --=20 2.9.3 --------------0D4CC9901BA357BE1C017D6C-- From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 07 04:06:07 2019 Received: (at 33946) by debbugs.gnu.org; 7 Jan 2019 09:06:07 +0000 Received: from localhost ([127.0.0.1]:47629 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ggQrG-0001tA-N0 for submit@debbugs.gnu.org; Mon, 07 Jan 2019 04:06:07 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:54832) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ggQrE-0001sf-OS for 33946@debbugs.gnu.org; Mon, 07 Jan 2019 04:06:05 -0500 Received: from pps.filterd (m0098394.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id x0795j9t004325 for <33946@debbugs.gnu.org>; Mon, 7 Jan 2019 04:05:58 -0500 Received: from smtp.notes.na.collabserv.com (smtp.notes.na.collabserv.com [192.155.248.81]) by mx0a-001b2d01.pphosted.com with ESMTP id 2puygc2abb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for <33946@debbugs.gnu.org>; Mon, 07 Jan 2019 04:05:49 -0500 Received: from localhost by smtp.notes.na.collabserv.com with smtp.notes.na.collabserv.com ESMTP for <33946@debbugs.gnu.org> from ; Mon, 7 Jan 2019 09:04:33 -0000 Received: from us1a3-smtp06.a3.dal06.isc4sb.com (10.146.103.243) by smtp.notes.na.collabserv.com (10.106.227.88) with smtp.notes.na.collabserv.com ESMTP; Mon, 7 Jan 2019 09:04:29 -0000 Received: from us1a3-mail127.a3.dal06.isc4sb.com ([10.146.45.135]) by us1a3-smtp06.a3.dal06.isc4sb.com with ESMTP id 2019010709042816-251922 ; Mon, 7 Jan 2019 09:04:28 +0000 In-Reply-To: <7d786022-68a5-c379-ce2b-210d5b749a99@draigBrady.com> Subject: Re: bug#33946: tail -f stops abruptly in AIX when piped. To: "=?ISO-8859-1?Q?P=E1draig_Brady?=" From: "Ayappan P2" Date: Mon, 7 Jan 2019 14:34:27 +0530 References: <71ba1d06-2bdb-392f-8a54-1eb02085a1bf@bernhard-voelker.de> <7d786022-68a5-c379-ce2b-210d5b749a99@draigBrady.com> X-KeepSent: 430A6579:836DF61F-0025837B:003159CE; type=4; name=$KeepSent X-Mailer: IBM Notes Release 9.0.1FP10 SHF68 March 06, 2018 X-LLNOutbound: False X-Disclaimed: 31019 X-TNEFEvaluated: 1 x-cbid: 19010709-7093-0000-0000-000009B1EA8A X-IBM-SpamModules-Scores: BY=0; FL=0; FP=0; FZ=0; HX=0; KW=0; PH=0; SC=0.394815; ST=0; TS=0; UL=0; ISC=; MB=0.000000 X-IBM-SpamModules-Versions: BY=3.00010360; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000273; SDB=6.01142949; UDB=6.00594985; IPR=6.00923199; BA=6.00006195; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00025012; XFM=3.00000015; UTC=2019-01-07 09:04:31 X-IBM-AV-DETECTION: SAVI=unsuspicious REMOTE=unsuspicious XFE=unused X-IBM-AV-VERSION: SAVI=2019-01-07 06:41:51 - 6.00009436 x-cbparentid: 19010709-7094-0000-0000-00006F08FC35 Message-Id: Content-type: multipart/related; boundary="0__=8FBB09E8DFA2DF5E8f9e8a93df938690918c8FBB09E8DFA2DF5E" MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-01-07_03:, , signatures=0 X-Proofpoint-Spam-Reason: safe X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: The poll() solution is working in AIX. Great. Thanks Ayappan P From: "Pádraig Brady" To: Ayappan P2 , Bernhard Voelker Cc: 33946@debbugs.gnu.org Date: 01/04/2019 11:37 PM Subject: bug#33946: tail [...] Content analysis details: (1.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 0.0 HTML_MESSAGE BODY: HTML included in message 0.0 TVD_FW_GRAPHIC_NAME_MID BODY: Medium sized image attachment name -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [148.163.156.1 listed in list.dnswl.org] 2.0 KHOP_DYNAMIC Relay looks like a dynamic address X-Debbugs-Envelope-To: 33946 Cc: 33946@debbugs.gnu.org, Bernhard Voelker , Bug-coreutils X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) --0__=8FBB09E8DFA2DF5E8f9e8a93df938690918c8FBB09E8DFA2DF5E Content-type: multipart/alternative; Boundary="1__=8FBB09E8DFA2DF5E8f9e8a93df938690918c8FBB09E8DFA2DF5E" --1__=8FBB09E8DFA2DF5E8f9e8a93df938690918c8FBB09E8DFA2DF5E Content-type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: Quoted-printable The poll() solution is working in AIX. Great. Thanks Ayappan P From: "P=E1draig Brady" To: Ayappan P2 , Bernhard Voelker Cc: 33946@debbugs.gnu.org Date: 01/04/2019 11:37 PM Subject: bug#33946: tail -f stops abruptly in AIX when piped. Sent by: "Bug-coreutils" On 03/01/19 23:01, Ayappan P2 wrote: > > The problem happens only when we pipe the output of "tail -f" . > > I am not sure how one can take the truss of "/tail -f test_file | grep > 123" . > > I did little debugging on the tail code. This function "check_output_alive" > introduced by the commit (mentioned earlier in the thread) sents SIGPIPE > after doing a select () call in AIX. > And that makes it exit immediately. > > fd_set rfd; > FD_ZERO (&rfd); > FD_SET (STDOUT_FILENO, &rfd); > > /* readable event on STDOUT is equivalent to POLLERR, > and implies an error condition on output like broken pipe. */ > if (select (STDOUT_FILENO + 1, &rfd, NULL, NULL, &delay) =3D=3D 1) > raise (SIGPIPE); > } > > I didn't understand the real reason behind this commit. > > Thanks > Ayappan P > > > > From: Bernhard Voelker > To: Ayappan P2 , 33946@debbugs.gnu.org > Date: 01/03/2019 11:53 PM > Subject: bug#33946: tail -f stops abruptly in AIX when piped. > Sent by: "Bug-coreutils" +ayappap2=3Din.ibm.com@gnu.org> > > > > On 1/3/19 6:39 PM, Ayappan P2 wrote: >>> On 01-Jan-2019, at 10:36 PM, Ayappan P2 wrote: >>> Hi, >>> >>> I am running coreutils 8.30 in AIX machine and it seems like "tail -f" > is >>> not working as it used to be when the output is piped. >>> >>> # ./tail -f test_file | grep 123 >>> >>> (1) root @ aixoss-automation-3: 6.1.0.0: / >>> >>> It stops immediately and it seems like this commit >>> >>> > https://github.com/coreutils/coreutils/commit/ce0415fda108b7ec35181118fd7a2= c9ee70331ee > >>> >>> has introduce this behavior. >>> >>> I checked in Linux with coreutils 8.30 where it works as like earlier >>> versions. >>> >>> Thanks >>> Ayappan P > >> Anyone has any idea on this issue ? >> >> Thanks >> Ayappan P > > Thanks for reporting. > It's hard (at least for me) to get hold on to an AIX system, > so would you post a trace file (from 'truss'), please? > > Second, is this specific to a certain AIX version? > > BTW: our tests should have caught this before the release. > Do you also get an error during 'make check'? Our tests were incorrect :/ Note the need for this extra check was discussed at: https://lists.gnu.org/archive/html/coreutils/2017-06/msg00010.html Note the initial implementation there was with poll() rather than select(). That may work better on AIX. Could you try the poll() solution at the above link, on your system? Attached is a fixup for the test and an avoidance of the issue on AIX. cheers, P=E1draig. [attachment "tail-aix.patch" deleted by Ayappan P2/India/IBM] --1__=8FBB09E8DFA2DF5E8f9e8a93df938690918c8FBB09E8DFA2DF5E Content-type: text/html; charset=ISO-8859-1 Content-Disposition: inline Content-Transfer-Encoding: Quoted-printable

The poll() solution is working in AIX. Grea= t.

Thanks
Ayappan= P

3D"Inactive"P=E1dr= aig Brady" ---01/04/2019 11:37:34 PM---On 03/01/19 23:01, Ayappan P2 w= rote: >

From: "P=E1draig Brady" <P@draigBrady.com><= /font>
To: Ayappan P2 <ayappap2@in.ibm.com>, Bernhard Voelker <mail@be= rnhard-voelker.de>
Cc: = 33946@debbugs.gnu.org
Date: 01/04/2019 11:37 PM=
Subject: bug#33946: tail -f stops abruptly in AIX when piped.
<= font size=3D"2" color=3D"#5F5F5F">Sent by:
&= quot;Bug-coreutils" <bug-coreutils-bounces+ayappap2=3Din.ibm.com@gn= u.org>





On 03/01/19 23:01,= Ayappan P2 wrote:
>
> The problem happens only when we pipe t= he output of "tail -f" .
>
> I am not sure how one c= an take the truss of   "/tail -f test_file | grep
> 123&quo= t; .
>
> I did little debugging on the tail code. This functio= n "check_output_alive"
> introduced by the commit (mentione= d earlier in the thread) sents SIGPIPE
> after doing a select () call= in AIX.
> And that makes it exit immediately.
>
>  = ;  fd_set rfd;
>    FD_ZERO (&rfd);
>  =  FD_SET (STDOUT_FILENO, &rfd);
>
>     /* = readable event on STDOUT is equivalent to POLLERR,
>     &n= bsp; and implies an error condition on output like broken pipe.  */>    if (select (STDOUT_FILENO + 1, &rfd, NULL, NULL, &am= p;delay) =3D=3D 1)
>      raise (SIGPIPE);
> &nb= sp;}
>
> I didn't understand the real reason behind this commi= t.
>
> Thanks
> Ayappan P
>
>
>
= > From: Bernhard Voelker <mail@bernhard-voelker.de>= ;
> To: Ayappan P2 <ayappap2@in.ibm.com>, 33946= @debbugs.gnu.org
> Date: 01/03/2019 11:53 PM
> = Subject: bug#33946: tail -f stops abruptly in AIX when pipe= d.
> Sent by: "Bug-coreutils" <bug-coreu= tils-bounces
>             +ayappap2=3D= in.ibm.com@gnu.org>
>
>
>
> On 1/3/19 6:39 PM= , Ayappan P2 wrote:
>>> On 01-Jan-2019, at 10:36 PM, Ayappan P2= <ayappap2@in.ibm.com> wrote:
>>> Hi,
>>>
= >>> I am running coreutils 8.30 in AIX machine and it seems like &= quot;tail -f"
> is
>>> not working as it used to be = when the output is piped.
>>>
>>> # ./tail -f test_= file | grep 123
>>>
>>> (1) root @ aixoss-automatio= n-3: 6.1.0.0: /
>>>
>>> It stops immediately  = and it seems like this commit
>>>
>>>
>
https://github.com/core= utils/coreutils/commit/ce0415fda108b7ec35181118fd7a2c9ee70331ee<= /tt>
>
>>>
>>> has intr= oduce this behavior.
>>>
>>> I checked in Linux wit= h coreutils 8.30 where it works as like earlier
>>> versions.>>>
>>> Thanks
>>> Ayappan P
> >> Anyone has any idea on this issue ?
>>
>> Thank= s
>> Ayappan P
>
> Thanks for reporting.
> It's= hard (at least for me) to get hold on to an AIX system,
> so would y= ou post a trace file (from 'truss'), please?
>
> Second, is th= is specific to a certain AIX version?
>
> BTW: our tests shoul= d have caught this before the release.
> Do you also get an error dur= ing 'make check'?

Our tests were incorrect :/

Note the need f= or this extra check was discussed at:
<= a href=3D"https://lists.gnu.org/archive/html/coreutils/2017-06/msg00010.htm= l">https://lists.gnu.org/archive/html/coreutils/2017-06/msg00010.html

Note the initial implementation ther= e was with poll()
rather than select(). That may work better on AIX.
= Could you try the poll() solution at the above link,
on your system?
=
Attached is a fixup for the test and an avoidance
of the issue on AI= X.

cheers,
P=E1draig.
[attachment "tail-aix.patch" d= eleted by Ayappan P2/India/IBM]



--1__=8FBB09E8DFA2DF5E8f9e8a93df938690918c8FBB09E8DFA2DF5E-- --0__=8FBB09E8DFA2DF5E8f9e8a93df938690918c8FBB09E8DFA2DF5E Content-type: image/gif; name="graycol.gif" Content-Disposition: inline; filename="graycol.gif" Content-ID: <1__=8FBB09E8DFA2DF5E8f9e8a93df938690918c8FB@> Content-Transfer-Encoding: base64 R0lGODlhEAAQAKECAMzMzAAAAP///wAAACH5BAEAAAIALAAAAAAQABAAAAIXlI+py+0PopwxUbpu ZRfKZ2zgSJbmSRYAIf4fT3B0aW1pemVkIGJ5IFVsZWFkIFNtYXJ0U2F2ZXIhAAA7 --0__=8FBB09E8DFA2DF5E8f9e8a93df938690918c8FBB09E8DFA2DF5E-- From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 08 01:32:06 2019 Received: (at 33946) by debbugs.gnu.org; 8 Jan 2019 06:32:06 +0000 Received: from localhost ([127.0.0.1]:49189 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ggkvm-0006OT-9B for submit@debbugs.gnu.org; Tue, 08 Jan 2019 01:32:06 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:59874) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ggkvk-0006OL-7Y for 33946@debbugs.gnu.org; Tue, 08 Jan 2019 01:32:05 -0500 Received: from pps.filterd (m0098409.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id x086NqgP009922 for <33946@debbugs.gnu.org>; Tue, 8 Jan 2019 01:32:03 -0500 Received: from smtp.notes.na.collabserv.com (smtp.notes.na.collabserv.com [192.155.248.67]) by mx0a-001b2d01.pphosted.com with ESMTP id 2pvphb0cxt-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for <33946@debbugs.gnu.org>; Tue, 08 Jan 2019 01:32:02 -0500 Received: from localhost by smtp.notes.na.collabserv.com with smtp.notes.na.collabserv.com ESMTP for <33946@debbugs.gnu.org> from ; Tue, 8 Jan 2019 06:32:01 -0000 Received: from us1a3-smtp02.a3.dal06.isc4sb.com (10.106.154.159) by smtp.notes.na.collabserv.com (10.106.227.16) with smtp.notes.na.collabserv.com ESMTP; Tue, 8 Jan 2019 06:31:56 -0000 Received: from us1a3-mail127.a3.dal06.isc4sb.com ([10.146.45.135]) by us1a3-smtp02.a3.dal06.isc4sb.com with ESMTP id 2019010806315586-143979 ; Tue, 8 Jan 2019 06:31:55 +0000 In-Reply-To: Subject: Re: bug#33946: tail -f stops abruptly in AIX when piped. To: "Ayappan P2" From: "Ayappan P2" Date: Tue, 8 Jan 2019 12:01:54 +0530 References: <71ba1d06-2bdb-392f-8a54-1eb02085a1bf@bernhard-voelker.de><7d786022-68a5-c379-ce2b-210d5b749a99@draigBrady.com> X-KeepSent: 73403F4E:84370CA8-0025837C:00238A5C; type=4; name=$KeepSent X-Mailer: IBM Notes Release 9.0.1FP10 SHF68 March 06, 2018 X-LLNOutbound: False X-Disclaimed: 56075 X-TNEFEvaluated: 1 x-cbid: 19010806-0327-0000-0000-000009141D8F X-IBM-SpamModules-Scores: BY=0; FL=0; FP=0; FZ=0; HX=0; KW=0; PH=0; SC=0.394815; ST=0; TS=0; UL=0; ISC=; MB=0.000001 X-IBM-SpamModules-Versions: BY=3.00010365; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000273; SDB=6.01143371; UDB=6.00595242; IPR=6.00923628; BA=6.00006195; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00025027; XFM=3.00000015; UTC=2019-01-08 06:31:59 X-IBM-AV-DETECTION: SAVI=unsuspicious REMOTE=unsuspicious XFE=unused X-IBM-AV-VERSION: SAVI=2019-01-08 05:48:23 - 6.00009439 x-cbparentid: 19010806-0328-0000-0000-0000F9C0673C Message-Id: Content-type: multipart/related; boundary="0__=8FBB09EFDFB00CCC8f9e8a93df938690918c8FBB09EFDFB00CCC" MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-01-08_04:, , signatures=0 X-Proofpoint-Spam-Reason: safe X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 33946 Cc: 33946@debbugs.gnu.org, Bernhard Voelker , =?ISO-8859-1?Q?P=E1draig_Brady?= , Bug-coreutils X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --0__=8FBB09EFDFB00CCC8f9e8a93df938690918c8FBB09EFDFB00CCC Content-type: multipart/alternative; Boundary="1__=8FBB09EFDFB00CCC8f9e8a93df938690918c8FBB09EFDFB00CCC" --1__=8FBB09EFDFB00CCC8f9e8a93df938690918c8FBB09EFDFB00CCC Content-type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: Quoted-printable Now the poll() solution is working in AIX, will there be any official patch for this ? It will be great to have this integrated into the next release. Thanks Ayappan P From: "Ayappan P2" To: "P=E1draig Brady" Cc: 33946@debbugs.gnu.org, Bernhard Voelker , Bug-coreutils Date: 01/07/2019 02:37 PM Subject: bug#33946: tail -f stops abruptly in AIX when piped. Sent by: "Bug-coreutils" The poll() solution is working in AIX. Great. Thanks Ayappan P From: "P=E1draig Brady" To: Ayappan P2 , Bernhard Voelker Cc: 33946@debbugs.gnu.org Date: 01/04/2019 11:37 PM Subject: bug#33946: tail -f stops abruptly in AIX when piped. Sent by: "Bug-coreutils" On 03/01/19 23:01, Ayappan P2 wrote: > > The problem happens only when we pipe the output of "tail -f" . > > I am not sure how one can take the truss of "/tail -f test_file | grep > 123" . > > I did little debugging on the tail code. This function "check_output_alive" > introduced by the commit (mentioned earlier in the thread) sents SIGPIPE > after doing a select () call in AIX. > And that makes it exit immediately. > > fd_set rfd; > FD_ZERO (&rfd); > FD_SET (STDOUT_FILENO, &rfd); > > /* readable event on STDOUT is equivalent to POLLERR, > and implies an error condition on output like broken pipe. */ > if (select (STDOUT_FILENO + 1, &rfd, NULL, NULL, &delay) =3D=3D 1) > raise (SIGPIPE); > } > > I didn't understand the real reason behind this commit. > > Thanks > Ayappan P > > > > From: Bernhard Voelker > To: Ayappan P2 , 33946@debbugs.gnu.org > Date: 01/03/2019 11:53 PM > Subject: bug#33946: tail -f stops abruptly in AIX when piped. > Sent by: "Bug-coreutils" +ayappap2=3Din.ibm.com@gnu.org> > > > > On 1/3/19 6:39 PM, Ayappan P2 wrote: >>> On 01-Jan-2019, at 10:36 PM, Ayappan P2 wrote: >>> Hi, >>> >>> I am running coreutils 8.30 in AIX machine and it seems like "tail -f" > is >>> not working as it used to be when the output is piped. >>> >>> # ./tail -f test_file | grep 123 >>> >>> (1) root @ aixoss-automation-3: 6.1.0.0: / >>> >>> It stops immediately and it seems like this commit >>> >>> > https://github.com/coreutils/coreutils/commit/ce0415fda108b7ec35181118fd7a2= c9ee70331ee > >>> >>> has introduce this behavior. >>> >>> I checked in Linux with coreutils 8.30 where it works as like earlier >>> versions. >>> >>> Thanks >>> Ayappan P > >> Anyone has any idea on this issue ? >> >> Thanks >> Ayappan P > > Thanks for reporting. > It's hard (at least for me) to get hold on to an AIX system, > so would you post a trace file (from 'truss'), please? > > Second, is this specific to a certain AIX version? > > BTW: our tests should have caught this before the release. > Do you also get an error during 'make check'? Our tests were incorrect :/ Note the need for this extra check was discussed at: https://lists.gnu.org/archive/html/coreutils/2017-06/msg00010.html Note the initial implementation there was with poll() rather than select(). That may work better on AIX. Could you try the poll() solution at the above link, on your system? Attached is a fixup for the test and an avoidance of the issue on AIX. cheers, P=E1draig. [attachment "tail-aix.patch" deleted by Ayappan P2/India/IBM] [attachment "graycol.gif" deleted by Ayappan P2/India/IBM] --1__=8FBB09EFDFB00CCC8f9e8a93df938690918c8FBB09EFDFB00CCC Content-type: text/html; charset=ISO-8859-1 Content-Disposition: inline Content-Transfer-Encoding: Quoted-printable

Now the poll() solution is working in AIX, = will there be any official patch for this ?

It will be great to have this integrated into the next release.
=
Thanks
Ayappan P
=

3D"Inactive"Ayappan P= 2" ---01/07/2019 02:37:17 PM---The poll() solution is working in AIX. = Great. Thanks

From: = "Ayappan P2" <ayappap2@in.ibm.com>=
To: "P=E1draig Brady" <P@draigBrady.com>
Cc:
33946@debb= ugs.gnu.org, Bernhard Voelker <mail@bernhard-voelker.de>, Bug-coreuti= ls <bug-coreutils-bounces+ayappap2=3Din.ibm.com@gnu.org>
Date:
01/07= /2019 02:37 PM
Subject: = bug#33946: tail -f stops abruptly in AIX when pipe= d.
Sent by: "Bug-coreutils" <bug-coreutils-bounces+ayappap2= =3Din.ibm.com@gnu.org>





The poll() solution is working in AIX. Great.

Thanks
Ayappan P<= br>


From: "P=E1draig Brady" <P@drai= gBrady.com>
To: Ayappan P2 <ayappap2@in.ibm.com>= ;, Bernhard Voelker
           <mail@b= ernhard-voelker.de>
Cc: 33946@debbugs.gnu.org
Date= : 01/04/2019 11:37 PM
Subject: bug#33946= : tail -f stops abruptly in AIX when piped.
Sent by: &qu= ot;Bug-coreutils" <bug-coreutils-bounces
      &= nbsp;    +ayappap2=3Din.ibm.com@gnu.org>



On 03/= 01/19 23:01, Ayappan P2 wrote:
>
> The problem happens only whe= n we pipe the output of "tail -f" .
>
> I am not sure= how one can take the truss of   "/tail -f test_file | grep
&g= t; 123" .
>
> I did little debugging on the tail code. Thi= s function
"check_output_alive"
> introduced by the comm= it (mentioned earlier in the thread) sents SIGPIPE
> after doing a se= lect () call in AIX.
> And that makes it exit immediately.
>>    fd_set rfd;
>    FD_ZERO (&rfd);
= >    FD_SET (STDOUT_FILENO, &rfd);
>
>   =   /* readable event on STDOUT is equivalent to POLLERR,
>  =     and implies an error condition on output like broken pipe. &= nbsp;*/
>    if (select (STDOUT_FILENO + 1, &rfd, NULL,= NULL, &delay) =3D=3D 1)
>      raise (SIGPIPE);>  }
>
> I didn't understand the real reason behind t= his commit.
>
> Thanks
> Ayappan P
>
>
>= ;
> From:  Bernhard Voelker <= ;mail@bernhard-voelker.de>
> To: =  Ayappan P2 <ayappap2@in.ibm.com>, 33946@debbugs.gnu.org
>= Date:  01/03/2019 11:53 PM
> S= ubject:  bug#33946: tail -f stops abr= uptly in AIX when piped.
> Sent by: =  "Bug-coreutils" <bug-coreutils-bounces
>   &n= bsp;         +ayappap2=3Din.ibm.com@gnu.org>
>=
>
>
> On 1/3/19 6:39 PM, Ayappan P2 wrote:
>>&g= t; On 01-Jan-2019, at 10:36 PM, Ayappan P2 <ayappap2@in.ibm.com> wrot= e:
>>> Hi,
>>>
>>> I am running coreuti= ls 8.30 in AIX machine and it seems like "tail -f"
> is
= >>> not working as it used to be when the output is piped.
>= >>
>>> # ./tail -f test_file | grep 123
>>>>>> (1) root @ aixoss-automation-3: 6.1.0.0: /
>>>>>> It stops immediately  and it seems like this commit
= >>>
>>>
>
https://github.com/coreutils/coreutils/commit/ce0415f= da108b7ec35181118fd7a2c9ee70331ee
<= br>>
>>>
>>> has introduce this behavior.
>= ;>>
>>> I checked in Linux with coreutils 8.30 where it w= orks as like earlier
>>> versions.
>>>
>>&= gt; Thanks
>>> Ayappan P
>
>> Anyone has any ide= a on this issue ?
>>
>> Thanks
>> Ayappan P
&= gt;
> Thanks for reporting.
> It's hard (at least for me) to ge= t hold on to an AIX system,
> so would you post a trace file (from 't= russ'), please?
>
> Second, is this specific to a certain AIX v= ersion?
>
> BTW: our tests should have caught this before the r= elease.
> Do you also get an error during 'make check'?

Our te= sts were incorrect :/

Note the need for this extra check was discuss= ed at:
https://lists.gnu.org/archiv= e/html/coreutils/2017-06/msg00010.html=


Note the initial implementation there was with poll()
rather= than select(). That may work better on AIX.
Could you try the poll() so= lution at the above link,
on your system?

Attached is a fixup for= the test and an avoidance
of the issue on AIX.

cheers,
P=E1dr= aig.
[attachment "tail-aix.patch" deleted by Ayappan P2/India/= IBM]

[attachment "graycol.gif" deleted by Ayappan P2/India= /IBM]



--1__=8FBB09EFDFB00CCC8f9e8a93df938690918c8FBB09EFDFB00CCC-- --0__=8FBB09EFDFB00CCC8f9e8a93df938690918c8FBB09EFDFB00CCC Content-type: image/gif; name="graycol.gif" Content-Disposition: inline; filename="graycol.gif" Content-ID: <1__=8FBB09EFDFB00CCC8f9e8a93df938690918c8FB@> Content-Transfer-Encoding: base64 R0lGODlhEAAQAKECAMzMzAAAAP///wAAACH5BAEAAAIALAAAAAAQABAAAAIXlI+py+0PopwxUbpu ZRfKZ2zgSJbmSRYAIf4fT3B0aW1pemVkIGJ5IFVsZWFkIFNtYXJ0U2F2ZXIhAAA7 --0__=8FBB09EFDFB00CCC8f9e8a93df938690918c8FBB09EFDFB00CCC-- From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 10 12:43:12 2019 Received: (at 33946) by debbugs.gnu.org; 10 Jan 2019 17:43:12 +0000 Received: from localhost ([127.0.0.1]:54146 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gheMH-0006i9-IA for submit@debbugs.gnu.org; Thu, 10 Jan 2019 12:43:10 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:35554 helo=mx0a-001b2d01.pphosted.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gheMF-0006hx-Fm for 33946@debbugs.gnu.org; Thu, 10 Jan 2019 12:43:08 -0500 Received: from pps.filterd (m0098417.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id x0AHcKMH101569 for <33946@debbugs.gnu.org>; Thu, 10 Jan 2019 12:43:06 -0500 Received: from smtp.notes.na.collabserv.com (smtp.notes.na.collabserv.com [192.155.248.67]) by mx0a-001b2d01.pphosted.com with ESMTP id 2px9mvk6yv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for <33946@debbugs.gnu.org>; Thu, 10 Jan 2019 12:43:06 -0500 Received: from localhost by smtp.notes.na.collabserv.com with smtp.notes.na.collabserv.com ESMTP for <33946@debbugs.gnu.org> from ; Thu, 10 Jan 2019 17:43:05 -0000 Received: from us1a3-smtp03.a3.dal06.isc4sb.com (10.106.154.98) by smtp.notes.na.collabserv.com (10.106.227.16) with smtp.notes.na.collabserv.com ESMTP; Thu, 10 Jan 2019 17:43:02 -0000 Received: from us1a3-mail127.a3.dal06.isc4sb.com ([10.146.45.135]) by us1a3-smtp03.a3.dal06.isc4sb.com with ESMTP id 2019011017430123-848552 ; Thu, 10 Jan 2019 17:43:01 +0000 To: "Ayappan P2" In-Reply-To: Subject: Re: bug#33946: tail -f stops abruptly in AIX when piped. From: "Ayappan P2" Date: Thu, 10 Jan 2019 17:43:01 +0000 X-Mailer: IBM Traveler 10.0.0.0 Build 201809171646_20 on behalf of device with id TO1...P64, type 450 (ios) and description iPhone 6s:Apple-iPhone8C1/1505.216 (OS 11) X-KeepSent: E75FBA20:C625299B-0025837E:00615270; type=4; name=$KeepSent X-LLNOutbound: False X-Disclaimed: 49459 X-TNEFEvaluated: 1 x-cbid: 19011017-0327-0000-0000-0000091F03D8 X-IBM-SpamModules-Scores: BY=0; FL=0; FP=0; FZ=0; HX=0; KW=0; PH=0; SC=0.417846; ST=0; TS=0; UL=0; ISC=; MB=0.000000 X-IBM-SpamModules-Versions: BY=3.00010379; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000274; SDB=6.01144542; UDB=6.00595948; IPR=6.00924806; BA=6.00006197; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00025072; XFM=3.00000015; UTC=2019-01-10 17:43:04 X-IBM-AV-DETECTION: SAVI=unsuspicious REMOTE=unsuspicious XFE=unused X-IBM-AV-VERSION: SAVI=2019-01-10 16:46:32 - 6.00009448 x-cbparentid: 19011017-0328-0000-0000-0000FDD938A4 Message-Id: Content-type: multipart/alternative; boundary="0__=8FBB09EDDFF2D4E08f9e8a93df938690918c8FBB09EDDFF2D4E0" Content-Disposition: inline MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-01-10_07:, , signatures=0 X-Proofpoint-Spam-Reason: safe X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Any updates on this guys ? Thanks Ayappan P > On 08-Jan-2019, at 12:03 PM, Ayappan P2 wrote: > > > Now the poll() solution is working in AIX, will there be any official patch > for this ? > > It will be great to have this [...] Content analysis details: (1.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [148.163.158.5 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 HTML_MESSAGE BODY: HTML included in message 2.0 KHOP_DYNAMIC Relay looks like a dynamic address X-Debbugs-Envelope-To: 33946 Cc: 33946@debbugs.gnu.org, Bernhard Voelker , =?ISO-8859-1?Q?P=E1draig_Brady?= , Bug-coreutils X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) --0__=8FBB09EDDFF2D4E08f9e8a93df938690918c8FBB09EDDFF2D4E0 Content-type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: Quoted-printable Any updates on this guys ? Thanks Ayappan P > On 08-Jan-2019, at 12:03 PM, Ayappan P2 wrote: > > > Now the poll() solution is working in AIX, will there be any official patch > for this ? > > It will be great to have this integrated into the next release. > > Thanks > Ayappan P > > > > > From: "Ayappan P2" > To: "P=E1draig Brady" > Cc: 33946@debbugs.gnu.org, Bernhard Voelker > , Bug-coreutils > > Date: 01/07/2019 02:37 PM > Subject: bug#33946: tail -f stops abruptly in AIX when piped. > Sent by: "Bug-coreutils" +ayappap2=3Din.ibm.com@gnu.org> > > > > > The poll() solution is working in AIX. Great. > > Thanks > Ayappan P > > > > From: "P=E1draig Brady" > To: Ayappan P2 , Bernhard Voelker > > Cc: 33946@debbugs.gnu.org > Date: 01/04/2019 11:37 PM > Subject: bug#33946: tail -f stops abruptly in AIX when piped. > Sent by: "Bug-coreutils" +ayappap2=3Din.ibm.com@gnu.org> > > > >> On 03/01/19 23:01, Ayappan P2 wrote: >> >> The problem happens only when we pipe the output of "tail -f" . >> >> I am not sure how one can take the truss of "/tail -f test_file | grep >> 123" . >> >> I did little debugging on the tail code. This function > "check_output_alive" >> introduced by the commit (mentioned earlier in the thread) sents SIGPIPE >> after doing a select () call in AIX. >> And that makes it exit immediately. >> >> fd_set rfd; >> FD_ZERO (&rfd); >> FD_SET (STDOUT_FILENO, &rfd); >> >> /* readable event on STDOUT is equivalent to POLLERR, >> and implies an error condition on output like broken pipe. */ >> if (select (STDOUT_FILENO + 1, &rfd, NULL, NULL, &delay) =3D=3D 1) >> raise (SIGPIPE); >> } >> >> I didn't understand the real reason behind this commit. >> >> Thanks >> Ayappan P >> >> >> >> From: Bernhard Voelker >> To: Ayappan P2 , > 33946@debbugs.gnu.org >> Date: 01/03/2019 11:53 PM >> Subject: bug#33946: tail -f stops abruptly in AIX > when piped. >> Sent by: "Bug-coreutils" > +ayappap2=3Din.ibm.com@gnu.org> >> >> >> >> On 1/3/19 6:39 PM, Ayappan P2 wrote: >>>> On 01-Jan-2019, at 10:36 PM, Ayappan P2 wrote: >>>> Hi, >>>> >>>> I am running coreutils 8.30 in AIX machine and it seems like "tail -f" >> is >>>> not working as it used to be when the output is piped. >>>> >>>> # ./tail -f test_file | grep 123 >>>> >>>> (1) root @ aixoss-automation-3: 6.1.0.0: / >>>> >>>> It stops immediately and it seems like this commit >>>> >>>> >> > https://github.com/coreutils/coreutils/commit/ce0415fda108b7ec35181118fd7a2= c9ee70331ee > > >> >>>> >>>> has introduce this behavior. >>>> >>>> I checked in Linux with coreutils 8.30 where it works as like earlier >>>> versions. >>>> >>>> Thanks >>>> Ayappan P >> >>> Anyone has any idea on this issue ? >>> >>> Thanks >>> Ayappan P >> >> Thanks for reporting. >> It's hard (at least for me) to get hold on to an AIX system, >> so would you post a trace file (from 'truss'), please? >> >> Second, is this specific to a certain AIX version? >> >> BTW: our tests should have caught this before the release. >> Do you also get an error during 'make check'? > > Our tests were incorrect :/ > > Note the need for this extra check was discussed at: > https://lists.gnu.org/archive/html/coreutils/2017-06/msg00010.html > > > > Note the initial implementation there was with poll() > rather than select(). That may work better on AIX. > Could you try the poll() solution at the above link, > on your system? > > Attached is a fixup for the test and an avoidance > of the issue on AIX. > > cheers, > P=E1draig. > [attachment "tail-aix.patch" deleted by Ayappan P2/India/IBM] > > [attachment "graycol.gif" deleted by Ayappan P2/India/IBM] > > --0__=8FBB09EDDFF2D4E08f9e8a93df938690918c8FBB09EDDFF2D4E0 Content-type: text/html; charset=ISO-8859-1 Content-Disposition: inline Content-Transfer-Encoding: Quoted-printable


Any updates on = this guys ?

ThanksAyappan P

<= font size=3D"2">
> On 08-Jan-2019, at 12:03 P= M, Ayappan P2 <ayappap2@in.ibm.com> wrote:
>
>
> Now= the poll() solution is working in AIX, will there be any official patch> for this ?
> > It will be great to have this integrated int= o the next release.
>
> Thanks
> Ayappan P
>
>
>
>
> = From: "Ayappan P2" <ayappap2@in.ibm.com>
> To: "P=E1draig Brady" <P@draigBrady.com>= ;
> Cc: 33946@debbugs.gnu.org, Bernhard Vo= elker
> <mail@bernhard-voelker.= de>, Bug-coreutils
> <bug-co= reutils-bounces+ayappap2=3Din.ibm.com@gnu.org>
> Date: 01/07/2019 02:37 PM
> Subject= : bug#33946: tail -f stops abruptly in AIX when piped.
> Sent by: "Bug-coreutils" <bug-coreutils-boun= ces
> +ayappap2=3Din.ibm.com@gnu.o= rg>
>
> >
>
<= font size=3D"2">> The poll() solution is working in AIX. Great.
>
> Thanks
<= font size=3D"2">> Ayappan P
>
<= font size=3D"2">>
>
> From: "P=E1draig Brady" <P@draigBrady.com&= gt;
> To: Ayappan P2 <ayappap2@in.= ibm.com>, Bernhard Voelker
> &l= t;mail@bernhard-voelker.de>
> Cc: = 33946@debbugs.gnu.org
> Date: 01/04/2= 019 11:37 PM
> Subject: bug#33946: ta= il -f stops abruptly in AIX when piped.
> Sen= t by: "Bug-coreutils" <bug-coreutils-bounces
> +ayappap2=3Din.ibm.com@gnu.org>
>
>
>
>> On 03/01/19 23:01, Ay= appan P2 wrote:
>>
>> The problem happens only when we pipe the output of "t= ail -f" .
>>
>> I am not sure how one can take the truss of "/tail -f t= est_file | grep
>> 123" .
<= font size=3D"2">>>
>> I did little = debugging on the tail code. This function
> &= quot;check_output_alive"
>> introduce= d by the commit (mentioned earlier in the thread) sents SIGPIPE
<= font size=3D"2">>> after doing a select () call in AIX.
>> And that makes it exit immediately.
>>
>> fd_set rfd;
<= /font>>> FD_ZERO (&rfd);
>> FD_SET (STDOUT_FILENO, &rfd);
>>
>> /* readable event on S= TDOUT is equivalent to POLLERR,
>> an= d implies an error condition on output like broken pipe. */
>> if (select (STDOUT_FILENO + 1, &rfd, NULL, NULL= , &delay) =3D=3D 1)
>> raise (SIGP= IPE);
>> }
>= >
>> I didn't understand the real reas= on behind this commit.
>>
>> Thanks
>> Ayappan P>>
>> >>
>> From= : Bernhard Voelker <mail@bernhard-voelker.de>
>> To: Ayappan P2 <ayappap2@= in.ibm.com>,
> 33946@debbugs.gnu.org
>> Date: 01/03/2019 11:53 PM>> Subject: bug#33946: tai= l -f stops abruptly in AIX
> when piped.
<= /font>>> Sent by: "Bug-coreuti= ls" <bug-coreutils-bounces
>> = +ayappap2=3Din.ibm.com@gnu.org>
>&g= t;
>>
>>= ;
>> On 1/3/19 6:39 PM, Ayappan P2 wrote:=
>>>> On 01-Jan-2019, at 10:36 PM, A= yappan P2 <ayappap2@in.ibm.com> wrote:
>= ;>>> Hi,
>>>>
>>>> I am running coreutils 8.30 in AIX machine = and it seems like "tail -f"
>> i= s
>>>> not working as it used to be = when the output is piped.
>>>>
<= /font>>>>> # ./tail -f test_file | grep 123>>>>
>&= gt;>> (1) root @ aixoss-automation-3: 6.1.0.0: /
>>>>
>>>> It sto= ps immediately and it seems like this commit
&g= t;>>>
>>>>
>>
> https://github.com/coreutils/coreutils/commit/ce0415fda108b7ec35181118f= d7a2c9ee70331ee
>
>
>>
>>>>
>>>> has introdu= ce this behavior.
>>>>
>>>> I checked in Linux with coreutils 8.30 wher= e it works as like earlier
>>>> vers= ions.
>>>>
>>>> Thanks
>>>> Ayap= pan P
>>
>&= gt;> Anyone has any idea on this issue ?
>= >>
>>> Thanks
>>> Ayappan P
>>
>> Thanks for reporting.
>> It's hard (at least for me) to get hold on to an AIX system,>> so would you post a trace file (from 'tr= uss'), please?
>>
>> Second, is this specific to a certain AIX version?
<= font size=3D"2">>>
>> BTW: our test= s should have caught this before the release.
&g= t;> Do you also get an error during 'make check'?
>
> Our tests were incorrect :/>
> Note the nee= d for this extra check was discussed at:
> https://lists.gnu.org/archive/html/coreutils/2017-06/msg00010.html>
>
<= font size=3D"2">>
> Note the initial impl= ementation there was with poll()
> rather tha= n select(). That may work better on AIX.
> Co= uld you try the poll() solution at the above link,
> on your system?
>
> Attached is a fixup for the test and an avoidance
<= font size=3D"2">> of the issue on AIX.
> <= br>> cheers,
> P= =E1draig.
> [attachment "tail-aix.patch&= quot; deleted by Ayappan P2/India/IBM]
>
=
> [attachment "graycol.gif" deleted by= Ayappan P2/India/IBM]
>
> <graycol.gif>

--0__=8FBB09EDDFF2D4E08f9e8a93df938690918c8FBB09EDDFF2D4E0-- From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 12 22:31:05 2019 Received: (at 33946-done) by debbugs.gnu.org; 13 Jan 2019 03:31:05 +0000 Received: from localhost ([127.0.0.1]:57273 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1giWUK-00054H-Sj for submit@debbugs.gnu.org; Sat, 12 Jan 2019 22:31:05 -0500 Received: from mail.magicbluesmoke.com ([82.195.144.49]:53612) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1giWUJ-000549-II for 33946-done@debbugs.gnu.org; Sat, 12 Jan 2019 22:31:03 -0500 Received: from localhost.localdomain (unknown [76.21.115.186]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.magicbluesmoke.com (Postfix) with ESMTPSA id 764E0A171; Sun, 13 Jan 2019 03:31:02 +0000 (GMT) Subject: Re: bug#33946: tail -f stops abruptly in AIX when piped. To: Ayappan P2 References: <71ba1d06-2bdb-392f-8a54-1eb02085a1bf@bernhard-voelker.de> <7d786022-68a5-c379-ce2b-210d5b749a99@draigBrady.com> From: =?UTF-8?Q?P=c3=a1draig_Brady?= Message-ID: <0547f861-5762-37fc-5808-02dc90b8576c@draigBrady.com> Date: Sat, 12 Jan 2019 19:31:00 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 33946-done Cc: 33946-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On 07/01/19 01:04, Ayappan P2 wrote: > The poll() solution is working in AIX. Great. Thanks for testing. Pushed at: https://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commitdiff;h=d5ab4cb cheers, Pádraig From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 15 02:54:42 2019 Received: (at 33946) by debbugs.gnu.org; 15 Jan 2019 07:54:42 +0000 Received: from localhost ([127.0.0.1]:59504 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gjJYX-0007P1-SL for submit@debbugs.gnu.org; Tue, 15 Jan 2019 02:54:42 -0500 Received: from mout.kundenserver.de ([212.227.126.135]:51319) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gjJYV-0007On-HE for 33946@debbugs.gnu.org; Tue, 15 Jan 2019 02:54:40 -0500 Received: from [192.168.101.10] ([93.218.111.35]) by mrelayeu.kundenserver.de (mreue011 [212.227.15.167]) with ESMTPSA (Nemesis) id 1Mo77T-1h3HDh0NtD-00pgit; Tue, 15 Jan 2019 08:54:30 +0100 Subject: Re: bug#33946: tail -f stops abruptly in AIX when piped. To: 33946@debbugs.gnu.org, P@draigBrady.com, ayappap2@in.ibm.com References: <71ba1d06-2bdb-392f-8a54-1eb02085a1bf@bernhard-voelker.de> <7d786022-68a5-c379-ce2b-210d5b749a99@draigBrady.com> <0547f861-5762-37fc-5808-02dc90b8576c@draigBrady.com> From: Bernhard Voelker Openpgp: preference=signencrypt Autocrypt: addr=mail@bernhard-voelker.de; prefer-encrypt=mutual; keydata= mQENBFPirzMBCACyzYldTjQ4ufFOkByY5Nn5USb5GFoL48nWBwNHjd9KUbtRRNlQiPNKd6hK Gvd3BGi5aoFKA4ytfRk6jbAbW3jVb3R8wYaV08mOy4KVEKxqN4bxsXlMjNChXVR+rtKDmfI+ oPTL+cPH2X6gW4W02IRbVw0uUhNm6zEedC/gNrY/mTlf1enZ46jxZ7BTUZaG+kx38UMISIMB zSzLRtdkwgmHj4jS3p1fF2cwRqLclIfMjKGpbNFPEXeXKWrCLcqHw78795eAR9q0YvrDkfIn GdDBwfb3VM4NdulwIFzvYZMSXvSbbyPLB5YkHU5aAWQHUse4WlfT5ccDpbzUYldRAvF9ABEB AAG0K0Jlcm5oYXJkIFZvZWxrZXIgPG1haWxAYmVybmhhcmQtdm9lbGtlci5kZT6JATkEEwEC ACMFAlPirzMCGwMHCwkIBwMCAQYVCAIJCgsEFgIDAQIeAQIXgAAKCRBGUC73lpFxle5wCACC dbs0QaJ0vR3Sff2cKdTk41rUq3YfWngsR///IOU0C5DdkePmCnJE/lUsUy0LRTxcUDLxQR+x QHU8ssRT0JUO9726dI3miy36UdsgmBYaOtLvQcidGmW1R7o0PYYf04+TFtyqKgngOUBPpMgR 6o4UsQxy/OD4bN1WDqOgIjL+D/qJpkKmgp6L6+hhaBCpiOFKRmmV7YyQ3SqVlfQNiHs5ZtkR nXpIjgZARV+GllKucI17bO0CGmTJZ1tstVy0+W3DQT1lbBkTTc++5LONM99D3jjn23l1ocOp folR53F7I4cb2RNfT23v1I59RH37lB9wMOqrKj0UjYAC2YoPGQ3BuQENBFPirzMBCADXLWWp QihBldY6reca8ZKdc3T9qXEOa3akE3DWKztIBmNJhtYOjmpLYajQTkGa7UoJTnbmZE2Rn6ZE oNnvb0gcFNAIcY95KOI+bjOR8HEgh4cx2REXh6L6olIgyXqt/KFusE4wtVZAFxZl+30HzN6n D+1HvrjXxPJRX6MsIYOYyyX9/6OofwJK6QHODYGp8WL2olHDnmsXg4AT6Wlr7qKpKrQELlcF R4xkvdmgL/Ghw/tK0yJTxMIcewCCZWLPOXRmFRbvAadZWPAgVsJ63siNyUlVnVMSzDgTJl+s l/DMabXpqrJQx3/1Yy6mTaDs3XZT/wmBKaTLXx/LByaPxQQ7ABEBAAGJAR8EGAECAAkFAlPi rzMCGwwACgkQRlAu95aRcZWVPwgAqZT6iTXkoP37wYb41323RzhBcJ8JSk4cyBDBUXX0lMrM 3qhiClKG7phpxVdu817Gwc6Hsecg7FfjQAV8MHQ0ZFeEFdk3b2rKBqfsStc+h49/xF3Fb+if CzR9qeQF82fMSxkg18++7hMcHCMO/hPZ/Q0xRi+lrSr2QKDJQuLzSyVU14TxrCkevZjEhtma VNvcJlJzCbiBXee9Fpc5jITUXPFG8E8dxqo1n+duOyIMgozrAnzP7X5V/Ob/Ozf/aGGX9+Jd inyfCX18nWcHALKMU/36Eua/ylalf/2c2YkBp9KCLVmGgPkUgW52EeRPgroIsiwu+rwCSV6Z UyCJ+OymCg== Message-ID: <5162fc72-cf23-3583-7bbe-cf36da69503e@bernhard-voelker.de> Date: Tue, 15 Jan 2019 08:54:29 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.3 MIME-Version: 1.0 In-Reply-To: <0547f861-5762-37fc-5808-02dc90b8576c@draigBrady.com> Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K1:Sq+vsYnY3Z/LkJmVnGf31wi1u1PAmo+Ut/nqj/m/ejdYa0BqBv7 wOfJa98dFhpDW1qnOWFYZLTgulbMGzB0QJi4li4y8Ve6MQ/CGRCe8/9Yg5WqSVdFCBNuSVF XUqvVWXy4wLWYE4Mepf30MBuc0eLLKC9QeMn8uLUjg4WMnQAZw2VoF7ghu75SNsrKvjnHLO YMmAU9bZtGdn3MKLhu1Sw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:ucK18iTM+9k=:uosteuoTISFQq0Z2GggI1Y euy5lz0f3R8n1rWypZ1WAfdOiWqcpYgmlIyrakuFuMgd9+kUWgKukFxUNB2WpjcjvjjX9WQ78 mF+RPB8jZL5jSNtQYGm4Z5v/abUiX/mn+oNsy5yHvBBZn60f+3ouSvC9UsU35/b0YnbWNLnsT xkgDNVyvtkdUzaYxJJCBXPZFrS9dg35eXINQLVnQlWpXI3gnujB+pu1KSAQjllpyA6uqG+ley hnBbS+MbkNwI6EGHfdURcKX+dQKwwhbM2hJmiGgi//Opv7hkEEif7MVw+a8PP3VczRNfBpFNd YII4u5mwgn+pqIoWl/WaYt6cL98QG44SFjAcd9Edo9ZrpDmMX9Kby5ayMVPFuYgcTC/nR5dhd eHSA3QESfOJbIiDFEXumWsyXwKZkuotnan3b5bsOlAItbe7vqQggGAUhT1D1fFs5UxDsnI6+9 tmOYQsx2w5ntJVsuH9Uj3eoTVReW3FaY9BWTMsx3yhsNdupC6AtAU+c+LwgpaRm9IRhxW6Fx+ /eFEOZAE7DijazFnlo4eZz+XKr5KHi6nZNftgoypswlRwfGpcMAylR23+m2+WcH/wqXYFWbOU np2RTBJDjqJlyaa1E0BNISiYvEdIlRIr8mg04HdQ9b9gy5hNm1B/NV3rAtXlzRGh340KrUeI6 mOqD70cxaSMGwChq1rgWaGlXbiSibUFMuRBcHdV90jDNcoevLkv0may6YjaNySNTptTF0TbvE aFAgfCSWJSSDdsbNJ4gR6r4w0j8IZJpklOD0g1bfdAsPiUp/XKNCjtP/87lTSz+o32p+fJZ5S ol0Tozc X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 33946 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On 1/13/19 4:31 AM, Pádraig Brady wrote: > Thanks for testing. Pushed at: > https://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commitdiff;h=d5ab4cb > -timeout 10 tail -f $mode $fastpoll out | sleep .1 || fail=1 > +(returns_ 124 timeout 10 tail -n2 -f $mode $fastpoll out && touch timed_out) | > + sed 2q > out2 > +test -e timed_out && fail=1 > +compare exp out2 || fail=1 I see the 'timed_out' file when running the test on openSUSE's build service for Linux x86_64, and can reproduce when running that in the local 'osc' build environment (chroot-based). I'm not sure what's the problem though, but could this be related to how we fixed 'tests/misc/seq-epipe.sh' a while ago in v8.25-42-g383e4b2ce? BTW: in the 2nd iteration, the test doesn't delete 'timed_out', so will always set fail=1 if the 1st one failed. Have a nice day, Berny From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 15 07:42:53 2019 Received: (at 33946) by debbugs.gnu.org; 15 Jan 2019 12:42:53 +0000 Received: from localhost ([127.0.0.1]:59606 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gjO3Q-0001Wk-UM for submit@debbugs.gnu.org; Tue, 15 Jan 2019 07:42:53 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:48886 helo=mx0a-001b2d01.pphosted.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gjO3N-0001WZ-CB for 33946@debbugs.gnu.org; Tue, 15 Jan 2019 07:42:49 -0500 Received: from pps.filterd (m0098414.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id x0FCd6iP134344 for <33946@debbugs.gnu.org>; Tue, 15 Jan 2019 07:42:48 -0500 Received: from smtp.notes.na.collabserv.com (smtp.notes.na.collabserv.com [192.155.248.93]) by mx0b-001b2d01.pphosted.com with ESMTP id 2q1dnve2rd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for <33946@debbugs.gnu.org>; Tue, 15 Jan 2019 07:42:48 -0500 Received: from localhost by smtp.notes.na.collabserv.com with smtp.notes.na.collabserv.com ESMTP for <33946@debbugs.gnu.org> from ; Tue, 15 Jan 2019 12:42:47 -0000 Received: from us1a3-smtp06.a3.dal06.isc4sb.com (10.146.103.243) by smtp.notes.na.collabserv.com (10.106.227.39) with smtp.notes.na.collabserv.com ESMTP; Tue, 15 Jan 2019 12:42:43 -0000 Received: from us1a3-mail127.a3.dal06.isc4sb.com ([10.146.45.135]) by us1a3-smtp06.a3.dal06.isc4sb.com with ESMTP id 2019011512424214-460785 ; Tue, 15 Jan 2019 12:42:42 +0000 In-Reply-To: <5162fc72-cf23-3583-7bbe-cf36da69503e@bernhard-voelker.de> Subject: Re: bug#33946: tail -f stops abruptly in AIX when piped. To: P@draigBrady.com From: "Ayappan P2" Date: Tue, 15 Jan 2019 18:12:43 +0530 References: <71ba1d06-2bdb-392f-8a54-1eb02085a1bf@bernhard-voelker.de><7d786022-68a5-c379-ce2b-210d5b749a99@draigBrady.com><0547f861-5762-37fc-5808-02dc90b8576c@draigBrady.com> <5162fc72-cf23-3583-7bbe-cf36da69503e@bernhard-voelker.de> X-KeepSent: 86D85C97:7DFD1324-00258383:00456B80; type=4; name=$KeepSent X-Mailer: IBM Notes Release 9.0.1FP10 SHF68 March 06, 2018 X-LLNOutbound: False X-Disclaimed: 38299 X-TNEFEvaluated: 1 x-cbid: 19011512-1799-0000-0000-00000A032B3E X-IBM-SpamModules-Scores: BY=0; FL=0; FP=0; FZ=0; HX=0; KW=0; PH=0; SC=0.394815; ST=0; TS=0; UL=0; ISC=; MB=0.001164 X-IBM-SpamModules-Versions: BY=3.00010410; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000274; SDB=6.01146814; UDB=6.00597328; IPR=6.00927106; BA=6.00006200; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00025137; XFM=3.00000015; UTC=2019-01-15 12:42:46 X-IBM-AV-DETECTION: SAVI=unsuspicious REMOTE=unsuspicious XFE=unused X-IBM-AV-VERSION: SAVI=2019-01-15 07:25:30 - 6.00009467 x-cbparentid: 19011512-1800-0000-0000-0000FD301F37 Message-Id: Content-type: multipart/related; boundary="0__=8FBB0910DFD6ED108f9e8a93df938690918c8FBB0910DFD6ED10" MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-01-15_04:, , signatures=0 X-Proofpoint-Spam-Reason: safe X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 33946 Cc: 33946@debbugs.gnu.org, Bernhard Voelker , Bug-coreutils X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --0__=8FBB0910DFD6ED108f9e8a93df938690918c8FBB0910DFD6ED10 Content-type: multipart/alternative; Boundary="1__=8FBB0910DFD6ED108f9e8a93df938690918c8FBB0910DFD6ED10" --1__=8FBB0910DFD6ED108f9e8a93df938690918c8FBB0910DFD6ED10 Content-type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: Quoted-printable The patch/commit is not proper. The select() call will still be invoked in AIX. It should be like this. # diff -u src/tail.c_orig src/tail.c --- src/tail.c_orig 2019-01-01 19:39:32 +0000 +++ src/tail.c 2019-01-15 17:58:23 +0000 @@ -30,6 +30,9 @@ #include #include #include +#ifdef _AIX +# include +#endif #include "system.h" #include "argmatch.h" @@ -338,6 +341,15 @@ if (! monitor_output) return; +#ifdef _AIX + /* select on AIX was seen to give a readable event immediately. */ + struct pollfd pfd; + pfd.fd =3D STDOUT_FILENO; + pfd.events =3D POLLERR; + + if (poll (&pfd, 1, 0) >=3D 0 && (pfd.revents & POLLERR)) + raise (SIGPIPE); +#else struct timeval delay; delay.tv_sec =3D delay.tv_usec =3D 0; @@ -349,6 +361,7 @@ and implies an error condition on output like broken pipe. */ if (select (STDOUT_FILENO + 1, &rfd, NULL, NULL, &delay) =3D=3D 1) raise (SIGPIPE); +#endif } Thanks Ayappan P From: Bernhard Voelker To: 33946@debbugs.gnu.org, P@draigBrady.com, ayappap2@in.ibm.com Date: 01/15/2019 01:25 PM Subject: bug#33946: tail -f stops abruptly in AIX when piped. Sent by: "Bug-coreutils" On 1/13/19 4:31 AM, P=E1draig Brady wrote: > Thanks for testing. Pushed at: > https://git.sv.gnu.org/gitweb/?p=3Dcoreutils.git;a=3Dcommitdiff;h=3Dd5ab4cb > -timeout 10 tail -f $mode $fastpoll out | sleep .1 || fail=3D1 > +(returns_ 124 timeout 10 tail -n2 -f $mode $fastpoll out && touch timed_out) | > + sed 2q > out2 > +test -e timed_out && fail=3D1 > +compare exp out2 || fail=3D1 I see the 'timed_out' file when running the test on openSUSE's build service for Linux x86_64, and can reproduce when running that in the local 'osc' build environment (chroot-based). I'm not sure what's the problem though, but could this be related to how we fixed 'tests/misc/seq-epipe.sh' a while ago in v8.25-42-g383e4b2ce? BTW: in the 2nd iteration, the test doesn't delete 'timed_out', so will always set fail=3D1 if the 1st one failed. Have a nice day, Berny --1__=8FBB0910DFD6ED108f9e8a93df938690918c8FBB0910DFD6ED10 Content-type: text/html; charset=ISO-8859-1 Content-Disposition: inline Content-Transfer-Encoding: Quoted-printable

The patch/commit is not proper. The select(= ) call will still be invoked in AIX.
It should = be like this.

# diff -u src/tail.c_orig src/= tail.c
--- src/tail.c_orig 2019-01-01 19:39:= 32 +0000
+++ src/tail.c 2019-01-15 17:58:23 +00= 00
@@ -30,6 +30,9 @@
= #include <getopt.h>
#include <sys/typ= es.h>
#include <signal.h>
+#ifdef _AIX
+# include <poll.= h>
+#endif

#i= nclude "system.h"
#include "argm= atch.h"
@@ -338,6 +341,15 @@
if (! monitor_output)
retur= n;

+#ifdef _AIX
+= /* select on AIX was seen to give a readable event immediately. */
+ struct pollfd pfd;
+ p= fd.fd =3D STDOUT_FILENO;
+ pfd.events =3D POLLE= RR;
+
+ if (poll (&= amp;pfd, 1, 0) >=3D 0 && (pfd.revents & POLLERR))
= + raise (SIGPIPE);
+#else

struct timeval delay;
delay.tv_sec =3D delay.tv_usec =3D 0;

@= @ -349,6 +361,7 @@
and implies an error co= ndition on output like broken pipe. */
if (s= elect (STDOUT_FILENO + 1, &rfd, NULL, NULL, &delay) =3D=3D 1)
raise (SIGPIPE);
+#en= dif
}

Thanks
Ayappan P

3D"InactiveBernhard Voelker ---01/15/2019 01:25:14 PM---On= 1/13/19 4:31 AM, P=E1draig Brady wrote: > Thanks for testing. Pushed at= :

From: Bernhard Voelker <mail@bernhard-voelker.de>

To:
33946@d= ebbugs.gnu.org, P@draigBrady.com, ayappap2@in.ibm.com
Date: 01/15/2019 01= :25 PM
Subject: = bug#33946: tail -f stops abruptly in AIX when piped.
Sent by: "Bug-coreutils" <bug-coreutils-bounces+ayappap2=3Din.ib= m.com@gnu.org>





On 1/13/19= 4:31 AM, P=E1draig Brady wrote:
> Thanks for testing. Pushed at:
= >
https://git.sv.gnu.org/g= itweb/?p=3Dcoreutils.git;a=3Dcommitdiff;h=3Dd5ab4cb

> -timeout 10 tail -f $mode $fastpoll out | sleep .= 1 || fail=3D1
> +(returns_ 124 timeout 10 tail -n2 -f $mode $fastpoll= out && touch timed_out) |
> + sed 2q > out2
> +test= -e timed_out && fail=3D1
> +compare exp out2 || fail=3D1
=
I see the 'timed_out' file when running the test on openSUSE's build se= rvice
for Linux x86_64, and can reproduce when running that in the local= 'osc' build
environment (chroot-based).

I'm not sure what's the = problem though, but could this be related to
how we fixed 'tests/misc/se= q-epipe.sh' a while ago in v8.25-42-g383e4b2ce?

BTW: in the 2nd iter= ation, the test doesn't delete 'timed_out',
so will always set fail=3D1 = if the 1st one failed.

Have a nice day,
Berny




=



--1__=8FBB0910DFD6ED108f9e8a93df938690918c8FBB0910DFD6ED10-- --0__=8FBB0910DFD6ED108f9e8a93df938690918c8FBB0910DFD6ED10 Content-type: image/gif; name="graycol.gif" Content-Disposition: inline; filename="graycol.gif" Content-ID: <1__=8FBB0910DFD6ED108f9e8a93df938690918c8FB@> Content-Transfer-Encoding: base64 R0lGODlhEAAQAKECAMzMzAAAAP///wAAACH5BAEAAAIALAAAAAAQABAAAAIXlI+py+0PopwxUbpu ZRfKZ2zgSJbmSRYAIf4fT3B0aW1pemVkIGJ5IFVsZWFkIFNtYXJ0U2F2ZXIhAAA7 --0__=8FBB0910DFD6ED108f9e8a93df938690918c8FBB0910DFD6ED10-- From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 15 22:10:08 2019 Received: (at 33946) by debbugs.gnu.org; 16 Jan 2019 03:10:08 +0000 Received: from localhost ([127.0.0.1]:60506 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gjbai-0005jG-9U for submit@debbugs.gnu.org; Tue, 15 Jan 2019 22:10:08 -0500 Received: from mail.magicbluesmoke.com ([82.195.144.49]:43604) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gjbad-0005ig-Fr for 33946@debbugs.gnu.org; Tue, 15 Jan 2019 22:10:07 -0500 Received: from localhost.localdomain (unknown [76.21.115.186]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.magicbluesmoke.com (Postfix) with ESMTPSA id E3ADEA4B3; Wed, 16 Jan 2019 03:09:59 +0000 (GMT) Subject: Re: bug#33946: tail -f stops abruptly in AIX when piped. To: Bernhard Voelker , 33946@debbugs.gnu.org, ayappap2@in.ibm.com References: <71ba1d06-2bdb-392f-8a54-1eb02085a1bf@bernhard-voelker.de> <7d786022-68a5-c379-ce2b-210d5b749a99@draigBrady.com> <0547f861-5762-37fc-5808-02dc90b8576c@draigBrady.com> <5162fc72-cf23-3583-7bbe-cf36da69503e@bernhard-voelker.de> From: =?UTF-8?Q?P=c3=a1draig_Brady?= Message-ID: <42924773-7a68-227c-2d69-57ae9416808b@draigBrady.com> Date: Tue, 15 Jan 2019 19:09:57 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <5162fc72-cf23-3583-7bbe-cf36da69503e@bernhard-voelker.de> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 33946 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On 14/01/19 23:54, Bernhard Voelker wrote: > On 1/13/19 4:31 AM, Pádraig Brady wrote: >> Thanks for testing. Pushed at: >> https://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commitdiff;h=d5ab4cb > >> -timeout 10 tail -f $mode $fastpoll out | sleep .1 || fail=1 >> +(returns_ 124 timeout 10 tail -n2 -f $mode $fastpoll out && touch timed_out) | >> + sed 2q > out2 >> +test -e timed_out && fail=1 >> +compare exp out2 || fail=1 > > I see the 'timed_out' file when running the test on openSUSE's build service > for Linux x86_64, and can reproduce when running that in the local 'osc' build > environment (chroot-based). > > I'm not sure what's the problem though, but could this be related to > how we fixed 'tests/misc/seq-epipe.sh' a while ago in v8.25-42-g383e4b2ce? I can't see the problem offhand. > BTW: in the 2nd iteration, the test doesn't delete 'timed_out', > so will always set fail=1 if the 1st one failed. Yes we should `rm -f timed_out` beforehand to be cleaner. cheers, Pádraig From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 15 22:11:45 2019 Received: (at 33946) by debbugs.gnu.org; 16 Jan 2019 03:11:46 +0000 Received: from localhost ([127.0.0.1]:60510 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gjbcF-0005lg-KV for submit@debbugs.gnu.org; Tue, 15 Jan 2019 22:11:45 -0500 Received: from mail.magicbluesmoke.com ([82.195.144.49]:43612) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gjbcE-0005lY-1h for 33946@debbugs.gnu.org; Tue, 15 Jan 2019 22:11:42 -0500 Received: from localhost.localdomain (unknown [76.21.115.186]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.magicbluesmoke.com (Postfix) with ESMTPSA id B050DA4E5; Wed, 16 Jan 2019 03:11:40 +0000 (GMT) Subject: Re: bug#33946: tail -f stops abruptly in AIX when piped. To: Ayappan P2 References: <71ba1d06-2bdb-392f-8a54-1eb02085a1bf@bernhard-voelker.de> <7d786022-68a5-c379-ce2b-210d5b749a99@draigBrady.com> <0547f861-5762-37fc-5808-02dc90b8576c@draigBrady.com> <5162fc72-cf23-3583-7bbe-cf36da69503e@bernhard-voelker.de> From: =?UTF-8?Q?P=c3=a1draig_Brady?= Message-ID: <8cfe67b1-78b8-d83c-26f7-b6166d23982e@draigBrady.com> Date: Tue, 15 Jan 2019 19:11:39 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 33946 Cc: 33946@debbugs.gnu.org, Bernhard Voelker , Bug-coreutils X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On 15/01/19 04:42, Ayappan P2 wrote: > > The patch/commit is not proper. The select() call will still be invoked in > AIX. Drats I pushed the debugging version of my patch :/ I'll fix up (preferably with Bernhard's test issue also addressed) From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 17 09:26:17 2019 Received: (at 33946) by debbugs.gnu.org; 17 Jan 2019 14:26:17 +0000 Received: from localhost ([127.0.0.1]:34305 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gk8cb-0003nB-1b for submit@debbugs.gnu.org; Thu, 17 Jan 2019 09:26:17 -0500 Received: from mout.kundenserver.de ([217.72.192.73]:53371) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gk8cZ-0003n0-84 for 33946@debbugs.gnu.org; Thu, 17 Jan 2019 09:26:15 -0500 Received: from [10.0.2.15] ([62.153.148.194]) by mrelayeu.kundenserver.de (mreue107 [212.227.15.183]) with ESMTPSA (Nemesis) id 1M5x9B-1grYaC3ygN-007YBU; Thu, 17 Jan 2019 15:25:04 +0100 Subject: Re: bug#33946: tail -f stops abruptly in AIX when piped. To: =?UTF-8?Q?P=c3=a1draig_Brady?= , 33946@debbugs.gnu.org, ayappap2@in.ibm.com References: <71ba1d06-2bdb-392f-8a54-1eb02085a1bf@bernhard-voelker.de> <7d786022-68a5-c379-ce2b-210d5b749a99@draigBrady.com> <0547f861-5762-37fc-5808-02dc90b8576c@draigBrady.com> <5162fc72-cf23-3583-7bbe-cf36da69503e@bernhard-voelker.de> <42924773-7a68-227c-2d69-57ae9416808b@draigBrady.com> From: Bernhard Voelker Message-ID: <7c23830f-9283-acbf-ba38-5c6afdb57a78@bernhard-voelker.de> Date: Thu, 17 Jan 2019 15:25:02 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.3 MIME-Version: 1.0 In-Reply-To: <42924773-7a68-227c-2d69-57ae9416808b@draigBrady.com> Content-Type: text/plain; charset=windows-1252 Content-Language: de-DE-1901 Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K1:WoZ6sMQDy1kSjovAeSC2oST6mmb06axLVwryIB2w9BVpfj5zRFS x6j6cQrRF6blK6epj/kWc6Xe+xCUQPX+QO6G4Nkr81UEv+huNMPNwqjjof6QqZYVfrXejr4 gADMjveuZWH7vAkxn1yoQpHdr4NXuhn53aqE2k+yxoWKfzJS1fIuE6MnQNeVUefr4wASUuW 7Z6UCnuRtd7gDAx7xl1Jw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:s924dfvGpf0=:avfCNKQQ3pF0dCX3hqUayX k5jUk5wPamjpEFwUQwjaWi6+SrLmO9Q/gb2gMskSdrIen0U3Aeldj6N2FNRGKqKyLleQU+GGp V5CpLKI9GyXe2lDCfjNfyaErIKWg+q7DfgflSoQSuVF1UcWL9oooCFczaeq5lr9326pdV1vDp hFCNaFzgsiTJcBHY7Ti1GQc08FWPAayRJHQTjgXnsnDgNiJjIRH86mH9WFRr9XXoAuI62GvX8 4emxtxu1C2oCSL/cYeFzqO19nZ7SiIQMuFpJQIiP6rzxOSTEX12kUWajOBnptzHgwFz5bNljm k3lYlcFC6X7XkPSjM8Q3yNyFRsKFDZGRyoFRMPEZiCsn58sYo0ef1h0/JOwNrk8uUYITetZku RhEp0u8njjPUDJRxY3b+vcmvpHjbfyh1IuP1nLDsgdFEIgQ8QMEoJOwUhk+hz0P56v6aLuhbS 3f/5W/WJ+ZsWE1bmZX3TnvOE9B4IktVTV1iGrNCrc2Z7M7AUjHN6hDk9TxM1ide4Qy+cHj4qN rajidrOBBw8lp2czbTui3/9FPs4qfwLDZJdF20RS+xBNkiauCtI+lGf+q43xDJJQhi9En72oN ZYJC/DawZT2m96vRe96U29z9h6O5+2FAYHBd3CrVUki0boi6TSkNrBPGeKKcWfNh3ETo+vOan /6MRcZLBMdS4GpOAXS7rinkD6SIxyA6JeUd4T2JzaD0QPoRzrPUdtHUZDfZPzQ28V/k72uigK CbjZe5Wh1qWJ5Yi3m45HxQMbnUKToqRWOACLhXsNGRLqUw7vXEEaaNgI+9ZlumO7dJdBN1gIs Z9HxTve X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 33946 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On 1/16/19 4:09 AM, Pádraig Brady wrote: > On 14/01/19 23:54, Bernhard Voelker wrote: >> On 1/13/19 4:31 AM, Pádraig Brady wrote: >>> Thanks for testing. Pushed at: >>> https://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commitdiff;h=d5ab4cb >> >>> -timeout 10 tail -f $mode $fastpoll out | sleep .1 || fail=1 >>> +(returns_ 124 timeout 10 tail -n2 -f $mode $fastpoll out && touch timed_out) | >>> + sed 2q > out2 >>> +test -e timed_out && fail=1 >>> +compare exp out2 || fail=1 >> >> I see the 'timed_out' file when running the test on openSUSE's build service >> for Linux x86_64, and can reproduce when running that in the local 'osc' build >> environment (chroot-based). >> >> I'm not sure what's the problem though, but could this be related to >> how we fixed 'tests/misc/seq-epipe.sh' a while ago in v8.25-42-g383e4b2ce? > > I can't see the problem offhand. I also still don't see the problem. In the log, it's just: + returns_ 124 timeout 10 tail -n2 -f ---disable-inotify -s.1 --max-unchanged-stats=1 out + sed 2q + touch timed_out + test -e timed_out + fail=1 Well, under strace: In the good case, i.e., without chroot, the process terminates upon the first SIGPIPE received: ... inotify_init() = 4 write(1, "==> standard input <==\nar\n", 26) = 26 inotify_add_watch(4, "out", IN_MODIFY) = 1 stat("out", {st_dev=makedev(0x8, 0x20), st_ino=298091, st_mode=S_IFREG|0644, st_nlink=1, st_uid=717, st_gid=1000, ...}) = 0 fstat(3, {st_dev=makedev(0x8, 0x20), st_ino=298091, st_mode=S_IFREG|0644, st_nlink=1, st_uid=717, st_gid=1000, ...}) = 0 select(5, [1 4], NULL, NULL, NULL) = 1 (in [1]) rt_sigprocmask(SIG_BLOCK, ~[RTMIN RT_1], [], 8) = 0 getpid() = 29422 gettid() = 29422 tgkill(29422, 29422, SIGPIPE) = 0 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 --- SIGPIPE {si_signo=SIGPIPE, si_code=SI_TKILL, si_pid=29422, si_uid=717} --- +++ killed by SIGPIPE +++ In the bad case, i.e., in the chroot'ed "osc build" environment or on 'build.opensuse.org', I see: ... inotify_init() = 4 write(1, "==> standard input <==\nar\n", 26) = 26 inotify_add_watch(4, "out", IN_MODIFY) = 1 stat("out", {st_dev=makedev(0x8, 0x1), st_ino=192286, st_mode=S_IFREG|0644, st_nlink=1, st_uid=399, st_gid=399, ...}) = 0 fstat(3, {st_dev=makedev(0x8, 0x1), st_ino=192286, st_mode=S_IFREG|0644, st_nlink=1, st_uid=399, st_gid=399, ...}) = 0 select(5, [1 4], NULL, NULL, NULL) = 1 (in [1]) rt_sigprocmask(SIG_BLOCK, ~[RTMIN RT_1], [], 8) = 0 getpid() = 29191 gettid() = 29191 tgkill(29191, 29191, SIGPIPE) = 0 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 --- SIGPIPE {si_signo=SIGPIPE, si_code=SI_TKILL, si_pid=29191, si_uid=399} --- select(5, [1 4], NULL, NULL, NULL) = 1 (in [1]) rt_sigprocmask(SIG_BLOCK, ~[RTMIN RT_1], [], 8) = 0 getpid() = 29191 gettid() = 29191 tgkill(29191, 29191, SIGPIPE) = 0 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 --- SIGPIPE {si_signo=SIGPIPE, si_code=SI_TKILL, si_pid=29191, si_uid=399} --- select(5, [1 4], NULL, NULL, NULL) = 1 (in [1]) rt_sigprocmask(SIG_BLOCK, ~[RTMIN RT_1], [], 8) = 0 getpid() = 29191 gettid() = 29191 tgkill(29191, 29191, SIGPIPE) = 0 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 --- SIGPIPE {si_signo=SIGPIPE, si_code=SI_TKILL, si_pid=29191, si_uid=399} --- [... a.s.o ...] and finally gets killed by 'timeout 10': ... --- SIGPIPE {si_signo=SIGPIPE, si_code=SI_TKILL, si_pid=29191, si_uid=399} --- --- SIGTERM {si_signo=SIGTERM, si_code=SI_USER, si_pid=29187, si_uid=399} --- +++ killed by SIGTERM +++ Any idea? Have a nice day, Berny From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 20 03:46:44 2019 Received: (at 33946) by debbugs.gnu.org; 20 Jan 2019 08:46:44 +0000 Received: from localhost ([127.0.0.1]:38278 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gl8ke-0004ZJ-8j for submit@debbugs.gnu.org; Sun, 20 Jan 2019 03:46:44 -0500 Received: from mail.magicbluesmoke.com ([82.195.144.49]:56068) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gl8kc-0004ZA-A8 for 33946@debbugs.gnu.org; Sun, 20 Jan 2019 03:46:42 -0500 Received: from localhost.localdomain (unknown [76.21.115.186]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.magicbluesmoke.com (Postfix) with ESMTPSA id 57910C534; Sun, 20 Jan 2019 08:46:40 +0000 (GMT) Subject: Re: bug#33946: tail -f stops abruptly in AIX when piped. To: Ayappan P2 References: <71ba1d06-2bdb-392f-8a54-1eb02085a1bf@bernhard-voelker.de> <7d786022-68a5-c379-ce2b-210d5b749a99@draigBrady.com> <0547f861-5762-37fc-5808-02dc90b8576c@draigBrady.com> <5162fc72-cf23-3583-7bbe-cf36da69503e@bernhard-voelker.de> <8cfe67b1-78b8-d83c-26f7-b6166d23982e@draigBrady.com> From: =?UTF-8?Q?P=c3=a1draig_Brady?= Message-ID: <337ccd1d-7dfb-f5aa-0097-56e089cfa0e4@draigBrady.com> Date: Sun, 20 Jan 2019 00:46:38 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <8cfe67b1-78b8-d83c-26f7-b6166d23982e@draigBrady.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 33946 Cc: 33946@debbugs.gnu.org, Bernhard Voelker , Bug-coreutils X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On 15/01/19 19:11, Pádraig Brady wrote: > On 15/01/19 04:42, Ayappan P2 wrote: >> >> The patch/commit is not proper. The select() call will still be invoked in >> AIX. > > Drats I pushed the debugging version of my patch :/ > I'll fix up (preferably with Bernhard's test issue also addressed) Pushed the fix up in your name: https://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commitdiff;h=17983b2 Bernhard's test issue will be addressed separately. cheers, Pádraig From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 20 04:00:38 2019 Received: (at 33946) by debbugs.gnu.org; 20 Jan 2019 09:00:38 +0000 Received: from localhost ([127.0.0.1]:38285 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gl8y0-0004uy-Ge for submit@debbugs.gnu.org; Sun, 20 Jan 2019 04:00:38 -0500 Received: from mail.magicbluesmoke.com ([82.195.144.49]:56080) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gl8xy-0004ur-PI for 33946@debbugs.gnu.org; Sun, 20 Jan 2019 04:00:31 -0500 Received: from localhost.localdomain (unknown [76.21.115.186]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.magicbluesmoke.com (Postfix) with ESMTPSA id BD6DCC681; Sun, 20 Jan 2019 09:00:29 +0000 (GMT) Subject: Re: bug#33946: tail -f stops abruptly in AIX when piped. To: Bernhard Voelker , 33946@debbugs.gnu.org References: <71ba1d06-2bdb-392f-8a54-1eb02085a1bf@bernhard-voelker.de> <7d786022-68a5-c379-ce2b-210d5b749a99@draigBrady.com> <0547f861-5762-37fc-5808-02dc90b8576c@draigBrady.com> <5162fc72-cf23-3583-7bbe-cf36da69503e@bernhard-voelker.de> <42924773-7a68-227c-2d69-57ae9416808b@draigBrady.com> <7c23830f-9283-acbf-ba38-5c6afdb57a78@bernhard-voelker.de> From: =?UTF-8?Q?P=c3=a1draig_Brady?= Message-ID: <21e6cf05-4100-5492-ef86-4e5f7904fe8e@draigBrady.com> Date: Sun, 20 Jan 2019 01:00:27 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <7c23830f-9283-acbf-ba38-5c6afdb57a78@bernhard-voelker.de> Content-Type: multipart/mixed; boundary="------------F328B82050EB81F18A2E7C64" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 33946 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) This is a multi-part message in MIME format. --------------F328B82050EB81F18A2E7C64 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit On 17/01/19 06:25, Bernhard Voelker wrote: > On 1/16/19 4:09 AM, Pádraig Brady wrote: >> On 14/01/19 23:54, Bernhard Voelker wrote: >>> On 1/13/19 4:31 AM, Pádraig Brady wrote: >>>> Thanks for testing. Pushed at: >>>> https://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commitdiff;h=d5ab4cb >>> >>>> -timeout 10 tail -f $mode $fastpoll out | sleep .1 || fail=1 >>>> +(returns_ 124 timeout 10 tail -n2 -f $mode $fastpoll out && touch timed_out) | >>>> + sed 2q > out2 >>>> +test -e timed_out && fail=1 >>>> +compare exp out2 || fail=1 >>> >>> I see the 'timed_out' file when running the test on openSUSE's build service >>> for Linux x86_64, and can reproduce when running that in the local 'osc' build >>> environment (chroot-based). >>> >>> I'm not sure what's the problem though, but could this be related to >>> how we fixed 'tests/misc/seq-epipe.sh' a while ago in v8.25-42-g383e4b2ce? >> >> I can't see the problem offhand. > > I also still don't see the problem. In the log, it's just: > > + returns_ 124 timeout 10 tail -n2 -f ---disable-inotify -s.1 --max-unchanged-stats=1 out > + sed 2q > + touch timed_out > + test -e timed_out > + fail=1 > > Well, under strace: > > In the good case, i.e., without chroot, the process terminates upon the first > SIGPIPE received: > > ... > inotify_init() = 4 > write(1, "==> standard input <==\nar\n", 26) = 26 > inotify_add_watch(4, "out", IN_MODIFY) = 1 > stat("out", {st_dev=makedev(0x8, 0x20), st_ino=298091, st_mode=S_IFREG|0644, st_nlink=1, st_uid=717, st_gid=1000, ...}) = 0 > fstat(3, {st_dev=makedev(0x8, 0x20), st_ino=298091, st_mode=S_IFREG|0644, st_nlink=1, st_uid=717, st_gid=1000, ...}) = 0 > select(5, [1 4], NULL, NULL, NULL) = 1 (in [1]) > rt_sigprocmask(SIG_BLOCK, ~[RTMIN RT_1], [], 8) = 0 > getpid() = 29422 > gettid() = 29422 > tgkill(29422, 29422, SIGPIPE) = 0 > rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 > --- SIGPIPE {si_signo=SIGPIPE, si_code=SI_TKILL, si_pid=29422, si_uid=717} --- > +++ killed by SIGPIPE +++ > > In the bad case, i.e., in the chroot'ed "osc build" environment or on 'build.opensuse.org', > I see: > > ... > inotify_init() = 4 > write(1, "==> standard input <==\nar\n", 26) = 26 > inotify_add_watch(4, "out", IN_MODIFY) = 1 > stat("out", {st_dev=makedev(0x8, 0x1), st_ino=192286, st_mode=S_IFREG|0644, st_nlink=1, st_uid=399, st_gid=399, ...}) = 0 > fstat(3, {st_dev=makedev(0x8, 0x1), st_ino=192286, st_mode=S_IFREG|0644, st_nlink=1, st_uid=399, st_gid=399, ...}) = 0 > select(5, [1 4], NULL, NULL, NULL) = 1 (in [1]) > rt_sigprocmask(SIG_BLOCK, ~[RTMIN RT_1], [], 8) = 0 > getpid() = 29191 > gettid() = 29191 > tgkill(29191, 29191, SIGPIPE) = 0 > rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 > --- SIGPIPE {si_signo=SIGPIPE, si_code=SI_TKILL, si_pid=29191, si_uid=399} --- > select(5, [1 4], NULL, NULL, NULL) = 1 (in [1]) > rt_sigprocmask(SIG_BLOCK, ~[RTMIN RT_1], [], 8) = 0 > getpid() = 29191 > gettid() = 29191 > tgkill(29191, 29191, SIGPIPE) = 0 > rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 > --- SIGPIPE {si_signo=SIGPIPE, si_code=SI_TKILL, si_pid=29191, si_uid=399} --- > select(5, [1 4], NULL, NULL, NULL) = 1 (in [1]) > rt_sigprocmask(SIG_BLOCK, ~[RTMIN RT_1], [], 8) = 0 > getpid() = 29191 > gettid() = 29191 > tgkill(29191, 29191, SIGPIPE) = 0 > rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 > --- SIGPIPE {si_signo=SIGPIPE, si_code=SI_TKILL, si_pid=29191, si_uid=399} --- > [... a.s.o ...] > > and finally gets killed by 'timeout 10': > > ... > --- SIGPIPE {si_signo=SIGPIPE, si_code=SI_TKILL, si_pid=29191, si_uid=399} --- > --- SIGTERM {si_signo=SIGTERM, si_code=SI_USER, si_pid=29187, si_uid=399} --- > +++ killed by SIGTERM +++ > > Any idea? Right. So the broken pipe is detected fine which is the main thing. It's just that the osc system has SIGPIPE ignored (python2 based systems do this by default, which may be related). I was looking are setting normal handling with `trap - SIGPIPE` in the test, but that's only effective if ignored in the same shell. If the parent/login shell has ignored SIGPIPE, then resetting it is ineffective. However... tail should be exiting irrespective of the handling of SIGPIPE. In fact it goes into an infinite loop in the edge case of: inotify + ignored sigpipe + early exit filters. The attached ensures the tail process exits, which handles the infinite loop and the test failure. cheers, Pádraig. --------------F328B82050EB81F18A2E7C64 Content-Type: text/x-patch; name="tail-pipe-hang.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="tail-pipe-hang.patch" =46rom cf36c2983a150d5e9a9bf631832a91d4a31259d0 Mon Sep 17 00:00:00 2001 From: =3D?UTF-8?q?P=3DC3=3DA1draig=3D20Brady?=3D Date: Sun, 20 Jan 2019 00:13:15 -0800 Subject: [PATCH] tail: fix handling of broken pipes with SIGPIPE ignored * init.cfg (trap_sigpipe_or_skip_): A new function refactored from... * tests/misc/printf-surprise.sh: ...here. * tests/misc/seq-epipe.sh. Likewise. * src/tail.c (die_pipe): Ensure we exit upon sending SIGPIPE. * tests/tail-2/pipe-f.sh: Ensure we exit even if SIGPIPE is ignored. * NEWS: Mention the bug fix. --- NEWS | 4 ++++ init.cfg | 6 ++++++ src/tail.c | 14 +++++++++++--- tests/misc/printf-surprise.sh | 4 +--- tests/misc/seq-epipe.sh | 4 +--- tests/tail-2/pipe-f.sh | 17 ++++++++++++----- 6 files changed, 35 insertions(+), 14 deletions(-) diff --git a/NEWS b/NEWS index ca296b0..a6a02d8 100644 --- a/NEWS +++ b/NEWS @@ -27,6 +27,10 @@ GNU coreutils NEWS = -*- outline -*- 'tail -f file | filter' no longer exits immediately on AIX. [bug introduced in coreutils-8.28] =20 + 'tail -f file | filter' no longer goes into an infinite loop + if filter exits and SIGPIPE is ignored. + [bug introduced in coreutils-8.28] + ** Changes in behavior =20 echo now always processes backslash escapes when the POSIXLY_CORRECT diff --git a/init.cfg b/init.cfg index d99a0e3..739ba33 100644 --- a/init.cfg +++ b/init.cfg @@ -610,6 +610,12 @@ mkfifo_or_skip_() fi } =20 +trap_sigpipe_or_skip_() +{ + (trap '' PIPE && yes | :) 2>&1 | grep -qF 'Broken pipe' || + skip_ 'trapping SIGPIPE is not supported' +} + # Disable the current test if the working directory seems to have # the setgid bit set. skip_if_setgid_() diff --git a/src/tail.c b/src/tail.c index c63b616..b806485 100644 --- a/src/tail.c +++ b/src/tail.c @@ -334,6 +334,14 @@ named file in a way that accommodates renaming, remo= val and creation.\n\ exit (status); } =20 +/* Ensure exit, either with SIGPIPE or EXIT_FAILURE status. */ +static void ATTRIBUTE_NORETURN +die_pipe (void) +{ + raise (SIGPIPE); + exit (EXIT_FAILURE); +} + /* If the output has gone away, then terminate as we would if we had written to this output. */ static void @@ -349,7 +357,7 @@ check_output_alive (void) pfd.events =3D POLLERR; =20 if (poll (&pfd, 1, 0) >=3D 0 && (pfd.revents & POLLERR)) - raise (SIGPIPE); + die_pipe (); #else struct timeval delay; delay.tv_sec =3D delay.tv_usec =3D 0; @@ -361,7 +369,7 @@ check_output_alive (void) /* readable event on STDOUT is equivalent to POLLERR, and implies an error condition on output like broken pipe. */ if (select (STDOUT_FILENO + 1, &rfd, NULL, NULL, &delay) =3D=3D 1) - raise (SIGPIPE); + die_pipe (); #endif } =20 @@ -1659,7 +1667,7 @@ tail_forever_inotify (int wd, struct File_spec *f, = size_t n_files, { /* readable event on STDOUT is equivalent to POLLERR, and implies an error on output like broken pipe. */ - raise (SIGPIPE); + die_pipe (); } else break; diff --git a/tests/misc/printf-surprise.sh b/tests/misc/printf-surprise.s= h index 18d48a0..4190c94 100755 --- a/tests/misc/printf-surprise.sh +++ b/tests/misc/printf-surprise.sh @@ -49,9 +49,7 @@ vm=3D$(get_min_ulimit_v_ env $prog %20f 0) \ # triggering the printf(3) misbehavior -- which, btw, is required by ISO= C99. =20 mkfifo_or_skip_ fifo - -(trap '' PIPE && yes | :) 2>&1 | grep -qF 'Broken pipe' || - skip_ 'trapping SIGPIPE is not supported' +trap_sigpipe_or_skip_ =20 # Disable MALLOC_PERTURB_, to avoid triggering this bug # https://bugs.debian.org/481543#77 diff --git a/tests/misc/seq-epipe.sh b/tests/misc/seq-epipe.sh index be9457e..c2a6164 100755 --- a/tests/misc/seq-epipe.sh +++ b/tests/misc/seq-epipe.sh @@ -18,9 +18,7 @@ =20 . "${srcdir=3D.}/tests/init.sh"; path_prepend_ ./src print_ver_ seq - -(trap '' PIPE && yes | :) 2>&1 | grep -qF 'Broken pipe' || - skip_ 'trapping SIGPIPE is not supported' +trap_sigpipe_or_skip_ =20 # upon EPIPE with signals ignored, 'seq' should exit with an error. timeout 10 sh -c \ diff --git a/tests/tail-2/pipe-f.sh b/tests/tail-2/pipe-f.sh index 4a5b444..ae7cbaa 100755 --- a/tests/tail-2/pipe-f.sh +++ b/tests/tail-2/pipe-f.sh @@ -18,6 +18,7 @@ =20 . "${srcdir=3D.}/tests/init.sh"; path_prepend_ ./src print_ver_ tail +trap_sigpipe_or_skip_ =20 # Speedup the non inotify case fastpoll=3D'-s.1 --max-unchanged-stats=3D1' @@ -36,11 +37,17 @@ echo bar | returns_ 1 \ compare exp out || fail=3D1 =20 # This would wait indefinitely before v8.28 due to no EPIPE being -# generated due to no data written after the first small amount -(returns_ 124 timeout 10 tail -n2 -f $mode $fastpoll out && touch timed_= out) | - sed 2q > out2 -test -e timed_out && fail=3D1 -compare exp out2 || fail=3D1 +# generated due to no data written after the first small amount. +# Also check tail exits if SIGPIPE is being ignored. +for disposition in '' '-'; do + (trap "$disposition" PIPE; + returns_ 124 timeout 10 \ + tail -n2 -f $mode $fastpoll out && touch timed_out) | + sed 2q > out2 + test -e timed_out && fail=3D1 + compare exp out2 || fail=3D1 + rm -f timed_out +done =20 # This would wait indefinitely before v8.28 (until first write) (returns_ 1 timeout 10 tail -f $mode $fastpoll /dev/null >&-) || fail=3D= 1 --=20 2.9.3 --------------F328B82050EB81F18A2E7C64-- From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 20 15:21:08 2019 Received: (at 33946) by debbugs.gnu.org; 20 Jan 2019 20:21:08 +0000 Received: from localhost ([127.0.0.1]:39224 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1glJad-0003cb-NZ for submit@debbugs.gnu.org; Sun, 20 Jan 2019 15:21:07 -0500 Received: from mout.kundenserver.de ([212.227.17.24]:58249) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1glJac-0003bo-F7 for 33946@debbugs.gnu.org; Sun, 20 Jan 2019 15:21:06 -0500 Received: from [192.168.101.10] ([93.218.109.248]) by mrelayeu.kundenserver.de (mreue106 [212.227.15.183]) with ESMTPSA (Nemesis) id 1N9M1q-1hEpSh1NNE-015I5i; Sun, 20 Jan 2019 21:20:59 +0100 Subject: Re: bug#33946: tail -f stops abruptly in AIX when piped. To: =?UTF-8?Q?P=c3=a1draig_Brady?= , 33946@debbugs.gnu.org References: <71ba1d06-2bdb-392f-8a54-1eb02085a1bf@bernhard-voelker.de> <7d786022-68a5-c379-ce2b-210d5b749a99@draigBrady.com> <0547f861-5762-37fc-5808-02dc90b8576c@draigBrady.com> <5162fc72-cf23-3583-7bbe-cf36da69503e@bernhard-voelker.de> <42924773-7a68-227c-2d69-57ae9416808b@draigBrady.com> <7c23830f-9283-acbf-ba38-5c6afdb57a78@bernhard-voelker.de> <21e6cf05-4100-5492-ef86-4e5f7904fe8e@draigBrady.com> From: Bernhard Voelker Openpgp: preference=signencrypt Autocrypt: addr=mail@bernhard-voelker.de; prefer-encrypt=mutual; keydata= mQENBFPirzMBCACyzYldTjQ4ufFOkByY5Nn5USb5GFoL48nWBwNHjd9KUbtRRNlQiPNKd6hK Gvd3BGi5aoFKA4ytfRk6jbAbW3jVb3R8wYaV08mOy4KVEKxqN4bxsXlMjNChXVR+rtKDmfI+ oPTL+cPH2X6gW4W02IRbVw0uUhNm6zEedC/gNrY/mTlf1enZ46jxZ7BTUZaG+kx38UMISIMB zSzLRtdkwgmHj4jS3p1fF2cwRqLclIfMjKGpbNFPEXeXKWrCLcqHw78795eAR9q0YvrDkfIn GdDBwfb3VM4NdulwIFzvYZMSXvSbbyPLB5YkHU5aAWQHUse4WlfT5ccDpbzUYldRAvF9ABEB AAG0K0Jlcm5oYXJkIFZvZWxrZXIgPG1haWxAYmVybmhhcmQtdm9lbGtlci5kZT6JATkEEwEC ACMFAlPirzMCGwMHCwkIBwMCAQYVCAIJCgsEFgIDAQIeAQIXgAAKCRBGUC73lpFxle5wCACC dbs0QaJ0vR3Sff2cKdTk41rUq3YfWngsR///IOU0C5DdkePmCnJE/lUsUy0LRTxcUDLxQR+x QHU8ssRT0JUO9726dI3miy36UdsgmBYaOtLvQcidGmW1R7o0PYYf04+TFtyqKgngOUBPpMgR 6o4UsQxy/OD4bN1WDqOgIjL+D/qJpkKmgp6L6+hhaBCpiOFKRmmV7YyQ3SqVlfQNiHs5ZtkR nXpIjgZARV+GllKucI17bO0CGmTJZ1tstVy0+W3DQT1lbBkTTc++5LONM99D3jjn23l1ocOp folR53F7I4cb2RNfT23v1I59RH37lB9wMOqrKj0UjYAC2YoPGQ3BuQENBFPirzMBCADXLWWp QihBldY6reca8ZKdc3T9qXEOa3akE3DWKztIBmNJhtYOjmpLYajQTkGa7UoJTnbmZE2Rn6ZE oNnvb0gcFNAIcY95KOI+bjOR8HEgh4cx2REXh6L6olIgyXqt/KFusE4wtVZAFxZl+30HzN6n D+1HvrjXxPJRX6MsIYOYyyX9/6OofwJK6QHODYGp8WL2olHDnmsXg4AT6Wlr7qKpKrQELlcF R4xkvdmgL/Ghw/tK0yJTxMIcewCCZWLPOXRmFRbvAadZWPAgVsJ63siNyUlVnVMSzDgTJl+s l/DMabXpqrJQx3/1Yy6mTaDs3XZT/wmBKaTLXx/LByaPxQQ7ABEBAAGJAR8EGAECAAkFAlPi rzMCGwwACgkQRlAu95aRcZWVPwgAqZT6iTXkoP37wYb41323RzhBcJ8JSk4cyBDBUXX0lMrM 3qhiClKG7phpxVdu817Gwc6Hsecg7FfjQAV8MHQ0ZFeEFdk3b2rKBqfsStc+h49/xF3Fb+if CzR9qeQF82fMSxkg18++7hMcHCMO/hPZ/Q0xRi+lrSr2QKDJQuLzSyVU14TxrCkevZjEhtma VNvcJlJzCbiBXee9Fpc5jITUXPFG8E8dxqo1n+duOyIMgozrAnzP7X5V/Ob/Ozf/aGGX9+Jd inyfCX18nWcHALKMU/36Eua/ylalf/2c2YkBp9KCLVmGgPkUgW52EeRPgroIsiwu+rwCSV6Z UyCJ+OymCg== Message-ID: Date: Sun, 20 Jan 2019 21:20:53 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: <21e6cf05-4100-5492-ef86-4e5f7904fe8e@draigBrady.com> Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K1:el2LA/maueh5bU+5dSWpPh1k4y17zbpm7RxcyA9JlA+DU4WcamY PdgmqgY+67V5rccfP+VsUk9DDfb8M97Me+lSQwEayjVLMjMiVjDfP6apNeBBqanRV1SzYPi RG577HlGQjAqd1GDQcn825CvG9z9fHPaxXagPdi9U1+kvoPaZPY2CJ0I6b7e1MtBu6Kk/b3 GtL4P98uiYRxKVtt1t8UA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:ljIbY/dGk7I=:0kWMKT31VbepNRPZo2zJuZ K6oya4xsxBjfxVHv8y220aMiRaoolw1rM+/BVIze1BbyzxcpHzwCA+gbmVwmxJlDhlnXBePIq sNkv3PC8q87W2ISnzxVBz7IBwXDPJbpXoBHTnJqKb7r1TBrU2UuUWLa2c0WG4Iqtb0XKxwtCy rIUd7xUOBpBgFhWJ8UgPVVGi1wu/q1CNay+qnCQSnDZUpe8voItL5UT2DOJjV8/jvj6pE/M1P yom8i6bg/BGeWou4xDh8zotdxwOM0W7t5F2tQGoK7f6PhWxpNJV5mIHXjHkf8+dPnH4y3JKXG 5G0Ysjm/6MBrGAYT8ibJpgS8qgZqMY8ttOCYvHh9z4hBNG841FrAWiFGjBHWF10oCBkogvb/D fjmPXklRx3xuaixlvm9Y22DWaKt/tGPebMxOhZqiAWJdxOdOi/c+htiHSzRTc0L3QBX5glVn/ Vzx+vcEyy1vMad5tG3Zl1GpQAGhSRIsvdTHeIYlJ7Z3vSN/DPmbEY6akFrGrS8sBnEFWafye8 P6doNQryUXBudzX6XH2jKLmJR+rXVAACx2DRYXWu6HnOwZ+rQ3U45rcDg1TSh2Fgmr+4ehIal CEvU+xo78N3v97tMdKtWDJ51bF5abmH/9hCGZbHV6JkpOtnCSn7LAWZ7xVcTOfZ+vc+ojgTA3 BNMoL8DojrNpiH6G4kfnNYYqe/5ByAbq6SFmKRTCjy3yxH+k76wVEZFnwThK8JL/v1s3E8MLV 4QqUFUC9YwUpxcKPanMVsZWnkd0rOIQt7FHKwwkU2aE1uKOmKM4uGiqdYR4WbKIX9TFZomfOu 97p+kcP X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 33946 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On 1/20/19 10:00 AM, Pádraig Brady wrote: > Right. So the broken pipe is detected fine which is the main thing. > It's just that the osc system has SIGPIPE ignored > (python2 based systems do this by default, which may be related). Bingo. I confirmed that 'osc' is getting into the SIGPIPE handling by directly chroot'ing into the build directory: the (previous version of the) test passed. > I was looking are setting normal handling with `trap - SIGPIPE` in the test, > but that's only effective if ignored in the same shell. > If the parent/login shell has ignored SIGPIPE, > then resetting it is ineffective. > However... > > tail should be exiting irrespective of the handling of SIGPIPE. > In fact it goes into an infinite loop in the edge case of: > inotify + ignored sigpipe + early exit filters. > > The attached ensures the tail process exits, > which handles the infinite loop and the test failure. LGTM: the test passes under 'osc' now, too. Thanks & have a nice day, Berny From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 21 01:41:08 2019 Received: (at 33946) by debbugs.gnu.org; 21 Jan 2019 06:41:08 +0000 Received: from localhost ([127.0.0.1]:39355 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1glTGe-0001hf-Dx for submit@debbugs.gnu.org; Mon, 21 Jan 2019 01:41:08 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:42166) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1glTGZ-0001hU-RK for 33946@debbugs.gnu.org; Mon, 21 Jan 2019 01:41:04 -0500 Received: from pps.filterd (m0098393.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x0L6e0T2012959 for <33946@debbugs.gnu.org>; Mon, 21 Jan 2019 01:41:02 -0500 Received: from smtp.notes.na.collabserv.com (smtp.notes.na.collabserv.com [192.155.248.91]) by mx0a-001b2d01.pphosted.com with ESMTP id 2q58rjrju0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for <33946@debbugs.gnu.org>; Mon, 21 Jan 2019 01:41:02 -0500 Received: from localhost by smtp.notes.na.collabserv.com with smtp.notes.na.collabserv.com ESMTP for <33946@debbugs.gnu.org> from ; Mon, 21 Jan 2019 06:41:01 -0000 Received: from us1a3-smtp08.a3.dal06.isc4sb.com (10.146.103.57) by smtp.notes.na.collabserv.com (10.106.227.143) with smtp.notes.na.collabserv.com ESMTP; Mon, 21 Jan 2019 06:40:56 -0000 Received: from us1a3-mail127.a3.dal06.isc4sb.com ([10.146.45.135]) by us1a3-smtp08.a3.dal06.isc4sb.com with ESMTP id 2019012106405600-94358 ; Mon, 21 Jan 2019 06:40:56 +0000 In-Reply-To: <337ccd1d-7dfb-f5aa-0097-56e089cfa0e4@draigBrady.com> Subject: Re: bug#33946: tail -f stops abruptly in AIX when piped. To: "=?ISO-8859-1?Q?P=E1draig_Brady?=" From: "Ayappan P2" Date: Mon, 21 Jan 2019 12:10:57 +0530 References: <71ba1d06-2bdb-392f-8a54-1eb02085a1bf@bernhard-voelker.de> <7d786022-68a5-c379-ce2b-210d5b749a99@draigBrady.com> <0547f861-5762-37fc-5808-02dc90b8576c@draigBrady.com> <5162fc72-cf23-3583-7bbe-cf36da69503e@bernhard-voelker.de> <8cfe67b1-78b8-d83c-26f7-b6166d23982e@draigBrady.com> <337ccd1d-7dfb-f5aa-0097-56e089cfa0e4@draigBrady.com> X-KeepSent: C5151E52:40A53F48-00258389:00247583; type=4; name=$KeepSent X-Mailer: IBM Notes Release 9.0.1FP10 SHF68 March 06, 2018 X-LLNOutbound: False X-Disclaimed: 23515 X-TNEFEvaluated: 1 x-cbid: 19012106-9951-0000-0000-00000B0A3A3B X-IBM-SpamModules-Scores: BY=0.104631; FL=0; FP=0; FZ=0; HX=0; KW=0; PH=0; SC=0.4332; ST=0; TS=0; UL=0; ISC=; MB=0.000417 X-IBM-SpamModules-Versions: BY=3.00010444; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000275; SDB=6.01149539; UDB=6.00598983; IPR=6.00929863; BA=6.00006205; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00025218; XFM=3.00000015; UTC=2019-01-21 06:40:59 X-IBM-AV-DETECTION: SAVI=unsuspicious REMOTE=unsuspicious XFE=unused X-IBM-AV-VERSION: SAVI=2019-01-21 06:33:08 - 6.00009489 x-cbparentid: 19012106-9952-0000-0000-00001B0B4216 Message-Id: Content-type: multipart/alternative; boundary="0__=8FBB091ADFB7F3138f9e8a93df938690918c8FBB091ADFB7F313" Content-Disposition: inline MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-01-21_04:, , signatures=0 X-Proofpoint-Spam-Reason: safe X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: "Pádraig Brady" wrote on 01/20/2019 02:16:38 PM: > From: "Pádraig Brady" > To: Ayappan P2 > Cc: 33946@debbugs.gnu.org, Bernhard Voelker voelker.de>, Bug-coreutils X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) --0__=8FBB091ADFB7F3138f9e8a93df938690918c8FBB091ADFB7F313 Content-Transfer-Encoding: quoted-printable Content-type: text/plain; charset=ISO-8859-1 "P=E1draig Brady" wrote on 01/20/2019 02:16:38 PM: > From: "P=E1draig Brady" > To: Ayappan P2 > Cc: 33946@debbugs.gnu.org, Bernhard Voelker voelker.de>, Bug-coreutils > Date: 01/20/2019 02:16 PM > Subject: Re: bug#33946: tail -f stops abruptly in AIX when piped. > > On 15/01/19 19:11, P=E1draig Brady wrote: > > On 15/01/19 04:42, Ayappan P2 wrote: > >> > >> The patch/commit is not proper. The select() call will still be invoked in > >> AIX. > > > > Drats I pushed the debugging version of my patch :/ > > I'll fix up (preferably with Bernhard's test issue also addressed) > > Pushed the fix up in your name: > https://urldefense.proofpoint.com/v2/url? > u=3Dhttps-3A=5F=5Fgit.sv.gnu.org=5Fgitweb=5F-3Fp-3Dcoreutils.git-3Ba-3Dcomm= itdiff-3Bh-3D17983b2&d=3DDwID- > g&c=3Djf=5FiaSHvJObTbx-siA1ZOg&r=3DSRx7SyASbvCxu7GP- > Qbph4o5MPmrwcLUo4BhenbwbOs&m=3DmPZV60JE=5FyQsMdKRyI8gKwP3fVfRN1ITodgfpwR6zM= Q&s=3DM7DG1CswoQMrPvdaWpHfDQ2jJCvnVySL8cKhuM657do&e=3D > > Bernhard's test issue will be addressed separately. > > cheers, > P=E1draig > > Great. Thank You. Regards Ayappan P --0__=8FBB091ADFB7F3138f9e8a93df938690918c8FBB091ADFB7F313 Content-type: text/html; charset=ISO-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable X-Proofpoint-UnRewURL: 1 URL was un-rewritten

"P=E1draig Brady" <P@draig= Brady.com> wrote on 01/20/2019 02:16:38 PM:

> From: "P=E1= draig Brady" <P@draigBrady.com>

> To: Ayappan P2 <ayappap2@in.ibm.com>
> Cc: 33946@debbugs.gnu.org, Bernhard Voelker <mail@bern= hard-
> voelker.de>, Bug-coreutils <bug-coreutils-bounces+ayapp= ap2=3Din.ibm.com@gnu.org>

> Date:= 01/20/2019 02:16 PM
> Subject: Re: = bug#33946: tail -f stops abruptly in AIX when piped.
>
> On 15/01/19 19:11, P=E1draig Brady wrote:
&g= t; > On 15/01/19 04:42, Ayappan P2 wrote:
> >>
> >&= gt; The patch/commit is not proper. The select() call will still be invoked= in
> >> AIX.
> >
> > Drats I pushed the deb= ugging version of my patch :/
> > I'll fix up (preferably with Ber= nhard's test issue also addressed)
>
> Pushed the fix up in yo= ur name:
> INVALID URI REMOVED> u=3Dhttps-3A__git.sv.gnu.org_gitweb_-3Fp-3Dcoreutils.git-3Ba-3Dcommit= diff-3Bh-3D17983b2&d=3DDwID-
> g&c=3Djf_iaSHvJObTbx-siA1ZOg&a= mp;r=3DSRx7SyASbvCxu7GP-
> Qbph4o5MPmrwcLUo4BhenbwbOs&m=3DmPZV60J= E_yQsMdKRyI8gKwP3fVfRN1ITodgfpwR6zMQ&s=3DM7DG1CswoQMrPvdaWpHfDQ2jJCvnVy= SL8cKhuM657do&e=3D
>
> Bernhard's test issue will be addre= ssed separately.
>
> cheers,
> P=E1draig
>
>= ;

Great. Thank You.
Regards
Ayap= pan P
--0__=8FBB091ADFB7F3138f9e8a93df938690918c8FBB091ADFB7F313-- From unknown Fri Aug 15 15:34:04 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 18 Feb 2019 12:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator