Just to follow up on my debugging... After playing with a whole pile of options and configurations, I discovered that it has something to do with my hack of NTP_MINPOLL to 2. If I set the PPS source's minpoll to 4 or more, everything works fine. If I set it to 3 or less, I get the bizarre "loopstats offset != peerstats offset" behavior.
After some playing with debugging, it appears that the Linux kernel adjtimex code doesn't like ntv.constant < 0 and returns -1/EINVAL. But ntpd doesn't notice the error (since it's not TIME_ERROR) and merrily proceeds on its way. Despite the error, the kernel copies its current values into the passed-in ntptimeval, and that's what is logged in loopstats. I note that the top of page 17 of "Unix kernel modifications for precision time synchronization" (UDel EE department report 94-10-1) specifically anticipates a negative return value, and it's also very firm Unix tradition, so I'd like to suggest that failure to report this error (at least by exiting) is a bug in ntpd that needs fixing. Thanks! _______________________________________________ questions mailing list [email protected] https://lists.ntp.isc.org/mailman/listinfo/questions
