[ntp:hackers] ntpd: step_systime() and the years 2036 / 2038

Warner Losh imp at bsdimp.com
Tue Aug 16 16:45:26 UTC 2011


On Aug 16, 2011, at 12:38 AM, Terje Mathisen wrote:

> Dave Hart wrote:
>> On Mon, Aug 15, 2011 at 23:33, juergen perlinger
>> <juergen.perlinger at t-online.de>  wrote:
>>> My conclusion would be: No matter what we do, NTPD works best with less
>>> than 2^31sec offset to the time source(s) on startup. But if we need a
>>> step, we can make sure we don't get sucked through a wormhole into the
>>> other end of the galaxy, and I still think we should do so.
>> 
>> Relaxing the 2^31sec requirement well ahead of 2036 with an approach
>> good for nearly a hundred years from now seems a worthwhile
>> improvement to me.  Does anyone disagree, or see a pitfall not yet
>> mentioned?
> 
> "Relaxing" it by adding the further requirement that it has to be after the compile time (possibly minus the 10-year guard Juergen suggests) seems almost like a no-brainer.
> 
> No matter the type of system, if you intentionally compile up ntpd with the clock 68 years or more wrong, then you _deserve_ the resulting bad timestamps.
> 
> I've also considered using the create or last modification timestamp on the ntpd binary, in which case it would be sufficient to run "touch ntpd" every 60+ years, but this breaks down if/when you end up on a filesystem (flash/rom) which doesn't maintain these timestamps properly.
> 
> Using the compile time requires at least a recompile every 60 years, but that seems hard to avoid for any system, no matter how long-lived.

Let's get some perspective.  It is 2011.  Now - 60 years is 1951.  The number of programs from 1951 that are still running that haven't been recompiled that aren't in some hobbyist's basement is 0.  Adding the hobbyist basement systems might increment that count, but wouldn't put it past single digits.  I think that it likely is a good enough window for the foreseeable future.  Even systems and software from 1981 are rare (likely rare enough to not be a big factor in deciding things).

Also, the NTP protocol likely will undergo additional evolution in the next 30 years, which might force the issue of recompiling for interoperability before the time window issues comes up.  If nothing else, we have IPv6 being deployed.  Even though that took 20 years to get done, I can easily imagine that IPv7 might arrive within the 60 year time frame.

Warner


More information about the hackers mailing list