GNU bug report logs - #7813
tail -f gives misleading error message when inotify limit is reached

Previous Next

Package: coreutils;

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.

Full log


View this message in rfc822 format

From: Bram Neijt <bneijt <at> gmail.com>
To: 7813 <at> debbugs.gnu.org
Subject: bug#7813: tail -f gives misleading error message when inotify limit is reached
Date: Mon, 10 Jan 2011 12:20:00 +0100
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




This bug report was last modified 13 years and 12 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.