[ntp:questions] ntpd wedged again

Ron Frazier (NTP) timekeepingntplist at c3energy.com
Tue Feb 7 19:19:23 UTC 2012

Hi A C,

I will admit that I've only skimmed your NTPD losing sync thread 
briefly.  I just wanted to share this loopstats file where my USB (no 
PPS) GPS occasionally goes crazy and has offsets almost an order of 
magnitude larger than normal.  IE, normal offsets are in the 15 ms 
range.  Then, they jump up to around 100 ms.  Usually, I stop NTPD, 
unplug and replug the USB plug for the GPS, and restart NTPD, which 
fixes the problem.  However, coincidentally, this time, I let it run.  
After a number of hours, the problem fixed itself.  It's very strange.  
I don't know if my problem and yours are related in any way or not.  I'm 
running Windows, with the main NTP programs from Dave Hart's site:


Here's a link to the loopstats file:




On 2/7/2012 12:37 PM, A C wrote:
> It appears that ntpd is wedged again in libc.  I'm not sure (but it's 
> likely) if this is the source of the random behavior lately with ntpd 
> spinning offsets out of control but I've ruled out the GPS by 
> noselecting the PPS signal, turning off kernel PPS and monitored the 
> PPS signal externally.  There were no missing pulses or drastic phase 
> shifts but ntpd spun out of control oscillating throug multisecond 
> offsets across all sources.
> Right now ntpd is using 80% CPU but not responding to anything.  This 
> copy is compiled with the C99 flag (from a previous thread with the 
> broken dtoa issue).
> Looks like I'll have to take this over to NetBSD's list for now.
> #0  0x103d38c8 in __pow5mult_D2A () from /usr/lib/libc.so.12
> #1  0x103d3ac4 in __muldi3 () from /usr/lib/libc.so.12
> #2  0x103d34dc in __mult_D2A () from /usr/lib/libc.so.12
> #3  0x103d3728 in __pow5mult_D2A () from /usr/lib/libc.so.12
> #4  0x103c61d4 in __dtoa () from /usr/lib/libc.so.12
> #5  0x103c315c in __vfprintf_unlocked () from /usr/lib/libc.so.12
> #6  0x103330c4 in snprintf () from /usr/lib/libc.so.12
> #7  0x000256f4 in ctl_putdblf (tag=0x87d79 "", fmt=0x88458 "%.3f", 
> d=4.5623779296875)
>     at ntp_control.c:1431
> #8  0x00025ed0 in ctl_putpeer (id=14, p=0xb1bc0) at ntp_control.c:2459
> #9  0x0002adbc in read_variables (rbufp=0x10522000, restrict_mask=0) 
> at ntp_control.c:2981
> #10 0x00028798 in process_control (rbufp=0x10522000, restrict_mask=0) 
> at ntp_control.c:1121
> #11 0x00038150 in receive (rbufp=0x10522000) at ntp_proto.c:417
> #12 0x0002323c in ntpdmain (argc=0, argv=0xefffe8a8) at ntpd.c:1069
> #13 0x000138bc in ___start ()
> #14 0x000137f4 in _start ()


(PS - If you email me and don't get a quick response, don't be concerned.
I get about 300 emails per day from alternate energy mailing lists and
such.  I don't always see new messages very quickly.  If you need a
reply and have not heard from me in 1 - 2 weeks, send your message again.)

Ron Frazier
timekeepingdude AT c3energy.com

More information about the questions mailing list