[ntp:questions] Re: NTP 4.2.0 build configuration

Carsten P. Gehrke carsten at gehrke.org
Sun Nov 30 10:17:23 UTC 2003

Frederick Bruckman wrote:
>>#0  0x4028aa5b in __res_nquery () from /lib/libresolv.so.2
>>(gdb) bt
>>#0  0x4028aa5b in __res_nquery () from /lib/libresolv.so.2
>>#2  0x4028ae7e in __res_nsearch () from /lib/libresolv.so.2
>>#3  0x402811b6 in _nss_dns_gethostbyname2_r () from /lib/libnss_dns.so.2
>>#4  0x4022e49f in gethostbyname2_r@@GLIBC_2.1.2 () from /lib/libc.so.6
>>#5  0x4020515e in gaih_inet () from /lib/libc.so.6
>>#6  0x40205717 in getaddrinfo () from /lib/libc.so.6
>>#7  0x0804e42b in getnetnum (num=0xbffff6d7 "Shire2", addr=0xbffffb70,
>>complain=0) at ntp_config.c:2089
>>#8  0x0804bde8 in getconfig (argc=1, argv=0x3) at ntp_config.c:626
>>#9  0x08051a51 in ntpdmain (argc=2, argv=0xbffffd54) at ntpd.c:807
>>#10 0x0805163b in main (argc=1, argv=0x1) at ntpd.c:234
>>I then changed the /etc/ntp.conf and replaced Shire2 with its numeric IP 
>>address.  Now ntpd seems to work; it does connect to Shire2 (my internal 
>>stratum 3 time server which gets its time from  servers in stratum 1 and 
>>2).  I checked the /etc/hosts and /etc/nsswitch.conf, but couldn't find 
>>anything wrong with these.
> As Harlan wrote, that really looks like bug# 220, which I introduced
> adapting a NetBSD patch to NTP 4.2. If you're bitkeeper-challenged,
> you might try applying the one-line patch in that bug report to your
> sources.

After doing some investigating with gdb, it sure looked like a stack 
problem.  I applied the change in the patch, and now ntp appears to 
work.  Thanks!

More information about the questions mailing list