unbound icon indicating copy to clipboard operation
unbound copied to clipboard

Unbound 1.20 crashes in less than one hour, in libevent

Open bortzmeyer opened this issue 3 months ago • 4 comments

Describe the bug

I upgraded to Unbound 1.20 (a small resolver). After that, it crashes in less than one hour.

To reproduce Steps to reproduce the behavior:

  1. Run unbound
  2. Wait

Expected behavior No crash

System:

  • Unbound version: 1.20.0
  • OS: ArchLinux, upgraded today, Linux kernel 6.8.9
  • unbound -V output:
Version 1.20.0

Configure line: --prefix=/usr --sysconfdir=/etc --localstatedir=/var --sbindir=/usr/bin --disable-rpath --enable-dnscrypt --enable-dnstap --enable-pie --enable-relro-now --enable-subnet --enable-systemd --enable-tfo-client --enable-tfo-server --enable-cachedb --with-libhiredis --with-conf-file=/etc/unbound/unbound.conf --with-pidfile=/run/unbound.pid --with-rootkey-file=/etc/trusted-key.key --with-libevent --with-libnghttp2 --with-pyunbound
Linked libs: libevent 2.1.12-stable (it uses epoll), OpenSSL 3.3.0 9 Apr 2024
Linked modules: dns64 cachedb subnetcache respip validator iterator
DNSCrypt feature available
TCP Fastopen feature available

BSD licensed, see LICENSE in source package for details.
Report bugs to [email protected] or https://github.com/NLnetLabs/unbound/issues

Additional information

Downgrading to 1.19.3 apparently solved the problem. I also tried a 1.20 without --with-libevent but it also crashed.

A core dump is produced:

% gdb /usr/sbin/unbound.ORIG unbound-core
GNU gdb (GDB) 14.2
Copyright (C) 2023 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/sbin/unbound.ORIG...

This GDB supports auto-downloading debuginfo from the following URLs:
  <https://debuginfod.archlinux.org>
Enable debuginfod for this session? (y or [n]) 
Debuginfod has been disabled.
To make this setting permanent, add 'set debuginfod enabled off' to .gdbinit.
(No debugging symbols found in /usr/sbin/unbound.ORIG)
[New LWP 35395]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
Core was generated by `/usr/bin/unbound -d -p'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00007404a8942976 in ?? () from /usr/lib/libevent-2.1.so.7
(gdb) where
#0  0x00007404a8942976 in ?? () from /usr/lib/libevent-2.1.so.7
#1  0x00007404a894a344 in event_base_loop () from /usr/lib/libevent-2.1.so.7
#2  0x0000597888a39a06 in ?? ()
#3  0x0000597888967dd2 in ?? ()
#4  0x000059788897eb8e in ?? ()
#5  0x00005978889602ea in ?? ()
#6  0x00007404a8039c88 in ?? () from /usr/lib/libc.so.6
#7  0x00007404a8039d4c in __libc_start_main () from /usr/lib/libc.so.6
#8  0x0000597888960375 in ?? ()
(gdb) quit

bortzmeyer avatar May 15 '24 18:05 bortzmeyer