Bug 4230 - unbound segfault during network outage
unbound segfault during network outage
Status: ASSIGNED
Product: unbound
Classification: Unclassified
Component: server
1.9.0
x86_64 Linux
: P5 normal
Assigned To: unbound team
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2019-02-27 09:29 CET by Daniel Kenzelmann
Modified: 2019-02-27 11:38 CET (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Kenzelmann 2019-02-27 09:29:34 CET
It seems that during the night the connectivitiy was somewhat unavailable, when looking at the server in the morning I noticed that unbound was not running.
In the logs I only saw the following lines:

2019-02-27T04:10:30+01:00 router unbound[2600]: [2600:0] notice: sendto failed: Invalid argument
2019-02-27T04:10:30+01:00 router unbound[2600]: [2600:0] notice: remote address is local 
2019-02-27T04:10:30+01:00 router kernel: unbound[2600]: segfault at 100810a ip 00005599371db7f9 sp 00007ffde48c2a60 error 4 in unbound[55993716b000+c4000]


Any idea what could have caused the issue?


Config file is:
server:
	verbosity: 1
	access-control: 127.0.0.0/8 allow_snoop
	access-control: ::1 allow_snoop
	private-address: 192.168.0.0/16
	private-domain: fritz.box
	auto-trust-anchor-file: "var/root-anchors.txt"
	trust-anchor-signaling: yes
	local-zone: "178.168.192.in-addr.arpa." transparent
	
python:
remote-control:
forward-zone:
	name: "fritz.box."
	forward-addr: 192.168.178.1
forward-zone:
	name: "178.168.192.in-addr.arpa."
	forward-addr: 192.168.178.1
auth-zone:
	name: "."
	fallback-enabled: yes
	for-downstream: no
	for-upstream: yes
	zonefile: "var/root.zone"
	master: "lax.xfr.dns.icann.org"
	master: "iad.xfr.dns.icann.org"
auth-zone:
	name: "in-addr.arpa"
	fallback-enabled: yes
	for-downstream: no
	for-upstream: yes
	zonefile: "var/in-addr.arpa.zone"
	master: "lax.xfr.dns.icann.org"
	master: "iad.xfr.dns.icann.org"
auth-zone:
	name: "arpa"
	fallback-enabled: yes
	for-downstream: no
	for-upstream: yes
	zonefile: "var/arpa.zone"
	master: "lax.xfr.dns.icann.org"
	master: "iad.xfr.dns.icann.org"
auth-zone:
	name: "root-servers.net"
	fallback-enabled: yes
	for-downstream: no
	for-upstream: yes
	zonefile: "var/root-servers.net.zone"
	master: "lax.xfr.dns.icann.org"
	master: "iad.xfr.dns.icann.org"
auth-zone:
	name: "ipv4only.arpa"
	fallback-enabled: yes
	for-downstream: no
	for-upstream: yes
	zonefile: "var/ipv4only.arpa.zone"
	master: "lax.xfr.dns.icann.org"
	master: "iad.xfr.dns.icann.org"
auth-zone:
	name: "ip6.arpa"
	fallback-enabled: yes
	for-downstream: no
	for-upstream: yes
	zonefile: "var/ip6.arpa.zone"
	master: "lax.xfr.dns.icann.org"
	master: "iad.xfr.dns.icann.org"
auth-zone:
	name: "ip6-servers.arpa"
	fallback-enabled: yes
	for-downstream: no
	for-upstream: yes
	zonefile: "var/ip6-servers.arpa.zone"
	master: "lax.xfr.dns.icann.org"
	master: "iad.xfr.dns.icann.org"
auth-zone:
	name: "mcast.net"
	fallback-enabled: yes
	for-downstream: no
	for-upstream: yes
	zonefile: "var/mcast.net.zone"
	master: "lax.xfr.dns.icann.org"
	master: "iad.xfr.dns.icann.org"
auth-zone:
	name: "224.in-addr.arpa"
	fallback-enabled: yes
	for-downstream: no
	for-upstream: yes
	zonefile: "var/224.in-addr.arpa.zone"
	master: "lax.xfr.dns.icann.org"
	master: "iad.xfr.dns.icann.org"
auth-zone:
	name: "225.in-addr.arpa"
	fallback-enabled: yes
	for-downstream: no
	for-upstream: yes
	zonefile: "var/225.in-addr.arpa.zone"
	master: "lax.xfr.dns.icann.org"
	master: "iad.xfr.dns.icann.org"
auth-zone:
	name: "226.in-addr.arpa"
	fallback-enabled: yes
	for-downstream: no
	for-upstream: yes
	zonefile: "var/226.in-addr.arpa.zone"
	master: "lax.xfr.dns.icann.org"
	master: "iad.xfr.dns.icann.org"
auth-zone:
	name: "227.in-addr.arpa"
	fallback-enabled: yes
	for-downstream: no
	for-upstream: yes
	zonefile: "var/227.in-addr.arpa.zone"
	master: "lax.xfr.dns.icann.org"
	master: "iad.xfr.dns.icann.org"
auth-zone:
	name: "228.in-addr.arpa"
	fallback-enabled: yes
	for-downstream: no
	for-upstream: yes
	zonefile: "var/228.in-addr.arpa.zone"
	master: "lax.xfr.dns.icann.org"
	master: "iad.xfr.dns.icann.org"
auth-zone:
	name: "229.in-addr.arpa"
	fallback-enabled: yes
	for-downstream: no
	for-upstream: yes
	zonefile: "var/229.in-addr.arpa.zone"
	master: "lax.xfr.dns.icann.org"
	master: "iad.xfr.dns.icann.org"
auth-zone:
	name: "230.in-addr.arpa"
	fallback-enabled: yes
	for-downstream: no
	for-upstream: yes
	zonefile: "var/230.in-addr.arpa.zone"
	master: "lax.xfr.dns.icann.org"
	master: "iad.xfr.dns.icann.org"
auth-zone:
	name: "231.in-addr.arpa"
	fallback-enabled: yes
	for-downstream: no
	for-upstream: yes
	zonefile: "var/231.in-addr.arpa.zone"
	master: "lax.xfr.dns.icann.org"
	master: "iad.xfr.dns.icann.org"
auth-zone:
	name: "232.in-addr.arpa"
	fallback-enabled: yes
	for-downstream: no
	for-upstream: yes
	zonefile: "var/232.in-addr.arpa.zone"
	master: "lax.xfr.dns.icann.org"
	master: "iad.xfr.dns.icann.org"
auth-zone:
	name: "233.in-addr.arpa"
	fallback-enabled: yes
	for-downstream: no
	for-upstream: yes
	zonefile: "var/233.in-addr.arpa.zone"
	master: "lax.xfr.dns.icann.org"
	master: "iad.xfr.dns.icann.org"
auth-zone:
	name: "234.in-addr.arpa"
	fallback-enabled: yes
	for-downstream: no
	for-upstream: yes
	zonefile: "var/234.in-addr.arpa.zone"
	master: "lax.xfr.dns.icann.org"
	master: "iad.xfr.dns.icann.org"
auth-zone:
	name: "235.in-addr.arpa"
	fallback-enabled: yes
	for-downstream: no
	for-upstream: yes
	zonefile: "var/235.in-addr.arpa.zone"
	master: "lax.xfr.dns.icann.org"
	master: "iad.xfr.dns.icann.org"
auth-zone:
	name: "236.in-addr.arpa"
	fallback-enabled: yes
	for-downstream: no
	for-upstream: yes
	zonefile: "var/236.in-addr.arpa.zone"
	master: "lax.xfr.dns.icann.org"
	master: "iad.xfr.dns.icann.org"
auth-zone:
	name: "237.in-addr.arpa"
	fallback-enabled: yes
	for-downstream: no
	for-upstream: yes
	zonefile: "var/237.in-addr.arpa.zone"
	master: "lax.xfr.dns.icann.org"
	master: "iad.xfr.dns.icann.org"
auth-zone:
	name: "238.in-addr.arpa"
	fallback-enabled: yes
	for-downstream: no
	for-upstream: yes
	zonefile: "var/238.in-addr.arpa.zone"
	master: "lax.xfr.dns.icann.org"
	master: "iad.xfr.dns.icann.org"
auth-zone:
	name: "239.in-addr.arpa"
	fallback-enabled: yes
	for-downstream: no
	for-upstream: yes
	zonefile: "var/239.in-addr.arpa.zone"
	master: "lax.xfr.dns.icann.org"
	master: "iad.xfr.dns.icann.org"
Comment 1 Wouter Wijngaards 2019-02-27 09:44:29 CET
Hi Daniel,

Looks like the argument to sendto was not an IP address but a local-socket.  That looks like some sort of bug, like use of uninitialised memory for the destination.  My guess would be the auth-zones in the config.

It is possible to translate the error to a function name and line number, but it needs to be done on the machine (that compiles it and runs it).  addr2line -e /usr/sbin/unbound 00005599371db7f9

Can you do that and say what function caused the failure?  That may not always help, it is not really a stack trace, like gdb would give.  Or that might be there in the coredump list or the bug helper (if you have one).

Best regards, Wouter
Comment 2 Daniel Kenzelmann 2019-02-27 09:50:13 CET
Doesn't seem to return a lot ...

# addr2line -e /usr/sbin/unbound 00005599371db7f9
??:0


Some additional output in dmesg for the event:
[231820.515219] unbound[2600]: segfault at 100810a ip 00005599371db7f9 sp 00007ffde48c2a60 error 4 in unbound[55993716b000+c4000]
[231820.515250] Code: db 0f 84 7a 01 00 00 8b 6b 20 85 ed 0f 85 85 01 00 00 8b 53 18 85 d2 0f 85 35 01 00 00 48 8b 70 40 48 85 f6 0f 84 bf 01 00 00 <8b> 96 88 00 00 00 48 8d 44 24 40 48 83 c6 08 b9 80 00 00 00 48 89
Comment 3 Wouter Wijngaards 2019-02-27 10:06:35 CET
Hi Daniel,

Perhaps you need to install the debug symbols for unbound to see the backtrace and addr2line for it.

On fedora that is with the abrt tool (it also analyzes the coredumps), or with dnf debuginfo-install <pkg>

Best regards, Wouter
Comment 4 Daniel Kenzelmann 2019-02-27 11:38:31 CET
Unfortunately this is on Gentoo and no debugging symbols included.
I'm now building it again with debugsyms, so should it happen again I might be able to provide more information..

Thanks, Daniel