Public bug reported:
Binary package hint: coreutils
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)
---
Architecture: amd64
CheckboxSubmission: c61c47905a08381ec5d89e05cd06d034
CheckboxSystem: d00f84de8a555815fa1c4660280da308
DistroRelease: Ubuntu 10.10
InstallationMedia: Ubuntu 10.10 "Maverick Meerkat" - Beta amd64 (20100901.1)
NonfreeKernelModules: nvidia
Package: coreutils 8.5-1ubuntu3
PackageArchitecture: amd64
ProcEnviron:
PATH=(custom, user)
LANG=en_US.utf8
SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.35-24.42-generic 2.6.35.8
Tags: maverick
Uname: Linux 2.6.35-24-generic x86_64
UserGroups: adm admin cdrom dialout lpadmin plugdev sambashare
** Affects: coreutils (Ubuntu)
Importance: Undecided
Status: New
** Tags: apport-collected
** Tags added: apport-collected
** Description changed:
Binary package hint: coreutils
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)
+ ---
+ Architecture: amd64
+ CheckboxSubmission: c61c47905a08381ec5d89e05cd06d034
+ CheckboxSystem: d00f84de8a555815fa1c4660280da308
+ DistroRelease: Ubuntu 10.10
+ InstallationMedia: Ubuntu 10.10 "Maverick Meerkat" - Beta amd64 (20100901.1)
+ NonfreeKernelModules: nvidia
+ Package: coreutils 8.5-1ubuntu3
+ PackageArchitecture: amd64
+ ProcEnviron:
+ PATH=(custom, user)
+ LANG=en_US.utf8
+ SHELL=/bin/bash
+ ProcVersionSignature: Ubuntu 2.6.35-24.42-generic 2.6.35.8
+ Tags: maverick
+ Uname: Linux 2.6.35-24-generic x86_64
+ UserGroups: adm admin cdrom dialout lpadmin plugdev sambashare
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/700958
Title:
tail -f gives misleading error message when inotify limit is reached
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs