Bug 1283760 - coreutils: tail: inotify support changes behavior of -F with subdirs
coreutils: tail: inotify support changes behavior of -F with subdirs
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: coreutils (Show other bugs)
26
Unspecified Unspecified
low Severity low
: ---
: ---
Assigned To: Sebastian Kisela
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-11-19 13:30 EST by Robbie Harwood
Modified: 2017-05-15 00:26 EDT (History)
7 users (show)

See Also:
Fixed In Version: coreutils-8.27-5.fc26
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-05-01 14:16:57 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Robbie Harwood 2015-11-19 13:30:02 EST
When watching, e.g., `tail -F scratchdir/tests.log` with inotify
support, if scratchdir (and contents) ceases to exist and is re-created,
tail *will not* show the contents of the new file.

By contrast, with, e.g., `tail ---disable-inotify -F
scratchdir/tests.log`, when scratchdir (and contents) ceases to exist
and is re-created, tail *will* show the contents of the new file.

To my mind, the behavior *without* inotify is the correct one (it's
certainly the one that the description of "following names" from the man
page suggests to me) and the behavior *with* inotify is in error.

Thanks!
Comment 1 Kamil Dudka 2015-11-19 14:14:07 EST
This appears to work just fine on my Fedora 23 box with an ext4 file system and coreutils-8.24-4.fc23.x86_64:

$ mkdir scratchdir
$ touch scratchdir/tests.log
$ tail -F scratchdir/tests.log &
[1] 5060
$ echo test > scratchdir/tests.log
test
$ rm scratchdir/tests.log
tail: ‘scratchdir/tests.log’ has become inaccessible: No such file or directory
$ echo test > scratchdir/tests.log
tail: ‘scratchdir/tests.log’ has appeared;  following new file
test

Please tell us:
- the exact NVR of coreutils
- the output of "uname -a"
- type of the file system in use
- what exactly you tried (a finite sequence of commands)
- what the actual result was
Comment 2 Kamil Dudka 2015-11-19 14:24:21 EST
Looking once again, I figured out that you actually meant this:

$ rm -rf scratchdir

Then I am able to reproduce it on Fedora 23.  It indeed does not work.  I guess it is related to the following comment in tail's source code:

         FIXME: when using inotify, and a directory for a watched file
         is recreated, then we don't recheck any new file when
         follow_mode == Follow_name.
Comment 3 Robbie Harwood 2015-11-19 14:34:07 EST
Yes, you are right; sorry for the confusion.
Comment 4 Fedora Admin XMLRPC Client 2016-06-13 05:05:29 EDT
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.
Comment 5 Fedora End Of Life 2016-11-24 08:35:33 EST
This message is a reminder that Fedora 23 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 23. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '23'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 23 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.
Comment 6 Fedora End Of Life 2017-02-28 04:50:39 EST
This bug appears to have been reported against 'rawhide' during the Fedora 26 development cycle.
Changing version to '26'.
Comment 7 Kamil Dudka 2017-03-30 11:46:07 EDT
Reassigning to Sebastian Kisela, who is currently working on a patch for this.
Comment 8 Sebastian Kisela 2017-04-05 03:37:51 EDT
This issue is discussed also here:
http://lists.gnu.org/archive/html/bug-coreutils/2017-04/msg00005.html
Comment 9 Fedora Update System 2017-04-28 08:25:43 EDT
coreutils-8.27-5.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-b17d54561b
Comment 10 Fedora Update System 2017-04-28 09:05:57 EDT
coreutils-8.25-17.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2017-a9fd966808
Comment 11 Fedora Update System 2017-04-28 11:07:26 EDT
coreutils-8.25-9.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2017-fb8bb34a62
Comment 12 Fedora Update System 2017-04-29 22:23:48 EDT
coreutils-8.25-9.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-fb8bb34a62
Comment 13 Fedora Update System 2017-04-29 22:26:17 EDT
coreutils-8.25-17.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-a9fd966808
Comment 14 Fedora Update System 2017-04-29 23:51:48 EDT
coreutils-8.27-5.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-b17d54561b
Comment 15 Fedora Update System 2017-05-01 14:16:57 EDT
coreutils-8.27-5.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.
Comment 16 Fedora Update System 2017-05-01 22:02:11 EDT
coreutils-8.25-17.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.
Comment 17 Fedora Update System 2017-05-15 00:26:24 EDT
coreutils-8.25-9.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.