ntpd crashes when network interface goes down
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ntp (Ubuntu) |
Confirmed
|
Medium
|
Unassigned |
Bug Description
ntpd crashes with SIGSEGV when (teredo IPv6) interface goes down after unplugging a network cable:
Oct 22 03:17:03 oil ntpdate[5896]: adjust time server 118.143.17.82 offset 0.005534 sec
Oct 22 03:17:03 oil ntpd[5951]: ntpd 4.2.6p3@1.2290-o Mon Aug 20 15:15:21 UTC 2012 (1)
Oct 22 03:17:03 oil ntpd[5952]: proto: precision = 0.106 usec
Oct 22 03:17:03 oil ntpd[5952]: ntp_io: estimated max descriptors: 2144, initial socket boundary: 16
Oct 22 03:17:03 oil ntpd[5952]: Listen and drop on 0 v4wildcard 0.0.0.0 UDP 123
Oct 22 03:17:03 oil ntpd[5952]: Listen and drop on 1 v6wildcard :: UDP 123
Oct 22 03:17:03 oil ntpd[5952]: Listen normally on 2 lo 127.0.0.1 UDP 123
Oct 22 03:17:03 oil ntpd[5952]: Listen normally on 3 eth0 192.168.0.2 UDP 123
Oct 22 03:17:03 oil ntpd[5952]: Listen normally on 4 teredo fe80::ffff:
Oct 22 03:17:03 oil ntpd[5952]: Listen normally on 5 eth0 fe80::16fe:
Oct 22 03:17:03 oil ntpd[5952]: Listen normally on 6 teredo 2001:0:
Oct 22 03:17:03 oil ntpd[5952]: Listen normally on 7 lo ::1 UDP 123
Oct 22 03:17:03 oil ntpd[5952]: peers refreshed
Oct 22 03:17:03 oil ntpd[5952]: Listening on routing socket on fd #24 for interface updates
Oct 22 03:24:45 oil ntpd[5952]: Deleting interface #5 eth0, fe80::16fe:
Oct 22 03:24:45 oil ntpd[5952]: Deleting interface #3 eth0, 192.168.0.2#123, interface stats: received=40, sent=41, dropped=0, active_time=460 secs
Oct 22 03:24:45 oil ntpd[5952]: 220.130.158.71 interface 192.168.0.2 -> (none)
Oct 22 03:24:45 oil ntpd[5952]: 118.143.17.82 interface 192.168.0.2 -> (none)
Oct 22 03:24:45 oil ntpd[5952]: 14.0.18.136 interface 192.168.0.2 -> (none)
Oct 22 03:24:45 oil ntpd[5952]: 54.251.61.122 interface 192.168.0.2 -> (none)
Oct 22 03:24:45 oil ntpd[5952]: 203.176.128.10 interface 192.168.0.2 -> (none)
Oct 22 03:24:45 oil ntpd[5952]: peers refreshed
Oct 22 03:25:02 oil ntpd[5952]: Deleting interface #6 teredo, 2001:0:
Oct 22 03:25:02 oil kernel: [197600.300333] ntpd[5952]: segfault at 8 ip 00007fda05b58321 sp 00007fff380bd540 error 4 in ntpd[7fda05b3b0
Here is a gdb output:
(gdb) c
Continuing.
Program received signal SIGSEGV, Segmentation fault.
0x00007f743f09e321 in remove_interface (ep=0x7f74411771b0) at ntp_io.c:1098
1098 ntp_io.c: No such file or directory.
(gdb) bt
#0 0x00007f743f09e321 in remove_interface (ep=0x7f74411771b0) at ntp_io.c:1098
#1 update_interfaces (port=port@
data=
#2 0x00007f743f09fb34 in interface_update (receiver=
data=
#3 0x00007f743f0c1215 in timer () at ntp_timer.c:394
#4 0x00007f743f0a489b in ntpdmain (argc=<optimized out>, argv=<optimized out>)
at ntpd.c:1127
#5 0x00007f743f0954a9 in main (argc=<optimized out>, argv=<optimized out>)
at ntpd.c:358
(gdb)
I can only reproduce this with the teredo interface. If I disable it (by running "service miredo stop" before testing) I can not re-produce the problem any more.
ProblemType: Bug
DistroRelease: Ubuntu 12.10
Package: ntp 1:4.2.6.
ProcVersionSign
Uname: Linux 3.5.0-17-generic x86_64
ApportVersion: 2.6.1-0ubuntu4
Architecture: amd64
Date: Mon Oct 22 03:42:12 2012
InstallationMedia: Xubuntu 11.10 "Oneiric Ocelot" - Beta amd64 (20110920.2)
KernLog:
MarkForUpload: True
SourcePackage: ntp
UpgradeStatus: Upgraded to quantal on 2012-10-19 (2 days ago)
modified.
mtime.conffile.
Changed in ntp (Ubuntu): | |
importance: | Undecided → Medium |
Status changed to 'Confirmed' because the bug affects multiple users.