What would make ntpd hang in BSD 8?

Peter Steele psteele at maxiscale.com
Wed Feb 17 15:24:17 UTC 2010


We have an application where the user can change the date/time via a GUI. One of the options the user has is to specify that the time is to be synced using ntp. Our coding worked fine under BSD 7 but since we've moved onto BSD 8 we've encountered a problem where the command that we initiate from the GUI:

ntpd -g -q

is hanging indefinitely. Logs we've captured do not give any clues. This is the log from a BSD 7 system:

17 Feb 06:35:36 ntpd[3578]: logging to file /var/log/ntpd.log
17 Feb 06:35:36 ntpd[3578]: ntpd 4.2.0-a Sun Feb 24 09:12:07 UTC 2008 (1)
17 Feb 06:35:36 ntpd[3578]: precision = 1.676 usec
17 Feb 06:35:36 ntpd[3578]: kernel time sync status 2040
17 Feb 06:35:36 ntpd[3578]: frequency initialized -10.706 PPM from /var/db/ntpd.drift
17 Feb 06:35:45 ntpd[3578]: synchronized to 198.186.191.229, stratum=2
17 Feb 06:35:45 ntpd[3578]: time slew +0.003648 s

and this is the log from a BSD 8 system:

17 Feb 06:35:36 ntpd[2293]: logging to file /var/log/ntpd.log
17 Feb 06:35:36 ntpd[2293]: precision = 1.676 usec
17 Feb 06:35:36 ntpd[2293]: Listening on interface #0 wildcard, 0.0.0.0#123 Disabled
17 Feb 06:35:36 ntpd[2293]: Listening on interface #1 wildcard, ::#123 Disabled
17 Feb 06:35:36 ntpd[2293]: Listening on interface #2 nic0, fe80::2a0:d1ff:fee3:53cc#123 Enabled
17 Feb 06:35:36 ntpd[2293]: Listening on interface #3 nic1, fe80::2a0:d1ff:fee3:53cd#123 Enabled
17 Feb 06:35:36 ntpd[2293]: Listening on interface #4 lo0, fe80::1#123 Enabled
17 Feb 06:35:36 ntpd[2293]: Listening on interface #5 lo0, ::1#123 Enabled
17 Feb 06:35:36 ntpd[2293]: Listening on interface #6 lo0, 127.0.0.1#123 Enabled
17 Feb 06:35:36 ntpd[2293]: Listening on interface #7 lagg0, 192.168.17.46#123 Enabled
17 Feb 06:35:36 ntpd[2293]: Listening on routing socket on fd #29 for interface updates
17 Feb 06:35:36 ntpd[2293]: kernel time sync status 2040
17 Feb 06:35:36 ntpd[2293]: frequency initialized -10.706 PPM from /var/db/ntpd.drift

It never gets past this last log line and we have to do a kill -9 on the ntpd process. Everything is identical as far as the conf and drift files are concerned, we're using lagg interfaces on both systems. The versions of the two ntpd binaries are different-4.2.0-a for BSD 7 and 4.2.4p5 for BSD 8. I have not tried building the binary with debug mode enabled. That will probably be my next exercise. Any suggestions though in the meantime that might explain this would be appreciated.



More information about the freebsd-questions mailing list