Subject: Re: ntpd dumping core on restart
To: Christos Zoulas <>
From: Steven M. Bellovin <>
List: current-users
Date: 04/05/2005 15:39:33
In message <>, Christos Zoulas writes:
>In article <>,
>Steven M. Bellovin <> wrote:
>>On up-to-the-minute -current, ntpd starts up properly at boot time.  
>>However, if I run '/etc/rc.d/ntpd restart', it dumps core with a memory 
>>fault.  Any suggestions where to look?
>compile it with -g and look at the core file?

Here's a backtrace.  The call to getaddrinfo in ntpd looks good.  I 
haven't (yet?) tried recompiling libc with -g.

(gdb) bt
#0  0xbda8f62c in __ns_samename () from /usr/lib/
#1  0xbda7dbd2 in __res_nameinquery () from /usr/lib/
#2  0xbda7dcd5 in __res_queriesmatch () from /usr/lib/
#3  0xbda7eedf in __res_nsend () from /usr/lib/
#4  0xbda7e1e1 in __res_nsend () from /usr/lib/
#5  0xbda85f70 in getaddrinfo () from /usr/lib/
#6  0xbda86396 in getaddrinfo () from /usr/lib/
#7  0xbda862a2 in getaddrinfo () from /usr/lib/
#8  0xbda85745 in getaddrinfo () from /usr/lib/
#9  0xbda918e7 in nsdispatch () from /usr/lib/
#10 0xbda848b6 in getaddrinfo () from /usr/lib/
#11 0xbda84613 in getaddrinfo () from /usr/lib/
#12 0x0804ef8d in getnetnum (num=0xbfbfe028 "", 
    addr=0xbfbfe4d0, complain=0) at /usr/src/dist/ntp/ntpd/ntp_config.c:2087
#13 0x0804c67c in getconfig (argc=2, argv=0xbfbfe678)
    at /usr/src/dist/ntp/ntpd/ntp_config.c:628
#14 0x08074958 in ntpdmain (argc=2, argv=0xbfbfe678)
    at /usr/src/dist/ntp/ntpd/ntpd.c:809
#15 0x0807459e in main (argc=2, argv=0xbfbfe678)
    at /usr/src/dist/ntp/ntpd/ntpd.c:236
#16 0x0804b896 in ___start ()

		--Prof. Steven M. Bellovin,