Package: openntpd
Version: 1:5.7p4-1
Severity: normal
Tags: upstream

When a negative delay is received from a server, time synchronization
is stopped for several dozens of minutes. This is a bug in the logic,
because a negative delay doesn't imply that the clock is synchronized.
And even if negative delays are not supported (see bug 680464), other
servers could still be used. For instance:

Jul 06 12:51:49 zira systemd[1]: Starting OpenNTPd Network Time Protocol...
Jul 06 12:51:49 zira ntpd[815]: constraint certificate verification turned off
Jul 06 12:51:49 zira ntpd[815]: ntp engine ready
Jul 06 12:51:49 zira systemd[1]: Started OpenNTPd Network Time Protocol.
Jul 06 12:52:05 zira ntpd[815]: peer 92.243.27.21 now valid
Jul 06 12:52:07 zira ntpd[815]: peer 37.187.107.140 now valid
Jul 06 12:52:08 zira ntpd[815]: peer 176.31.251.139 now valid
Jul 06 12:52:08 zira ntpd[815]: peer 193.55.167.1 now valid
Jul 06 12:52:09 zira ntpd[815]: peer 95.81.173.155 now valid
Jul 06 12:52:09 zira ntpd[815]: peer 195.154.216.35 now valid
Jul 06 12:52:10 zira ntpd[815]: peer 37.59.60.67 now valid
Jul 06 12:52:10 zira ntpd[815]: peer 195.154.113.163 now valid
Jul 06 12:52:11 zira ntpd[815]: peer 91.121.90.6 now valid
Jul 06 12:52:11 zira ntpd[815]: peer 91.121.169.20 now valid
Jul 06 12:52:12 zira ntpd[815]: peer 176.31.124.26 now valid
Jul 06 12:52:12 zira ntpd[815]: peer 212.83.179.156 now valid
Jul 06 12:52:12 zira ntpd[815]: peer 195.154.189.15 now valid
Jul 06 12:52:13 zira ntpd[815]: peer 212.83.131.33 now valid
Jul 06 12:52:14 zira ntpd[815]: peer 212.85.158.10 now valid
Jul 06 12:52:15 zira ntpd[815]: peer 37.187.103.150 now valid
Jul 06 12:53:15 zira ntpd[815]: peer 195.154.216.35 now invalid
Jul 06 12:53:28 zira ntpd[809]: adjusting local clock by 19.381702s
Jul 06 12:57:38 zira ntpd[809]: adjusting local clock by 19.235437s
Jul 06 12:58:12 zira ntpd[809]: adjusting local clock by 19.215412s
Jul 06 12:58:32 zira ntpd[815]: peer 195.154.216.35 now valid
Jul 06 13:01:16 zira ntpd[815]: peer 212.83.179.156 now invalid
Jul 06 13:02:25 zira ntpd[809]: adjusting local clock by 19.063850s
Jul 06 13:03:59 zira ntpd[809]: adjusting local clock by 19.010300s
Jul 06 13:05:43 zira ntpd[815]: peer 195.154.189.15 now invalid
Jul 06 13:06:40 zira ntpd[815]: peer 212.83.179.156 now valid
Jul 06 13:07:43 zira ntpd[809]: adjusting local clock by 18.874262s
Jul 06 13:09:51 zira ntpd[809]: adjusting local clock by 18.800891s
Jul 06 13:11:09 zira ntpd[815]: peer 195.154.189.15 now valid
Jul 06 13:14:02 zira ntpd[809]: adjusting local clock by 18.646083s
Jul 06 13:14:02 zira ntpd[815]: reply from 195.154.216.35: negative delay 
-0.014470s, next query 3013s
Jul 06 13:35:52 zira ntpd[815]: peer 195.154.189.15 now invalid

and then, nothing else. This bug makes the synchronization process
much slower than expected. This comes from the following lines in
client.c:

        if (p->reply[p->shift].delay < 0) {
                interval = error_interval();
                set_next(p, interval);
                log_info("reply from %s: negative delay %fs, "
                    "next query %llds",
                    log_sockaddr((struct sockaddr *)&p->addr->ss),
                    p->reply[p->shift].delay, (long long)interval);
                return (0);
        }

I suppose that the interval for the next query may be normal for the
current peer. But I don't understand why the synchronization doesn't
go on with other peers.

Note: Fixing the wishlist bug 680464 would probably fix this one.
But there may be similar problems with other kinds of errors.

-- System Information:
Debian Release: stretch/sid
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'unstable'), (500, 'testing'), 
(500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 3.16.0-4-amd64 (SMP w/8 CPU cores)
Locale: LANG=POSIX, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages openntpd depends on:
ii  adduser              3.113+nmu3
ii  init-system-helpers  1.23
ii  libc6                2.19-18
ii  netbase              5.3

openntpd recommends no packages.

Versions of packages openntpd suggests:
pn  apparmor  <none>

-- Configuration Files:
/etc/openntpd/ntpd.conf changed:
servers 0.debian.pool.ntp.org
servers 1.debian.pool.ntp.org
servers 2.debian.pool.ntp.org
servers 3.debian.pool.ntp.org
constraint from www.vinc17.net


-- no debconf information


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to