tail -f gives misleading error message when inotify limit is reached
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
coreutils |
Fix Released
|
Undecided
|
|||
coreutils (Ubuntu) |
Fix Released
|
Low
|
Unassigned |
Bug Description
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/
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_
---
Architecture: amd64
CheckboxSubmission: c61c47905a08381
CheckboxSystem: d00f84de8a55581
DistroRelease: Ubuntu 10.10
InstallationMedia: Ubuntu 10.10 "Maverick Meerkat" - Beta amd64 (20100901.1)
NonfreeKernelMo
Package: coreutils 8.5-1ubuntu3
PackageArchitec
ProcEnviron:
PATH=(custom, user)
LANG=en_US.utf8
SHELL=/bin/bash
ProcVersionSign
Tags: maverick
Uname: Linux 2.6.35-24-generic x86_64
UserGroups: adm admin cdrom dialout lpadmin plugdev sambashare
apport information