[ntp:questions] Ntpd in uninterruptible sleep?

A C agcarver+ntp at acarver.net
Fri Nov 11 20:23:13 UTC 2011


On 11/9/2011 20:32, Dave Hart wrote:
> On Thu, Nov 10, 2011 at 04:21, A C<agcarver+ntp at acarver.net>  wrote:
>> As expected, it crashed again.  The interesting thing is that the constant
>> output from -D2 stopped in its tracks.  Nothing in the output shows anything
>> out of the ordinary.  It just halts completely.
>
> That's progress, and tells me a lot.  We need to see where ntpd is
> stuck, I think that means either attaching gdb to the hung ntpd, or
> starting it again under gdb and breaking into gdb once it hangs.  I'm
> relatively weak on gdb, but I believe if it's started under gdb, ^C
> will break into a gdb>  prompt.
>
> Once in, use "bt" to get a stack trace that hopefully goes back to
> ntpdmain (that is, is hopefully on the correct ntpd thread, and not
> any secondary or gdb-created thread).

First attempt with gdb and a back trace after attaching gdb to the hung 
process (note this particular running of ntpd was not using the debug 
command line options):

> #0  0x103d1458 in .umul () from /usr/lib/libc.so.12
> #1  0x103c38d4 in __pow5mult_D2A () from /usr/lib/libc.so.12
> #2  0x103c3ac4 in __muldi3 () from /usr/lib/libc.so.12
> #3  0x103c34dc in __mult_D2A () from /usr/lib/libc.so.12
> #4  0x103c3728 in __pow5mult_D2A () from /usr/lib/libc.so.12
> #5  0x103b61d4 in __dtoa () from /usr/lib/libc.so.12
> #6  0x103b315c in __vfprintf_unlocked () from /usr/lib/libc.so.12
> #7  0x103230c4 in snprintf () from /usr/lib/libc.so.12
> #8  0x00023afc in ctl_putarray (tag=<value optimized out>, arr=0xa8fe0, start=1)
>     at ntp_control.c:1307
> #9  0x00024a7c in ctl_putpeer (varid=30, peer=0xa8e70) at ntp_control.c:1777
> #10 0x0002744c in read_variables (rbufp=0x1050d000, restrict_mask=0) at ntp_control.c:2334
> #11 0x0002664c in process_control (rbufp=0x1050d000, restrict_mask=0) at ntp_control.c:809
> #12 0x00035594 in receive (rbufp=0x1050d000) at ntp_proto.c:370
> #13 0x00022c00 in ntpdmain (argc=<value optimized out>, argv=<value optimized out>) at ntpd.c:1150
> #14 0x0001381c in ___start ()
> #15 0x00013754 in _start ()



More information about the questions mailing list