[Pool] a leap second on April 1st. Is it a prank?

Hal Murray hmurray at megapathdsl.net
Thu Apr 2 07:17:07 UTC 2015


meta at fastwebnet.it said:
> I've seen this on several machines in Italy:
> Apr  1 01:59:59 hostname kernel: [2552517.563918] Clock: inserting leap
> second 23:59:60 UTC

> Now, a leap second is NOT scheduled for today, so I wonder what's happening.

> It's been confirmed on Ubuntu, Debian and RedHat boxes. I don't have access
> to boxes with other OSes, but my guess is this isn't client-specific. 

What version of NTP are you using?

Do you have a GPS refclock?  If so, what type?

If you don't have a refclock, how many of your upstream servers had the same 
problem and/or what type of refclock are they using?

There is a category of bug I've seen/fixed in two of the GPS refclock 
drivers.  (HP and Palisade/Trimble)

What should happen is that somebody like GPS tells the refclock driver a leap 
second will happen in the future.  The refclock driver tells NTP.  On the 
last day of the month, NTP tells the kernel and other NTP servers.  At the 
end of the day, the kernel inserts an extra second.  The problem/bug is that 
if the refclock driver tells NTP more than a month early you get a leap 
second at the end of the current month and all the other months before the 
real leap second.

The fix I added was to ignore the leap info from the GPS receiver if the 
month isn't June or December.  It's a hack, but simple.  When scheduling leap 
seconds, preference is given to the end of June and end of December.  When we 
need more than 2 leaps per year, they will start using March and September 
and my code will need to get fixed, but that will be a long time from now.

The fix for the HP driver went in for the last leap second.  That was 2012.  
It didn't get into any of the 4.2.6 releases.

The fix for the Palisade driver is in 4.2.8p2-RC1 and ntp-dev.  I'm not sure 
how many types of hardware that driver covers.  I can test it with a 
Thunderbolt.  It also covers the Palisade, but that's a different code path 
that I can't test.

I think there is a bug in the Palisade path that doesn't pass through any 
leap info.  If you did or didn't get an early leap from Palisade hardware 
please let me know.



-- 
These are my opinions.  I hate spam.





More information about the pool mailing list