[ntp:questions] Leap second indication (Linux NTPD specifically)

Dave Hart hart at ntp.org
Tue Mar 6 15:23:26 UTC 2012

To answer your questions you need two test systems (which could be
VMs).  On one, load a recent-enough ntpd that you can load a
"leapfile" using ntp.conf that schedules the insertion for the end of
June 2012.  If that system's OS also happens to have the bug inserting
leap seconds in the kernel NTP loop discipline, disable its use with
"disable kernel" in ntp.conf.  Set up its ntpd with no sources except
a single undisciplined local clock driver "server" "fudge stratum 10".  On the second system, use the
commercially-mandated kernel and ntpd versions, and configure a single
"server" line referring to the IP address or hostname of the first

Now shut down ntpd on both systems.  Set the clock on the first system
to 5 minutes before the end of the June 2012.  Restart ntpd on both
systems.  Verify the second system tickles the kernel bug while the
first doesn't.  Add "disable kernel" to ntp.conf on the second system.
 Repeat the experiment.  Now both should handle the leapsecond
insertion relatively smoothly.

Note that with "disable kernel" ntpd will step the system clock back
1s sometime during the leap second, and any applications depending on
the clock to increase monotonically during that period may be unhappy.

In short: disable kernel should avoid tickling the bug without
necessarily shutting down ntpd, but if you need a monotonically
increasing clock, you may still be better off to shut down the entire
system for a minute or so at the end of June.  Shutting down ntpd or
the system for days would be gross overkill.  Relying on expectations
without testing invites surprise.

Dave Hart

More information about the questions mailing list