RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1046818 - A tail command gives an unnecessary message 'tail: inotify cannot be used, reverting to polling' even in non-follow mode
Summary: A tail command gives an unnecessary message 'tail: inotify cannot be used, re...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: coreutils
Version: 6.5
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Ondrej Vasik
QA Contact: Tomas Dolezal
URL:
Whiteboard:
: 1097802 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-12-27 01:15 UTC by Masaharu Kawada
Modified: 2018-12-09 17:23 UTC (History)
5 users (show)

Fixed In Version: coreutils-8.4-33.el6
Doc Type: Bug Fix
Doc Text:
Cause: Previous update fixed the tail utility failure of the follow mode when dealing with symlinks incorrectly. Consequence: As result, tail utility was producing unnecessary warning about reverting to polling method (although inotify was not in use) Fix: Logic around the warning message was improved. Result: Warning informative message about switch to polling is no longer shown when not necessary.
Clone Of:
Environment:
Last Closed: 2014-10-14 06:34:15 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2014:1457 0 normal SHIPPED_LIVE coreutils bug fix and enhancement update 2014-10-14 01:10:58 UTC

Description Masaharu Kawada 2013-12-27 01:15:07 UTC
Description of problem:

A tail command shows an unnecessary message 'tail: inotify cannot be used, reverting to polling' whenever it opens a symlink file. There is a similar issue in using tail command with '-f' option, however, with using the latest coreutils package shipped for RHEL6, it doesn't matter whether it's with '-f' option or not, the same happens always.

Version-Release number of selected component (if applicable):

coreutils-8.4-31.el6

How reproducible:

Always

Steps to Reproduce:
1.# touch testfile
2.# ln -s testfile testfile.symlink
3.# tail testfile.symlink

Actual results:

A tail command shows the message as follows.

ex)

# tail testfile.symlink 
tail: inotify cannot be used, reverting to polling

Expected results:

A tail command should NOT show the message 'tail: inotify cannot be used, reverting to polling'.

Additional info:

The below KCS seems to be related somehow.

Why running "tail -f" command print message "tail: inotify cannot be used, reverting to polling" while opening symlink?
https://access.redhat.com/site/solutions/634593

Comment 1 Ondrej Vasik 2013-12-27 08:15:26 UTC
For -F / follow-mode it is intentional behaviour - see https://bugzilla.redhat.com/show_bug.cgi?id=1006221 - and user should be notified about using polling instead of inotify. For non-follow mode, this is unintentional and the message is really unnecessary - thanks for the report.

Comment 2 Ondrej Vasik 2013-12-27 08:19:55 UTC
(as workaround, you could either make a wrapper around tail, which will filter out this error message for non-follow mode or you can use ---disable-inotify option as a default one (using polling instead of inotify) in the scripts which are fragile in the case of such error messages.

Comment 8 Ondrej Vasik 2014-05-15 09:07:39 UTC
*** Bug 1097802 has been marked as a duplicate of this bug. ***

Comment 10 Tom Lane 2014-08-24 15:34:09 UTC
If bug#1006221 were publicly readable, perhaps I could glean an explanation of why such a warning message is desirable.  But for the moment I'm with the complainant here: with or without -f, this message is a dumb idea.  It's strictly an internal implementation detail of tail, no?  Do you expect users to cancel their tail commands and do it some other way (and if so, what?)

Comment 11 Ondrej Vasik 2014-08-31 07:07:53 UTC
Without -f this message was just an accident. In documentation, -f says it uses inotify - to prevent periodical checks on followed files. This is probably why upstream decided to notify users about the change. You are right that most of the users don't care about this internal implementation detail. They will get the -f even with the polling mode. Adding upstream maintainer to CC, maybe he has better explanation why this message is displayed by default - maybe it is something for verbose mode.

Comment 12 errata-xmlrpc 2014-10-14 06:34:15 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2014-1457.html


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