GNU bug report logs -
#7813
tail -f gives misleading error message when inotify limit is reached
Previous Next
Reported by: Bram Neijt <bneijt <at> gmail.com>
Date: Mon, 10 Jan 2011 12:39:02 UTC
Severity: normal
Done: Jim Meyering <jim <at> meyering.net>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 7813 in the body.
You can then email your comments to 7813 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
owner <at> debbugs.gnu.org, bug-coreutils <at> gnu.org
:
bug#7813
; Package
coreutils
.
(Mon, 10 Jan 2011 12:39:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Bram Neijt <bneijt <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-coreutils <at> gnu.org
.
(Mon, 10 Jan 2011 12:39:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Dear developers,
When tail -f has inotify enabled and hits the max_user_watches limit
of inotify, the resulting error message is very misleading.
To reproduce:
1) Make sure you will hit the limit if you try another inotify request
sudo sh -c 'echo 10 > /proc/sys/fs/inotify/max_user_watches'
2) Create a file:
touch /tmp/hello
3) Follow it:
tail -f /tmp/hello
Result:
tail: cannot watch `/tmp/hello': No space left on device
Expected result:
tail: cannot watch '/tmp/hello' because inotify reported: No space
left on device
It can be verified by using strace tail -f /tmp/hello:
inotify_add_watch(4, "/tmp/hello",
IN_MODIFY|IN_ATTRIB|IN_DELETE_SELF|IN_MOVE_SELF) = -1 ENOSPC (No space
left on device)
I've also submitted this bug to launchpad for easier tracking at
https://bugs.launchpad.net/ubuntu/+source/coreutils/+bug/700958
Greetings,
Bram Neijt
Information forwarded
to
owner <at> debbugs.gnu.org, bug-coreutils <at> gnu.org
:
bug#7813
; Package
coreutils
.
(Mon, 10 Jan 2011 14:43:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 7813 <at> debbugs.gnu.org (full text, mbox):
A. Bram Neijt wrote:
> http://debbugs.gnu.org/cgi/bugreport.cgi?bug=7813
>
> ** Bug watch added: Email to bug-coreutils <at> gnu #
> mailto:bug-coreutils <at> gnu.org
>
> ** Also affects: coreutils via
> mailto:bug-coreutils <at> gnu.org
> Importance: Undecided
> Status: New
Thanks for the report.
This was fixed for 8.6:
commit 61b77891c2d9af299063850a0c4d1d721340cfff
Author: Pádraig Brady <P <at> draigBrady.com>
Date: Tue Oct 12 01:39:58 2010 +0100
tail: fix checking of currently unavailable directories
* src/tail.c (tail_forever_inotify): Handle the case where
tail --follow=name with inotify, is not able to add a watch on
a specified directory. This may happen due to inotify resource
limits or if the directory is currently missing or inaccessible.
In all these cases, revert to polling which will try to reopen
the file later. Note inotify returns ENOSPC when it runs out
of resources, and instead we report a particular error message,
lest users think one of their file systems is full.
(main): Document another caveat with using inotify, where we
currently don't recheck directories recreated after the
initial watch is setup.
* tests/tail-2/F-vs-rename: Fix the endless loop triggered by
the above issue.
* tests/tail-2/inotify-hash-abuse: Likewise.
* tests/tail-2/wait: Don't fail in the resource exhaustion case.
* tests/tail-2/F-vs-missing: A new test for this failure mode
which was until now just triggered on older buggy linux kernels
which returned ENOSPC constantly from inotify_add_watch().
* NEWS: Mention the fix.
With coreutils-8.6 and newer, you'd see this:
tail: inotify resources exhausted
tail: inotify cannot be used, reverting to polling
Reply sent
to
Jim Meyering <jim <at> meyering.net>
:
You have taken responsibility.
(Tue, 08 May 2012 10:39:01 GMT)
Full text and
rfc822 format available.
Notification sent
to
Bram Neijt <bneijt <at> gmail.com>
:
bug acknowledged by developer.
(Tue, 08 May 2012 10:39:01 GMT)
Full text and
rfc822 format available.
Message #13 received at 7813-done <at> debbugs.gnu.org (full text, mbox):
Jim Meyering wrote:
> A. Bram Neijt wrote:
>> http://debbugs.gnu.org/cgi/bugreport.cgi?bug=7813
...
> Thanks for the report.
> This was fixed for 8.6:
>
> commit 61b77891c2d9af299063850a0c4d1d721340cfff
> Author: Pádraig Brady <P <at> draigBrady.com>
> Date: Tue Oct 12 01:39:58 2010 +0100
>
> tail: fix checking of currently unavailable directories
...
> With coreutils-8.6 and newer, you'd see this:
>
> tail: inotify resources exhausted
> tail: inotify cannot be used, reverting to polling
Marked as done.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Tue, 05 Jun 2012 11:24:03 GMT)
Full text and
rfc822 format available.
This bug report was last modified 11 years and 298 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.