[Bug 8406] New: ntpd issue: the time isn't synchronized after configurating two or more usable NTP servers
bugzilla at busybox.net
bugzilla at busybox.net
Mon Oct 19 06:41:55 UTC 2015
https://bugs.busybox.net/show_bug.cgi?id=8406
Summary: ntpd issue: the time isn't synchronized after
configurating two or more usable NTP servers
Product: Busybox
Version: 1.19.x
Platform: Other
OS/Version: Linux
Status: NEW
Severity: blocker
Priority: P5
Component: Networking
AssignedTo: unassigned at busybox.net
ReportedBy: wendy.wu at technicolor.com
CC: busybox-cvs at busybox.net
Estimated Hours: 0.0
OS: mips linux
busybox version: 1.19.4
ntpd issue: the time isn't synchronized after configurating two or more usable
NTP servers
If I configurate two or more working ntp servers,
For instance: 172.30.50.23 and 172.30.50.21.
/usr/sbin/ntpd -n -l -p 172.30.50.23 -p 172.30.50.21 /sbin/firstusedate &
The date is not updated.
If I configurate one working ntp server and more than one no response ntp
servers
For instance: 172.30.50.23, 172.30.50.30, 172.30.50.33
/usr/sbin/ntpd -n -l -p 172.30.50.23 -p 172.30.50.22 /sbin/firstusedate &
And the date is updated.
After track the code of ntpd in busybox,
I find that if more than one candidates, no peer selected.
logs are as followings,
root at OpenWrt:~# /usr/sbin/ntpd -n -l -p 172.30.50.21 -p 172.30.50.23 -S
/sbin/firstusedate
ntpd: ntpd main
ntpd: ntp init
ntpd: filter offset:+0.000000 disp:0.000000 jitter:0.002000
ntpd: ->lastpkt_recv_time=2208989377.515911
ntpd: filter offset:+0.000000 disp:0.000000 jitter:0.002000
ntpd: ->lastpkt_recv_time=2208989377.515911
ntpd: send_query_to_peer begin
ntpd: resolved peer 172.30.50.23 to 172.30.50.23
ntpd: sending query to 172.30.50.23
ntpd: send_query_to_peer begin
ntpd: resolved peer 172.30.50.21 to 172.30.50.21
ntpd: sending query to 172.30.50.21
ntpd: recv_and_process_peer_pkt begin
ntpd: lastpkt_recv_time=2208989377.538691
ntpd: recv_and_process_peer_pkt update the clock
ntpd: filter offset:+1445228474.580437 disp:0.001001 jitter:0.002000
ntpd: no valid datapoints, no peer selected
ntpd: polladj: count:6
ntpd: chose poll interval:1 (poll_exp:0)
ntpd: recv_and_process_peer_pkt begin
ntpd: lastpkt_recv_time=2208989377.553536
ntpd: recv_and_process_peer_pkt update the clock
ntpd: filter offset:+1445228475.149800 disp:0.001001 jitter:0.002000
ntpd: no valid datapoints, no peer selected
ntpd: polladj: count:12
ntpd: chose poll interval:1 (poll_exp:0)
ntpd: send_query_to_peer begin
ntpd: sending query to 172.30.50.23
ntpd: send_query_to_peer begin
ntpd: sending query to 172.30.50.21
ntpd: recv_and_process_peer_pkt begin
ntpd: lastpkt_recv_time=2208989378.579830
ntpd: recv_and_process_peer_pkt update the clock
ntpd: filter offset:+1445228474.578943 disp:0.001509 jitter:0.002000
ntpd: no valid datapoints, no peer selected
ntpd: polladj: count:18
ntpd: chose poll interval:2 (poll_exp:0)
ntpd: recv_and_process_peer_pkt begin
ntpd: lastpkt_recv_time=2208989378.583470
ntpd: recv_and_process_peer_pkt update the clock
ntpd: filter offset:+1445228475.154744 disp:0.001509 jitter:0.002000
ntpd: no valid datapoints, no peer selected
ntpd: polladj: count:24
ntpd: chose poll interval:2 (poll_exp:0)
ntpd: send_query_to_peer begin
ntpd: sending query to 172.30.50.23
ntpd: send_query_to_peer begin
ntpd: sending query to 172.30.50.21
ntpd: recv_and_process_peer_pkt begin
ntpd: lastpkt_recv_time=2208989380.610805
ntpd: recv_and_process_peer_pkt update the clock
ntpd: filter offset:+1445228474.576810 disp:0.001770 jitter:0.002000
ntpd: no valid datapoints, no peer selected
ntpd: polladj: count:30
ntpd: chose poll interval:2 (poll_exp:0)
ntpd: recv_and_process_peer_pkt begin
ntpd: lastpkt_recv_time=2208989380.615153
ntpd: recv_and_process_peer_pkt update the clock
ntpd: filter offset:+1445228475.151268 disp:0.001770 jitter:0.002000
ntpd: no valid datapoints, no peer selected
ntpd: polladj: count:36
ntpd: chose poll interval:1 (poll_exp:0)
ntpd: send_query_to_peer begin
ntpd: sending query to 172.30.50.21
ntpd: recv_and_process_peer_pkt begin
ntpd: lastpkt_recv_time=2208989381.636017
ntpd: recv_and_process_peer_pkt update the clock
ntpd: filter offset:+1445228475.150733 disp:0.001893 jitter:0.002000
ntpd: no valid datapoints, no peer selected
ntpd: polladj: discipline_jitter:0.002000 ++poll_exp=1
ntpd: chose poll interval:2 (poll_exp:1)
ntpd: send_query_to_peer begin
ntpd: sending query to 172.30.50.23
ntpd: recv_and_process_peer_pkt begin
ntpd: lastpkt_recv_time=2208989382.660165
ntpd: recv_and_process_peer_pkt update the clock
ntpd: filter offset:+1445228474.574957 disp:0.001901 jitter:0.002000
ntpd: no valid datapoints, no peer selected
ntpd: polladj: count:6
ntpd: chose poll interval:2 (poll_exp:1)
ntpd: send_query_to_peer begin
ntpd: sending query to 172.30.50.21
ntpd: recv_and_process_peer_pkt begin
ntpd: lastpkt_recv_time=2208989383.682160
ntpd: recv_and_process_peer_pkt update the clock
ntpd: filter offset:+1445228475.149043 disp:0.001962 jitter:0.002000
ntpd: no valid datapoints, no peer selected
ntpd: polladj: count:12
ntpd: chose poll interval:3 (poll_exp:1)
ntpd: disabling burst mode
ntpd: send_query_to_peer begin
ntpd: sending query to 172.30.50.23
ntpd: recv_and_process_peer_pkt begin
ntpd: lastpkt_recv_time=2208989384.701791
ntpd: recv_and_process_peer_pkt update the clock
ntpd: filter offset:+1445228474.573397 disp:0.001966 jitter:0.002645
ntpd: interval: [1445228474.548567 1445228474.573397 1445228474.598227]
172.30.50.23
ntpd: interval: [1445228475.125299 1445228475.149043 1445228475.172788]
172.30.50.21
ntpd: falsetickers:1, candidates:2, no peer selected
ntpd: polladj: count:6
ntpd: chose poll interval:65 (poll_exp:6)
ntpd: send_query_to_peer begin
ntpd: sending query to 172.30.50.21
ntpd: recv_and_process_peer_pkt begin
ntpd: lastpkt_recv_time=2208989386.723089
ntpd: recv_and_process_peer_pkt update the clock
ntpd: filter offset:+1445228475.145546 disp:0.002004 jitter:0.002381
ntpd: interval: [1445228474.548537 1445228474.573397 1445228474.598258]
172.30.50.23
ntpd: interval: [1445228475.121881 1445228475.145546 1445228475.169210]
172.30.50.21
ntpd: falsetickers:1, candidates:2, no peer selected
ntpd: polladj: count:12
ntpd: chose poll interval:65 (poll_exp:6)
In function "select_and_cluster" in ntpd.c
If I change the code "if (num_falsetickers * 2 >= num_candidates)" to the
following,
if (num_falsetickers >= num_candidates) {
VERB3 bb_error_msg("falsetickers:%d, candidates:%d%s",
num_falsetickers, num_candidates,
", no peer selected");
return NULL;
}
The time is updated.
But maybe the change is not fitable, so please help to check the issue,
and give the fitable fix.
Thanks a lot.
--
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the busybox-cvs
mailing list