[Bug 908354] Re: tail -0f /var/log/kern.log never prints anything (livecd cow overlayfs)
Jim Meyering
jim at meyering.net
Tue Dec 27 09:48:10 UTC 2011
[ following up to this report,
http://bugs.launchpad.net/+source/coreutils/+bug/908354
]
Tuomas Heino wrote:
> ubuntu at ubuntu:~$ stat -f --format %t:%T /var/log
> 1021994:tmpfs
Thanks.
Unlike most file system types, overlayFS appears to have no magic number.
Now we're seeing how using files on such a file system can cause trouble.
I see no direct way to distinguish this file (for which inotify does not
work) from any other on a tmpfs file system, for which inotify works
just fine.
Ugly work-around: tail -f could try using both inotify and polling,
and, eventually, if polling spots a change for which there was no
inotify event, it would give up on using inotify for that file.
As soon as tail sees an inotify event for a file, however, it could
not stop polling: for most remote FS types, inotify works with changes
generated locally, but not with those generated remotely. So polling
can still be useful when using inotify.
We'll see...
--
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