<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Priority</th>
<td>medium
</td>
</tr>
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - systemd-timesyncd segfaults when there's no network (systemd-216)"
href="https://bugs.freedesktop.org/show_bug.cgi?id=83091">83091</a>
</td>
</tr>
<tr>
<th>Assignee</th>
<td>systemd-bugs@lists.freedesktop.org
</td>
</tr>
<tr>
<th>Summary</th>
<td>systemd-timesyncd segfaults when there's no network (systemd-216)
</td>
</tr>
<tr>
<th>QA Contact</th>
<td>systemd-bugs@lists.freedesktop.org
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux (All)
</td>
</tr>
<tr>
<th>Reporter</th>
<td>dcoppa@gmail.com
</td>
</tr>
<tr>
<th>Hardware</th>
<td>x86-64 (AMD64)
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Component</th>
<td>general
</td>
</tr>
<tr>
<th>Product</th>
<td>systemd
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=105271" name="attach_105271" title="backtrace">attachment 105271</a> <a href="attachment.cgi?id=105271&action=edit" title="backtrace">[details]</a></span>
backtrace
Commit 874ff7bf4d6fe693542209f127d23cd89adc499b ("timesyncd: beef up NTP server
selection logic, and acquire NTP servers from DHCP") broke systemd-timesyncd
when the network is down:
# ip addr show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group
default
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: enp0s25: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state
DOWN group default qlen 1000
link/ether 00:21:cc:6b:39:02 brd ff:ff:ff:ff:ff:ff
3: wlp3s0: <BROADCAST,MULTICAST> mtu 1500 qdisc mq state DOWN group default
qlen 1000
link/ether 08:11:96:0b:b3:28 brd ff:ff:ff:ff:ff:ff
# ./systemd-timesyncd
Using NTP server 193.204.114.105:123 (193.204.114.105).
ASAN:SIGSEGV
=================================================================
==8866==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000010 (pc
0x7fa31ef1ab3d sp 0x7fff51686980 bp 0x7fff51686b90 T0)
#0 0x7fa31ef1ab3c in manager_connect src/timesync/timesyncd-manager.c:903
#1 0x7fa31ef315ed in manager_send_request.lto_priv.92
src/timesync/timesyncd-manager.c:203
#2 0x7fa31ef25e88 in manager_begin.lto_priv.90
src/timesync/timesyncd-manager.c:734
#3 0x7fa31ef1c32f in manager_resolve_handler
src/timesync/timesyncd-manager.c:818
#4 0x7fa31ef1da6b in res_query_done
src/libsystemd/sd-resolve/sd-resolve.c:1265
#5 0x7fa31ef1da6b in complete_query
src/libsystemd/sd-resolve/sd-resolve.c:768
#6 0x7fa31ef1e75a in handle_response
src/libsystemd/sd-resolve/sd-resolve.c:956
#7 0x7fa31ef1e75a in sd_resolve_process
src/libsystemd/sd-resolve/sd-resolve.c:990
#8 0x7fa31ef20950 in io_callback.lto_priv.96
src/libsystemd/sd-resolve/sd-resolve.c:1380
#9 0x7fa31ef154f9 in source_dispatch.lto_priv.60
src/libsystemd/sd-event/sd-event.c:2035
#10 0x7fa31ef2f44f in sd_event_run.constprop.32
src/libsystemd/sd-event/sd-event.c:2333
#11 0x7fa31ef0ef74 in sd_event_loop src/libsystemd/sd-event/sd-event.c:2352
#12 0x7fa31ef0ef74 in main src/timesync/timesyncd.c:143
#13 0x7fa31d132fff in __libc_start_main (/usr/lib/libc.so.6+0x1ffff)
#14 0x7fa31ef10ceb
(/home/dcoppa/Arch/hacking/systemd/src/systemd-216/systemd-timesyncd+0x13ceb)
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV src/timesync/timesyncd-manager.c:903
manager_connect
==8866==ABORTING
I've also attached gdb's backtrace.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the QA Contact for the bug.</li>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>