[Bug 908354] [NEW] tail -0f /var/log/kern.log never prints anything (livecd cow overlayfs)
Jim Meyering
jim at meyering.net
Sat Dec 24 10:10:12 UTC 2011
Tuomas Heino wrote:
> 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("/var/log/kern.log", O_RDONLY) = 3
> fstat(3, {st_mode=S_IFREG|0640, st_size=10956666, ...}) = 0
> lseek(3, 0, SEEK_CUR) = 0
> lseek(3, 0, SEEK_END) = 10956666
> fstat(3, {st_mode=S_IFREG|0640, st_size=10956666, ...}) = 0
> 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_add_watch(4, "/var/log/kern.log", IN_MODIFY|IN_ATTRIB|IN_DELETE_SELF|IN_MOVE_SELF) = 1
> fstat(3, {st_mode=S_IFREG|0640, st_size=10956666, ...}) = 0
> 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.
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to coreutils in Ubuntu.
https://bugs.launchpad.net/bugs/908354
Title:
tail -0f /var/log/kern.log never prints anything (livecd cow
overlayfs)
Status in “coreutils” package in Ubuntu:
New
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("/var/log/kern.log", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0640, st_size=10956666, ...}) = 0
lseek(3, 0, SEEK_CUR) = 0
lseek(3, 0, SEEK_END) = 10956666
fstat(3, {st_mode=S_IFREG|0640, st_size=10956666, ...}) = 0
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_add_watch(4, "/var/log/kern.log", IN_MODIFY|IN_ATTRIB|IN_DELETE_SELF|IN_MOVE_SELF) = 1
fstat(3, {st_mode=S_IFREG|0640, st_size=10956666, ...}) = 0
read(4,
ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: coreutils 8.13-3ubuntu2
ProcVersionSignature: Ubuntu 3.2.0-6.12-generic 3.2.0-rc6
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)
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/coreutils/+bug/908354/+subscriptions
More information about the foundations-bugs
mailing list