tail -0f /var/log/kern.log never prints anything (livecd cow overlayfs)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
coreutils |
Confirmed
|
Undecided
|
Unassigned | ||
coreutils (Ubuntu) |
Triaged
|
Medium
|
Unassigned |
Bug Description
Doing tail -f on /var/log/kern.log (which gets appended every 10 seconds) does not print anyting.
May be an issue with the livecd / how overlayfs works. In any case tail should at least complain if underlaying fs does not properly support whatever -f needs to work (inotify below?):
open("/
fstat(3, {st_mode=
lseek(3, 0, SEEK_CUR) = 0
lseek(3, 0, SEEK_END) = 10956666
fstat(3, {st_mode=
fstatfs(3, {f_type=0x1021994, f_bsize=4096, f_blocks=2042790, f_bfree=2003669, f_bavail=2003669, f_files=2042790, f_ffree=2041029, f_fsid={0, 0}, f_namelen=255, f_frsize=4096}) = 0
inotify_init() = 4
inotify_
fstat(3, {st_mode=
read(4,
ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: coreutils 8.13-3ubuntu2
ProcVersionSign
Uname: Linux 3.2.0-6-generic x86_64
ApportVersion: 1.90-0ubuntu1
Architecture: amd64
CasperVersion: 1.296
Date: Sat Dec 24 11:27:34 2011
ExecutablePath: /usr/bin/tail
LiveMediaBuild: Ubuntu 12.04 LTS "Precise Pangolin" - Alpha amd64 (20111223)
ProcEnviron:
SHELL=/bin/bash
PATH=(custom, no user)
LANG=en_US.UTF-8
SourcePackage: coreutils
UpgradeStatus: No upgrade log present (probably fresh install)
Tuomas Heino wrote: var/log/ kern.log" , O_RDONLY) = 3 S_IFREG| 0640, st_size=10956666, ...}) = 0 S_IFREG| 0640, st_size=10956666, ...}) = 0 add_watch( 4, "/var/log/ kern.log" , IN_MODIFY| IN_ATTRIB| IN_DELETE_ SELF|IN_ MOVE_SELF) = 1 S_IFREG| 0640, st_size=10956666, ...}) = 0
> Public bug reported:
>
> Doing tail -f on /var/log/kern.log (which gets appended every 10 seconds) does not print anyting.
> May be an issue with the livecd / how overlayfs works. In any case tail should at least complain if underlaying fs does not properly support whatever -f needs to work (inotify below?):
>
> open("/
> fstat(3, {st_mode=
> lseek(3, 0, SEEK_CUR) = 0
> lseek(3, 0, SEEK_END) = 10956666
> fstat(3, {st_mode=
> fstatfs(3, {f_type=0x1021994, f_bsize=4096, f_blocks=2042790, f_bfree=2003669, f_bavail=2003669, f_files=2042790, f_ffree=2041029, f_fsid={0, 0}, f_namelen=255, f_frsize=4096}) = 0
> inotify_init() = 4
> inotify_
> fstat(3, {st_mode=
> read(4,
Thanks for the report.
In upstream coreutils development I've just made a change to fix that:
if the type of FS is unknown, it uses polling rather than inotify.
What does this print for that system?
$ stat -f --format %t:%T /var/log
If it is a new non-local file system type, then we should add it
to stat.c's table.
In the mean time, you can use tail's deliberately undocumented
---disable-inotify option.