Bug 225778 - ntpd fails to stay running
Summary: ntpd fails to stay running
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 11.1-RELEASE
Hardware: amd64 Any
: --- Affects Only Me
Assignee: freebsd-bugs mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-02-08 21:50 UTC by Loyd Craft
Modified: 2018-06-23 03:03 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Loyd Craft 2018-02-08 21:50:52 UTC
ntpd fails to stay running on my brand new bhyve vm.   I've edited the config file to point to my local server which syncs to the ntp pools so as to reduce traffic to their servers.  I also tried it with a configuration offered by the ntpd developers at their site with the same results.


truss output of ntpd

https://pastebin.com/9GHNV0Bz


the host is a bhyve VM running FreeBSD 11.1-RELEASE under UEFI, on a FreeNAS 11.1 server.
Comment 1 pprocacci 2018-02-20 05:05:30 UTC
From your pastebin; line(s) 309 & 311:

sendto(3,"<101>Feb  8 11:36:47 ntpd[52134]"...,63,0,NULL,0) = 63 (0x3f)
sendto(3,"<102>Feb  8 11:36:47 ntpd[52134]"...,122,0,NULL,0) = 122 (0x7a)

What was sent to the log?
Comment 2 Ian Lepore freebsd_committer 2018-06-23 03:03:14 UTC
In my experience, the main reason for ntpd silently quitting is that the clock is far off and it refuses to step the clock that much.  That can be fixed by setting ntpd_sync_on_start=YES in your rc.conf.

That truss output only shows ntpd startup until the point where it forked off the daemon.  To get useful truss output for ntpd, you need to add the -n (no-fork) flag on the ntpd command line.