Red Hat Bugzilla – Bug 441584
access time for files is messed up
Last modified: 2008-04-11 06:32:27 EDT
Description of problem:
Access time for files is messed up.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1.Create a file, e.g., foo.file
2.After 1 min., do a "cat foo.file", then do "ls -lt --time atime foo.file
3.This works, but then repeat step #2 after another minute has passed
atime does not update after subsequent cat commands
atime should update after each cat command
If after "cat foo.file" failes to update atime, do a "touch -a foo.file" and
that updates atime. After that, the first "cat foo.file" updates atime, but
subsequent "cat foo.file" commands fail to update atime.
This was observed on a i386 machine and on a x86_64 machine. It was also
observed on a machine with fc7 on it, but not on machines with fc6 on it.
Thanks for report, just tried with rawhide machine - and same result. Anyway -
problem seems to be in different place than in coreutils package itself - as it
works with rawhide package built in fc6 environment. Will try to find something
more and maybe reassign the bug afterwards.
I'm reassigning this to kernel component, as it is quiet strange behaviour and
afaik atimes are handled by kernel. Tried with not noatime mounted file system,
so it is not noatime issue.
What we know:
1) touch foo.file; cat foo.file;ls -lu foo.file; sleep 75; cat foo.file; ls - lu
-> both access times are the same.
2) touch -m foo.file; ls -lu foo.file
-> access time is still the same(expected, just mtime was modified)
3) cat foo.file; ls -lu foo.file
-> access time is changed
So access time is changed by cat only once after usage of touch/editation of
file. Feel free to reassign/close the bug if you think that this behaviour is
not caused by kernel or is not a bug.
(note: confirmed that on FC-6 is this bug not reproducable even with the rawhide
coreutils, reproducable on F7, F8 and rawhide)
This caused by the default mount option of "relatime" in Fedora. Mount with
"norelatime" if you want normal atime updates.
Thanks for explanation, is not very well documented feature. Closing NOTABUG.
(some Fedora discussion partially about relatime is on