Subject: bin/31580: 'ntptime' no longer reports ERROR and UNSYNC when ntpd isn't synchronized (ntpd bug #506)
To: None <gnats-admin@netbsd.org, netbsd-bugs@netbsd.org>
From: None <carton@Ivy.NET>
List: netbsd-bugs
Date: 10/13/2005 19:37:00
>Number: 31580
>Category: bin
>Synopsis: 'ntptime' no longer reports ERROR and UNSYNC when ntpd isn't synchronized (ntpd bug #506)
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: bin-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Oct 13 19:37:00 +0000 2005
>Originator: Miles Nordin
>Release: NetBSD 3.0_BETA
>Organization:
Ivy Ministries
>Environment:
System: NetBSD castrovalva 3.0_BETA NetBSD 3.0_BETA (CASTROVALVA-$Revision: 1.10 $) #0: Sun Sep 11 15:08:04 EDT 2005 carton@castrovalva:/export/src/sys/arch/alpha/compile/CASTROVALVA alpha
Architecture: alpha
Machine: alpha
>Description:
* 'ntptime' no longer reports when ntp isn't working. For example,
when ntpd is not running at all, a NetBSD 1.6 ntpd 4.0.99 system reports:
-----8<-----
ntp_gettime() returns code 5 (ERROR)
time c6f7f9fe.f87b7000 Wed, Oct 12 2005 17:09:18.970, (.970634),
maximum error 108048 us, estimated error 16 us.
ntp_adjtime() returns code 5 (ERROR)
modes 0x0 (),
offset -1548.000 us, frequency 74.770 ppm, interval 1 s,
maximum error 108048 us, estimated error 16 us,
status 0x41 (PLL,UNSYNC),
time constant 6, precision 1.000 us, tolerance 512 ppm,
-----8<-----
while a NetBSD 3.0_BETA ntpd 4.2.0 system reports:
-----8<-----
ntp_gettime() returns code 0 (OK)
time c6f7fa2f.1b7f6000 Wed, Oct 12 2005 21:10:07.107, (.107412),
maximum error 1022840 us, estimated error 16 us
ntp_adjtime() returns code 0 (OK)
modes 0x0 (),
offset 0.000 us, frequency -332.393 ppm, interval 1 s,
maximum error 1022840 us, estimated error 16 us,
status 0x1 (PLL),
time constant 0, precision 1.000 us, tolerance 1576 ppm,
-----8<-----
so the gettime ERROR and the status UNSYNC seem to never be used
any more. Also, when ntpd is running, but the clock is off by 8
seconds, NetBSD 3.0 ntptime(8) also reports OK, while NetBSD 1.6
reports ERROR in that case. In general it reports ERROR even after
ntpd is started, until ntpd declares the clock
probably-synchronized.
>How-To-Repeat:
run ntptime a few times right after ntpd starts up on a NetBSD 1.6
system to see the desired behavior of ERROR, ERROR, ERROR, OK.
>Fix:
Unknown