running the following command results in a segmentation fault: sudo ntpd -c /home/denys/bin/ntpd-loria.conf -q -g -dd where file ntpd-loria.conf contains: server ntphost1.loria.fr iburst server ntphost2.loria.fr iburst server ntphost3.loria.fr iburst A similar problem was reported on the forums http://forums.gentoo.org/viewtopic.php?t=161697 The corresponding trace is: ntpd 4.2.0@1.1161-r Wed Apr 14 20:14:42 CEST 2004 (1) addto_syslog: ntpd 4.2.0@1.1161-r Wed Apr 14 20:14:42 CEST 2004 (1) addto_syslog: signal_no_reset: signal 13 had flags 4000000 addto_syslog: set_process_priority: Leave priority alone: priority_done is <2> addto_syslog: precision = 1.000 usec create_sockets(123) addto_syslog: no IPv6 interfaces found bind() fd 4, family 2, port 123, addr 0.0.0.0, flags=8 flags for fd 4: 04002 bind() fd 5, family 2, port 123, addr 127.0.0.1, flags=0 flags for fd 5: 04002 bind() fd 6, family 2, port 123, addr 192.168.60.30, flags=8 flags for fd 6: 04002 bind() fd 7, family 2, port 123, addr 81.249.175.121, flags=0 flags for fd 7: 04002 create_sockets: ninterfaces=4 interface 0: fd=4, bfd=-1, name=wildcard, flags=0x8 sin=0.0.0.0 bcast=0.0.0.0, mask=255.255.255.255 interface 1: fd=5, bfd=-1, name=lo, flags=0x5 sin=127.0.0.1 mask=255.0.0.0 interface 2: fd=6, bfd=-1, name=eth1, flags=0x9 sin=192.168.60.30 bcast=192.168.60.255, mask=255.255.255.0 interface 3: fd=7, bfd=-1, name=ppp0, flags=0x3 sin=81.249.175.121 mask=255.255.255.255 init_io: maxactivefd 7 local_clock: at 0 state 0 getnetnum given ntphost1.loria.fr, got 2001:660:301:1:202:a5ff:fe53:dfd8 key_expire: at 0 peer_clear: at 0 assoc ID 30604 refid INIT newpeer: null->2001:660:301:1:202:a5ff:fe53:dfd8 mode 3 vers 4 poll 6 10 flags 0x201 0x1 ttl 0 key 00000000 getnetnum given ntphost2.loria.fr, got 2001:660:301:1:202:a5ff:fe63:1a66 key_expire: at 0 peer_clear: at 0 assoc ID 30605 refid INIT newpeer: null->2001:660:301:1:202:a5ff:fe63:1a66 mode 3 vers 4 poll 6 10 flags 0x201 0x1 ttl 0 key 00000000 getnetnum given ntphost3.loria.fr, got 2001:688:1fb8:1:204:76ff:feef:388 key_expire: at 0 peer_clear: at 0 assoc ID 30606 refid INIT newpeer: null->2001:688:1fb8:1:204:76ff:feef:388 mode 3 vers 4 poll 6 10 flags 0x201 0x1 ttl 0 key 00000000 report_event: system event 'event_restart' (0x01) status 'sync_alarm, sync_unspec, 1 event, event_unspec' (0xc010) Segmentation fault Reproducible: Always Steps to Reproduce:
run it through gdb and see if anything useful shows up
running it through gdb: (gdb) bt #0 0x08051604 in sendpkt (dest=0x80a1d50, inter=0x0, ttl=0, pkt=0xbfffec90, len=48) at ntp_io.c:1377 #1 0x08067afd in peer_xmit (peer=0x80a1d48) at ntp_proto.c:2354 #2 0x08063691 in transmit (peer=0x80a1d48) at ntp_proto.c:295 #3 0x080719e4 in timer () at ntp_timer.c:289 #4 0x08053769 in ntpdmain (argc=5, argv=0xbffff374) at ntpd.c:1079 #5 0x08052e56 in main (argc=5, argv=0xbffff374) at ntpd.c:239 some pointer is NULL: (gdb) p inter $5 = (struct interface *) 0x0 which comes from a peer not properly initialized (I guess): (gdb) f 3 #3 0x080719e4 in timer () at ntp_timer.c:289 (gdb) p peer->dstadr $6 = (struct interface *) 0x0 I don't have time to look further into it right now as I have a conf deadline for tomorrow.
Same happened here. If I left only one server at ntp.conf, the server runs normally.
please try 4.2.0.20040617