[ntp:questions] Many falseticker occurs by a difference of ntp-4.1.2 and ntp-4.2.4p3.

Naoki Harigai naoki_harigai at montavista.co.jp
Mon Aug 20 09:40:53 UTC 2007


Dear all,

I found many falseticker when using ntp-4.2.4p3.
(The falseticker occur repeatedly when I move system clock delay 120sec.)
However, the falseticker did not occur ntp-4.1.2 on same environment.

Then, I debuged ntp-4.2.4p3 and ntp-4.1.2 for falseticker.
As a result, most falseticker is this reasons.


1. CLOCK_ALLAN is different from ntp-4.1.2 and ntp-4.2.4p3
ntp-4.1.2(ntpd/ntp_loopfilter.c)
#define CLOCK_ALLAN     10      /* min Allan intercept (log2 s) */

ntp-4.2.4p3(ntpd/ntp_loopfilter.c)
#define   CLOCK_ALLAN     1500.   /* compromise Allan intercept (s) */

2. The distance list is not set definitely
ntp-4.1.2(ntpd/ntp_proto.c clock_filter())

 It set "sys_maxdist + peer->filter_disp[j]" other than the last dst.
 (dst[i] = sys_maxdist + peer->filter_disp[j]; Case 1.)
 The last dst sets filter_delay[j].
 (dst[i] = peer->filter_delay[j]; Case 2.)

ntp-4.2.4p3(ntpd/ntp_proto.c clock_filter())
 All dst sets filter_delay[j]. Case 2.

Because allan_xpt(CLOCK_ALLAN) is too big.

<< ntp-4.2.4p3 ntp_proto.c clock_filter() >>
   1648         for (i = NTP_SHIFT - 1; i >= 0; i--) {
   1649                 if (i != 0)
   1650                         peer->filter_disp[j] += dtemp;
   1651                 if (peer->filter_disp[j] >= MAXDISPERSE)
   1652                         peer->filter_disp[j] = MAXDISPERSE;
   1653                 if (peer->filter_disp[j] >= MAXDISPERSE)
   1654                         dst[i] = MAXDISPERSE;
   1655                 else if (peer->update - peer->filter_epoch[j] >
   1656                     allan_xpt)
   1657                         dst[i] = sys_maxdist + peer->filter_disp[j]; <<<=== Case 1
   1658                 else
   1659                         dst[i] = peer->filter_delay[j]; <<<=== Case 2
   1660                 ord[i] = j;
   1661                 j++; j %= NTP_SHIFT;
   1662         }
<< ntp-4.2.4p3 ntp_proto.c clock_filter() >>

3. A turn of the dst changes.

4. start sort logic and ord[0] is changed
   A value of "k"(ord[0]) which is index of the peer->filter_epoch[k] is changed.
   (And peer->filter_epoch[k] is not value of current.)

5. discard occur, then clock_select() is not called

6. When clock_select() was called at next time, a value of peer->offset slips off.
   Then, falseticker occur.


I can not understand why change CLOCK_ALLAN 10(ntp-4.1.2) to 1500.(ntp-4.2.4p3).
Please teach me the reason why CLOCK_ALLAN was changed.

And is this(falseticker issue) a problem? 
Or is it influence by enhancement?

If you need more information for this, please let me know.


Best regards,
 Naoki



More information about the questions mailing list