[ntp:questions] Leap Second

morsupil michael.froment at gmail.com
Wed Dec 3 08:48:28 UTC 2008


On Dec 3, 8:10 am, Unruh <unruh-s... at physics.ubc.ca> wrote:
> morsupil <michael.from... at gmail.com> writes:
> >On 3 d=E9c, 00:30, Bill Unruh <un... at physics.ubc.ca> wrote:
> >> Unruh <unruh-s... at physics.ubc.ca> writes:
> >> >michael.from... at gmail.com writes:
> >> >>Hi all,
> >> >>Since yesterday I saw the leap second Flag set on some servers of
> >> >>ntp.pool.org. I'am quite surprise because the leap second add to be
> >> >>set the 31/12/2008 and not the 1/12/2008.
> >> >>Is it normal????
> >> >The leap is announced at the beginning of the month to make sure that al=
> >l
> >> >ntp clients know about it. It always occurs at the end of the month ( I
> >> >think ntpd has it hard coded as the end of June or Dec, but in principle=
> > it
> >> >could be any month)
>
> >> Here is a fragment from the ntp code (ntp_loopfilter.c) (4.2.4p4)
>
> >> if ((tm->tm_mon + 1 =3D=3D 6 &&
> >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 tm->tm_mday =3D=3D 30) || (tm->tm_mon +
> >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 1 =3D=3D 12 && tm->tm_mday =3D=3D 31)) {
> >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (leap_next & LEAP_ADDSECOND)
> >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 ntv.status |=3D STA_INS;
> >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0else if (leap_next &
> >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0LEAP_DELSECOND)
> >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 ntv.status |=3D STA_DEL;
>
> >> Ie, ntp pays attention to the leap second flag only if it is June 30 or D=
> >ec
> >> 31. Now, that is not correct since I believe that a leapsecond can occur =
> >on
> >> any month, but the tradition is that if there is only one or two a year,
> >> those are the dates chosen. In a century or two, when there are more than=
> > 2
> >> per year, then ntpd will run into trouble. (Of course the definition of
> >> time might have changed anyway, or the whole UTC kludge may be scrapped o=
> >r
> >> a new edition of ntpd not containing that assumption may be published.)
> >> Note that the very existence of ntpd with its assumptions puts huge
> >> pressure on the standards organisation to comply with the assumptions.
> >So this could not cause problem if on a pool of servers someone answer
> >with the LI flag set and another one without the LI flag set????
> >I'm quite surprise by the fact that ntpd seems to be the standard...
> >There is many of other client and many of other servers...
>
> Just to clarify: the standrds say that Dec 31 and June 30 are the preferred
> dates, March 31 and Sep 30 the secondary ones. I assume once we get to the
> 24th century once we need more than 4 leap sec a year, standards will have
> changed.

It seems that since the LI flag is set on some servers, some NTP
clients problems.
Here is a problem reported by a nagios server on some ntp servers:
/usr/local/nagios/libexec/check_ntp -H xxx.xxx.xxx.xxx
NTP CRITICAL: Offset unknown

I also see since 3 day problems on some Set Top Box that doesn't
understand the answer from an ntpd server causing those STB hanging at
boot... The workaround solution for the moment is to shutdown
synchronisation with Public NTP server pool... too bad...

Any Ideas?




More information about the questions mailing list