Bug 221282 - net/openntpd "ntpctl -sa" claims "clock synced, stratum 2" weeks after last contact to upstream NTP servers
Summary: net/openntpd "ntpctl -sa" claims "clock synced, stratum 2" weeks after last c...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Christian Weisgerber
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-08-06 14:36 UTC by Rene Wagner
Modified: 2020-09-13 14:20 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (naddy)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rene Wagner 2017-08-06 14:36:35 UTC
Dear maintainer,

the main openntpd server on my network had accidentally been without a connection to the internet for several weeks and thus unable to connect to its configured remote clock sources. Oddly enough, "ntpctl -sa" would still output a status of "clock synced, stratum 2". Other machines on the network using this server as their clock source would report a stratum of 3.

I would have expected openntpd to consider its clock as out of sync after some timeout and notify downstream hosts accordingly. I'm not sure how this case is intended to be handled as per the NTP protocol. I have, however, seen the ntp.org ntpd report a stratum of 16 in this case so clients further downstream can detect that there is a problem. 

I have since reconnected the affected machine and things are back to normal. Let me know if you'd like me to perform any additional tests. It appears that this can be easily replicated by disconnecting a single openntpd server and watching the output of "ntpctl -sa" on that machine.

Cheers,

Rene
Comment 1 Christian Weisgerber freebsd_committer freebsd_triage 2017-08-07 19:07:55 UTC
Thank you, I can reproduce this.  It's a generic problem with OpenNTPD and not specific to the FreeBSD port.  I will raise the issue with upstream.
Comment 2 Rene Wagner 2017-08-07 20:19:51 UTC
Excellent, thanks!
Comment 3 Mark Linimon freebsd_committer freebsd_triage 2020-07-25 23:30:23 UTC
Is this PR still relevant?
Comment 4 Christian Weisgerber freebsd_committer freebsd_triage 2020-07-27 20:05:27 UTC
(In reply to Mark Linimon from comment #3)

Well, the bug still exists.  In fact, it still exists in the very latest ntpd on OpenBSD-current.

On the other hand, nobody else ever seems to have stumbled over this.  I guess NTP servers just don't disappear in practice.  I'll try to raise it with upstream again.

I'm fine with closing this bug or keeping it open indefinitely.
Comment 5 commit-hook freebsd_committer freebsd_triage 2020-09-13 14:14:50 UTC
A commit references this bug:

Author: naddy
Date: Sun Sep 13 14:14:27 UTC 2020
New revision: 548477
URL: https://svnweb.freebsd.org/changeset/ports/548477

Log:
  Merge back fixes from OpenBSD 6.8-beta:
  If no replies are received for a while due to connectivity issues,
  go into unsynced mode.

  PR:		221282
  Reported by:	Rene Wagner <rw@nelianur.org>
  Obtained from:	OpenBSD

Changes:
  head/net/openntpd/Makefile
  head/net/openntpd/files/patch-src_client.c
  head/net/openntpd/files/patch-src_ntp.c
  head/net/openntpd/files/patch-src_ntpd.conf.5
  head/net/openntpd/files/patch-src_ntpd.h
Comment 6 Christian Weisgerber freebsd_committer freebsd_triage 2020-09-13 14:20:33 UTC
This has finally been fixed upstream.