|
|
Log in / Subscribe / Register

A rift in the NTP world

A rift in the NTP world

Posted Feb 9, 2017 9:49 UTC (Thu) by mtaht (guest, #11087)
In reply to: A rift in the NTP world by mina86
Parent article: A rift in the NTP world

I firmly believe any PR is good PR. I'd like to see ntp get more love and attention from those that depend on it... which is all of us.

I eschew politics. That said, there was one thing in the article's comments, that really stuck in my craw - "using python for core infrastructure" - vs what was actually said.

What was said in the article was still wrong: "rewriting NTP in Python rather than C to make attracting new developers easier"

The core ntpsec codebase remains in C, just cut in size and cruft by well over half... a *client* or two got re-written in python.

One of the the underlying protocols was removed. You can write a client in anything. Bunch of bad ideas - like autokey - ripped out.

Python is an unsuitable candidate for a daemon such as this.

There has been some interesting discussion about moving to rust, or go - on esr's and the ntpsec blog, as well as attempts at outreach to a wider community to get people interested in the obscurities of time service once again.

As a ex-time-nut myself, I have to say this piece was great:

https://blog.ntpsec.org/2017/02/01/heat-it-up.html

https://blog.ntpsec.org/ has discussions of the language evaluations, there are bigger ones on esr's blog. The rust one will melt your browser. :)

...

If people want to contribute to any of the time related codebases (be they ntpd, ntpsec, chrony, opentpd), that would be great! Even better if more folk would step in and independently evaluate these codebases and run them.

Even better if the world realized that somehow, the sometimes contentious, hard to deal with, difficult to understand, downright ornery experts - deeply involved in "holding up the sky", need a roof over their heads, too.


to post comments

A rift in the NTP world

Posted Feb 9, 2017 10:12 UTC (Thu) by mtaht (guest, #11087) [Link] (7 responses)

Just a quick followup, because I dated myself - "time-nuts" is a mailing list that goes back to the beginning of "web" time: http://www.leapsecond.com/time-nuts.htm

Prior to that there was a usenet newsgroup, going back to the beginning of internet time. Much, much, lost lore there.

Time problems remain with us, and we still keep getting it wrong in major daemons and slices of code - there are multiple ways of dealing with it in the Linux kernel, all needed, all in partial conflict. Why do you use periodic timers? Can you trust them? Does anyone know when and where you should use CLOCK_MONOTONIC vs CLOCK_MONOTONIC_RAW? What are the flaws in using one or the other? How can you represent stuff "right" in postgres? Should you smear time across a leapsecond? What happens when you slew time forward from the epoch? A lot of crypto protocols rely on time marching forward. DNSSEC needs it close to within an hour -

I happen to love fdtimers, which gets us away from do_something; sleep(1); do_itagain()....

if only there was a way to get at fdtimers from the shell! A lot of primitive benchmarks would get better.

We dealt OK with Y2K, but I increasingly worry about Y2036.

Dealing with time is hard. We need more people trying to get it right. My own interest in ntp was revived by realizing that ntp's ancient "huff and puff" algorithm was probably affected by bufferbloat, and, well, you have to obsessive about stuff like this to truly get it right.

A rift in the NTP world

Posted Feb 10, 2017 10:04 UTC (Fri) by xav (guest, #18536) [Link] (6 responses)

I think you meant Y2038 instead of Y2036.

A rift in the NTP world

Posted Feb 10, 2017 15:51 UTC (Fri) by mtaht (guest, #11087) [Link] (5 responses)

No, I meant the 2036 problem.

"The 64-bit timestamps used by NTP consist of a 32-bit part for seconds and a 32-bit part for fractional second, giving NTP a time scale that rolls over every 232 seconds (136 years) and a theoretical resolution of 2−32 seconds (233 picoseconds). NTP uses an epoch of 1 January 1900. The first rollover occurs in 2036, prior to the UNIX year 2038 problem.
Implementations should disambiguate NTP time using a knowledge of the approximate time from other sources. Since NTP only works with the differences between timestamps and never their absolute values, the wraparound is invisible as long as the timestamps are within 68 years of each other. This means that for NTP the rollover will be invisible for most running systems, since they will have the correct time to within a very small tolerance. However, systems that are starting up need to know the date within no more than 68 years. ": https://en.wikipedia.org/wiki/Year_2038_problem

I still expect a huge number of systems starting up to not have a battery by then.

A rift in the NTP world

Posted Feb 10, 2017 18:31 UTC (Fri) by excors (subscriber, #95769) [Link]

Shouldn't it be trivial for software to determine whether it's currently running in 1900 or in 2036, given that there were no digital computers in 1900? The only ambiguity should be for devices that are still in active use 136 years after their software was written, and there won't be any of those any time soon.

A rift in the NTP world

Posted Feb 10, 2017 21:45 UTC (Fri) by flussence (guest, #85566) [Link] (1 responses)

(To spare anyone else the confusion: those numbers outside the parentheses should read 2³² and 2⁻³² respectively :)

I'd say something about picoseconds being overkill for a timestamp sent over any length of network, but I guess someone somewhere really needs that. TAI64 goes all the way down to attoseconds(!)

A rift in the NTP world

Posted Feb 11, 2017 20:52 UTC (Sat) by da4089 (subscriber, #1195) [Link]

Check out the White Rabbit project at CERN, for one example.

A rift in the NTP world

Posted Feb 12, 2017 18:10 UTC (Sun) by smcv (subscriber, #53363) [Link] (1 responses)

> However, systems that are starting up need to know the date within no more than 68 years

I like systemd's trick for dealing with this: during early boot, if the kernel clock is before the date/time on which this particular version of systemd was compiled, it brings the clock forward to that date/time.

As long as you don't leave a device for decades without upgrading its OS, and rebuild systemd at least every few years (either for a security or other bug fix, or just artificially to get a newer timestamp), that's good enough.

There'd be nothing to stop the kernel doing the same trick with its own release or compilation date/time.

A rift in the NTP world

Posted Feb 13, 2017 1:31 UTC (Mon) by mathstuf (subscriber, #69389) [Link]

Note that with SOURCE_DATE_EPOCH from reproducible build efforts will make that date the date of the release or tag or some other static timestamp rather than "when this binary was built".


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds