[Users] Timestamp consistency check
Ian Hinder
hinder at gravity.psu.edu
Mon May 19 18:35:31 CDT 2008
Erik Schnetter wrote:
> On May 19, 2008, at 15:28:55, Ian Hinder wrote:
>
>> Hi,
>>
>> I have recently had a problem with a fileserver which has its time set
>> incorrectly (6 minutes into the past). The CST was looping
>> indefinitely. Would it be possible to add a little check into Cactus
>> somewhere which ensured that when a file is created, it gets a timestamp
>> which is not before the time it was created, and an error or warning
>> printed if there is evidence that the fileserver time is incorrect?
>
>
> Usually, make does not compare file timestamps to the current time, but
> only compares file timestamps to other file timestamps. This prevents
> most of such problems since only the file server's internal consistency
> is needed, not its absolute consistency with other machines.
Ah - yes that makes sense. In my case, I think the problem might have
been related to the ThornList file. This was being copied from another
system, and its timestamp would have been preserved. So maybe the
thornlist was being seen as newer than some other files in the
configuration every time. The test case that would catch this is to
create a file, and determine what time the fileserver thinks it is, and
then to make sure that the thornlist is not newer than that. But that
catches a very specific case in a roundabout way, so maybe it is not the
right solution. A generic test to verify the consistency of the
fileserver's clock with the current system's current time would work better.
> This fails if someone uses the command "touch", which (a) creates a file
> and then (b) gives the file the current time of the machine where make
> is running, not the file server's current time. It is better to create
> files with commands like
>
> : > file
> echo > file
Actually, the test case that I constructed was to touch a file and
observe that the timestamp was in the past of a "date" command run
before the touch. So this suggests that the fileserver *is* determining
the timestamp, even with "touch". Maybe the fileserver refuses to make
a timestamp in the past, even if asked to by the client?
> instead of touch. I see there is at least one "touch" command in the
> linux configure script. Did Cactus really loop in the CST stage, or was
> it in the configuration state? The CST stage interprets the thorns' ccl
> files, whereas the configure stage uses autoconf and friends.
It was during a make <config> rather than a make <config>-config, so it
was definitely not the configuration stage.
--
Ian Hinder
hinder at gravity.psu.edu
http://www.gravity.psu.edu/~hinder
More information about the Users
mailing list