[ntp:questions] Re: NTP 4.2.0 build configuration

Carsten P. Gehrke carsten at gehrke.org
Fri Nov 28 23:25:48 UTC 2003


I installed gdb to look at the core dump after running ntpd -q:

GNU gdb 6.0
Copyright 2003 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu"...
Core was generated by `ntpd -q'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /lib/libm.so.6...done.
Loaded symbols for /lib/libm.so.6
Reading symbols from /usr/lib/libcrypto.so.0.9.7...done.
Loaded symbols for /usr/lib/libcrypto.so.0.9.7
Reading symbols from /lib/libc.so.6...done.
Loaded symbols for /lib/libc.so.6
Reading symbols from /lib/libdl.so.2...done.
Loaded symbols for /lib/libdl.so.2
Reading symbols from /lib/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
Reading symbols from /lib/libnss_files.so.2...done.
Loaded symbols for /lib/libnss_files.so.2
Reading symbols from /lib/libnss_dns.so.2...done.
Loaded symbols for /lib/libnss_dns.so.2
Reading symbols from /lib/libresolv.so.2...done.
Loaded symbols for /lib/libresolv.so.2
#0  0x4028aa5b in __res_nquery () from /lib/libresolv.so.2
(gdb) bt
#0  0x4028aa5b in __res_nquery () from /lib/libresolv.so.2
#1  0x4028b074 in __res_nquerydomain () 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.

I compiled ntp according to what I wrote earlier:


Carsten P. Gehrke wrote:
> I just built ntp-4.2.0 with these commands:
> 
> as an unprivileged user:
> ./configure --prefix=/usr --sysconfdir=/etc \
>   --localstatedir=/var/lib/ntp --with-crypto=openssl \
>   --disable-all-clocks --disable-parse-clocks
> make
> 
> as root:
> make install
> 
> If I run ntpd, it silently dies.  The system log contains:
> ... ntpd[3175]: ntpd 4.2.0 at 1.1164-r Wed Nov 26 20:10:10 PST 2003 (1)
> ... ntpd[3175]: signal_no_reset: signal 13 had flags 4000000
> ... ntpd[3175]: precision = 4.000 usec
> ... ntpd[3175]: no IPv6 interfaces found
> ... ntpd[3175]: kernel time sync status 0040
> 
> If I run ntpd -q, I get a segfault, but no core
> ntpd -g also dies quietly
> 
> The file /etc/ntp.conf exists, and contains the lines:
> driftfile /var/lib/ntp/ntp.drift
> server timeserver prefer
> 
> timeserver is the name of another host on my network running ntp-4.1.1 
> without problems.  That server gets its time from public time servers, 
> and distributes it on my LAN.
> 
> Did I configure the source incorrectly?  I had installed the openssl 
> library before ntp.  I don't have gdb installed on this system.
> 
> TIA,
> Carsten
> 




More information about the questions mailing list