Bug 225778

Summary: ntpd fails to stay running
Product: Base System Reporter: Loyd Craft <lcraft>
Component: binAssignee: freebsd-bugs (Nobody) <bugs>
Status: New ---    
Severity: Affects Only Me CC: ian, pprocacci
Priority: ---    
Version: 11.1-RELEASE   
Hardware: amd64   
OS: Any   

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 freebsd_triage 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.