[9500] in Athena Bugs
ctime is incorrect
daemon@ATHENA.MIT.EDU (Marc Horowitz)
Sun Jun 21 05:31:55 1992
To: bugs@MIT.EDU
Reply-To: Marc Horowitz <marc@MIT.EDU>
Date: Sun, 21 Jun 92 05:31:42 EDT
From: Marc Horowitz <marc@MIT.EDU>
<56> podge:bld/build/@sys> gettime podge ; gettime grosbeak ; gettime kerberos
Sun Jun 21 03:40:43 1992
Sun Jun 21 03:40:52 1992
Sun Jun 21 03:40:43 1992
<57> podge:bld/build/@sys> ls -l foo
foo: No such file or directory
<58> podge:bld/build/@sys> touch foo
<59> podge:bld/build/@sys> stat foo
File: "foo"
Size: 0 Allocated Blocks: 1 Filetype: Regular File
Mode: (0644/-rw-r--r--) Uid: ( 8888/ marc) Gid: ( 0/ system)
Device: 135,1 Inode: 1222455096Links: 1
Access: Sun Jun 21 03:40:51 1992( 00000.00:00:06)
Modify: Sun Jun 21 03:40:51 1992( 00000.00:00:06)
Change: Sun Jun 21 03:41:00 1992(-00000.00:00:03)
<60> podge:bld/build/@sys> stat ../vax_bsd43/foo
File: "../vax_bsd43/foo"
Size: 0 Allocated Blocks: 1 Filetype: Regular File
Mode: (0644/-rw-r--r--) Uid: ( 8888/ marc) Gid: ( 0/ system)
Device: 135,1 Inode: 1222451452Links: 1
Access: Sun Jun 21 03:37:50 1992( 00000.00:03:35)
Modify: Sun Jun 21 03:37:50 1992( 00000.00:03:35)
Change: Sun Jun 21 03:37:50 1992( 00000.00:03:35)
<10> beeblebrox:bld/build/@sys> pwd
/afs/athena.mit.edu/contrib/perl/bld/build/vax_bsd43
<11> beeblebrox:bld/build/@sys> gettime beeblebrox ; gettime grosbeak ; gettimekerberos
Sun Jun 21 03:37:31 1992
Sun Jun 21 03:37:41 1992
Sun Jun 21 03:37:32 1992
<12> beeblebrox:bld/build/@sys> ls -l foo
foo not found (No such file or directory)
<13> beeblebrox:bld/build/@sys> touch foo
<14> beeblebrox:bld/build/@sys> stat foo
File: "foo"
Size: 0 Allocated Blocks: 1 Filetype: Regular File
Mode: (0644/-rw-r--r--) Uid: ( 8888/ marc) Gid: ( 0/ wheel)
Device: 0,1 Inode: 1222451452Links: 1
Access: Sun Jun 21 03:37:50 1992(-00000.00:00:07)
Modify: Sun Jun 21 03:37:50 1992(-00000.00:00:07)
Change: Sun Jun 21 03:37:50 1992(-00000.00:00:07)
<17> beeblebrox:bld/build/@sys> stat ../pmax_ul4/foo
File: "../pmax_ul4/foo"
Size: 0 Allocated Blocks: 1 Filetype: Regular File
Mode: (0644/-rw-r--r--) Uid: ( 8888/ marc) Gid: ( 0/ wheel)
Device: 0,1 Inode: 1222455096Links: 1
Access: Sun Jun 21 03:40:51 1992( 00000.00:01:05)
Modify: Sun Jun 21 03:40:51 1992( 00000.00:01:05)
Change: Sun Jun 21 03:41:00 1992( 00000.00:00:56)
bug 1:
On the decstation, when a file is created, the mtime and atime are set
w.r.t the local clock, but mtime is set w.r.t the server's clock.
This means, as you see, that mtime and ctime on a new file can be
different, and ctime can be in the future.
Note that a file touch'ed on the pmax stat's incorrectly on both, and
a file touch'ed on the vax stat's correctly on both.
bug 2:
Time synchronization in the AFS cell is off.
From conversation with Richard, it looks like mtime is getting set to
client time, and ctime to server time. He says that when a file is
created, the mtime is explicitly set. Without looking at the code, my
empirical observation is that when a file is created in NFS, the mtime
is set to the server's time. It seems to me that in the interest of
making mtime == ctime on a newly created file, that this should be the
behaviour of AFS, as well.
Marc