[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#33946: tail -f stops abruptly in AIX when piped.
From: |
Ayappan P2 |
Subject: |
bug#33946: tail -f stops abruptly in AIX when piped. |
Date: |
Thu, 10 Jan 2019 17:43:01 +0000 |
Any updates on this guys ?
Thanks
Ayappan P
> On 08-Jan-2019, at 12:03 PM, Ayappan P2 <address@hidden> 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" <address@hidden>
> To: "Pádraig Brady" <address@hidden>
> Cc: address@hidden, Bernhard Voelker
> <address@hidden>, Bug-coreutils
> <address@hidden>
> Date: 01/07/2019 02:37 PM
> Subject: bug#33946: tail -f stops abruptly in AIX when piped.
> Sent by: "Bug-coreutils" <bug-coreutils-bounces
> address@hidden>
>
>
>
>
> The poll() solution is working in AIX. Great.
>
> Thanks
> Ayappan P
>
>
>
> From: "Pádraig Brady" <address@hidden>
> To: Ayappan P2 <address@hidden>, Bernhard Voelker
> <address@hidden>
> Cc: address@hidden
> Date: 01/04/2019 11:37 PM
> Subject: bug#33946: tail -f stops abruptly in AIX when piped.
> Sent by: "Bug-coreutils" <bug-coreutils-bounces
> address@hidden>
>
>
>
>> 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 <address@hidden>
>> To: Ayappan P2 <address@hidden>,
> address@hidden
>> Date: 01/03/2019 11:53 PM
>> Subject: bug#33946: tail -f stops abruptly in AIX
> when piped.
>> Sent by: "Bug-coreutils" <bug-coreutils-bounces
>> address@hidden>
>>
>>
>>
>> On 1/3/19 6:39 PM, Ayappan P2 wrote:
>>>> On 01-Jan-2019, at 10:36 PM, Ayappan P2 <address@hidden> 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.
> [attachment "tail-aix.patch" deleted by Ayappan P2/India/IBM]
>
> [attachment "graycol.gif" deleted by Ayappan P2/India/IBM]
>
> <graycol.gif>
- bug#33946: tail -f stops abruptly in AIX when piped., Ayappan P2, 2019/01/01
- bug#33946: tail -f stops abruptly in AIX when piped., Ayappan P2, 2019/01/03
- bug#33946: tail -f stops abruptly in AIX when piped., Bernhard Voelker, 2019/01/03
- bug#33946: tail -f stops abruptly in AIX when piped., Pádraig Brady, 2019/01/12
- bug#33946: tail -f stops abruptly in AIX when piped., Bernhard Voelker, 2019/01/15
- bug#33946: tail -f stops abruptly in AIX when piped., Ayappan P2, 2019/01/15
- bug#33946: tail -f stops abruptly in AIX when piped., Pádraig Brady, 2019/01/15
- bug#33946: tail -f stops abruptly in AIX when piped., Pádraig Brady, 2019/01/20
- bug#33946: tail -f stops abruptly in AIX when piped., Ayappan P2, 2019/01/21
- bug#33946: tail -f stops abruptly in AIX when piped., Pádraig Brady, 2019/01/15
- bug#33946: tail -f stops abruptly in AIX when piped., Bernhard Voelker, 2019/01/17
- bug#33946: tail -f stops abruptly in AIX when piped., Pádraig Brady, 2019/01/20
- bug#33946: tail -f stops abruptly in AIX when piped., Bernhard Voelker, 2019/01/20