map file format incompatibility causes crash (v9.16.19 -> v9.16.20)
Summary
After update from 9.16.19 to 9.16.20 named service crashes on (re)start
lib/isc/rwlock.c:451: REQUIRE((__builtin_expect(!!((rwl) != ((void *)0)), 1) && __builtin_expect(!!(((const isc__magic_t *)(rwl))->magic == ((('R') << 24 | ('W') << 16 | ('L') << 8 | ('k')))), 1))) failed
Seems to be related to slave download of root-servers.net, when it uses masterfile-format map;
BIND version used
BIND 9.16.20-RH (Extended Support Version) <id:26db37f>
running on Linux x86_64 5.13.4-200.fc34.x86_64 #1 SMP Tue Jul 20 20:27:29 UTC 2021
built by make with '--build=x86_64-redhat-linux-gnu' '--host=x86_64-redhat-linux-gnu' '--program-prefix=' '--disable-dependency-tracking' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib64' '--libexecdir=/usr/libexec' '--sharedstatedir=/var/lib' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--with-python=/usr/bin/python3' '--with-libtool' '--localstatedir=/var' '--with-pic' '--disable-static' '--includedir=/usr/include/bind9' '--with-tuning=large' '--with-libidn2' '--with-maxminddb' '--enable-native-pkcs11' '--with-pkcs11=/usr/lib64/pkcs11/libsofthsm2.so' '--with-dlopen=yes' '--with-gssapi=yes' '--with-lmdb=yes' '--without-libjson' '--with-json-c' '--enable-dnstap' '--enable-fixed-rrset' '--enable-full-report' 'build_alias=x86_64-redhat-linux-gnu' 'host_alias=x86_64-redhat-linux-gnu' 'CC=gcc' 'CFLAGS= -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection' 'LDFLAGS=-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld ' 'LT_SYS_LIBRARY_PATH=/usr/lib64:' 'PKG_CONFIG_PATH=:/usr/lib64/pkgconfig:/usr/share/pkgconfig'
compiled by GCC 11.2.1 20210728 (Red Hat 11.2.1-1)
compiled with OpenSSL version: OpenSSL 1.1.1k FIPS 25 Mar 2021
linked to OpenSSL version: OpenSSL 1.1.1k FIPS 25 Mar 2021
compiled with libuv version: 1.41.0
linked to libuv version: 1.41.0
compiled with libxml2 version: 2.9.12
linked to libxml2 version: 20912
compiled with json-c version: 0.14
linked to json-c version: 0.14
compiled with zlib version: 1.2.11
linked to zlib version: 1.2.11
linked to maxminddb version: 1.5.2
compiled with protobuf-c version: 1.3.3
linked to protobuf-c version: 1.3.3
threads support is enabled
default paths:
named configuration: /etc/named.conf
rndc configuration: /etc/rndc.conf
DNSSEC root key: /etc/bind.keys
nsupdate session key: /var/run/named/session.key
named PID file: /var/run/named/named.pid
named lock file: /var/run/named/named.lock
geoip-directory: /usr/share/GeoIP
Steps to reproduce
- systemctl restart named
What is the current bug behavior?
srp 19 13:43:03 menpad named[1307081]: starting BIND 9.16.20-RH (Extended Support Version) <id:26db37f>
srp 19 13:43:03 menpad named[1307081]: running on Linux x86_64 5.13.4-200.fc34.x86_64 #1 SMP Tue Jul 20 20:27:29 UTC 20>
srp 19 13:43:03 menpad named[1307081]: built with '--build=x86_64-redhat-linux-gnu' '--host=x86_64-redhat-linux-gnu' '->
srp 19 13:43:03 menpad named[1307081]: running as: named -u named -c /etc/named.conf
srp 19 13:43:03 menpad named[1307081]: compiled by GCC 11.2.1 20210728 (Red Hat 11.2.1-1)
srp 19 13:43:03 menpad named[1307081]: compiled with OpenSSL version: OpenSSL 1.1.1k FIPS 25 Mar 2021
srp 19 13:43:03 menpad named[1307081]: linked to OpenSSL version: OpenSSL 1.1.1k FIPS 25 Mar 2021
srp 19 13:43:03 menpad named[1307081]: compiled with libxml2 version: 2.9.12
srp 19 13:43:03 menpad named[1307081]: linked to libxml2 version: 20912
srp 19 13:43:03 menpad named[1307081]: compiled with json-c version: 0.14
srp 19 13:43:03 menpad named[1307081]: linked to json-c version: 0.14
srp 19 13:43:03 menpad named[1307081]: compiled with zlib version: 1.2.11
srp 19 13:43:03 menpad named[1307081]: linked to zlib version: 1.2.11
srp 19 13:43:03 menpad named[1307081]: ----------------------------------------------------
srp 19 13:43:03 menpad named[1307081]: BIND 9 is maintained by Internet Systems Consortium,
srp 19 13:43:03 menpad named[1307081]: Inc. (ISC), a non-profit 501(c)(3) public-benefit
srp 19 13:43:03 menpad named[1307081]: corporation. Support and training for BIND 9 are
srp 19 13:43:03 menpad named[1307081]: available at https://www.isc.org/support
srp 19 13:43:03 menpad named[1307081]: ----------------------------------------------------
srp 19 13:43:03 menpad named[1307081]: adjusted limit on open files from 1073741816 to 1048576
srp 19 13:43:03 menpad named[1307081]: found 4 CPUs, using 4 worker threads
srp 19 13:43:03 menpad named[1307081]: using 4 UDP listeners per interface
srp 19 13:43:03 menpad named[1307081]: using up to 21000 sockets
srp 19 13:43:03 menpad named[1307081]: loading configuration from '/etc/named.conf'
srp 19 13:43:03 menpad named[1307081]: reading built-in trust anchors from file '/etc/named.root.key'
srp 19 13:43:03 menpad named[1307081]: looking for GeoIP2 databases in '/usr/share/GeoIP'
srp 19 13:43:03 menpad named[1307081]: opened GeoIP2 database '/usr/share/GeoIP/GeoLite2-Country.mmdb'
srp 19 13:43:03 menpad named[1307081]: opened GeoIP2 database '/usr/share/GeoIP/GeoLite2-City.mmdb'
srp 19 13:43:03 menpad named[1307081]: opened GeoIP2 database '/usr/share/GeoIP/GeoLite2-ASN.mmdb'
srp 19 13:43:03 menpad named[1307081]: statistics channel listening on 127.0.0.1#80
srp 19 13:43:03 menpad named[1307081]: using default UDP/IPv4 port range: [32768, 60999]
srp 19 13:43:03 menpad named[1307081]: using default UDP/IPv6 port range: [32768, 60999]
srp 19 13:43:03 menpad named[1307081]: listening on IPv4 interface lo, 127.0.0.1#8053
srp 19 13:43:03 menpad named[1307081]: listening on IPv4 interface virbr0, 192.168.122.1#8053
srp 19 13:43:03 menpad named[1307081]: listening on IPv4 interface virbr0, 192.168.122.2#53
srp 19 13:43:03 menpad named[1307081]: listening on IPv6 interface lo, ::1#53
srp 19 13:43:03 menpad named[1307081]: generating session key for dynamic DNS
srp 19 13:43:03 menpad named[1307081]: Migrating zones from NZF file '3e8286044388886e.nzf' to NZD database 'v6.nzd'
srp 19 13:43:03 menpad named[1307081]: loading NZD zone count from 'libvirt.nzd' for view 'libvirt'
srp 19 13:43:03 menpad named[1307081]: NZD database 'libvirt.nzd' contains 0 zones
srp 19 13:43:03 menpad named[1307081]: loading NZD zone count from 'default.nzd' for view 'default'
srp 19 13:43:03 menpad named[1307081]: NZD database 'default.nzd' contains 0 zones
srp 19 13:43:03 menpad named[1307081]: sizing zone task pool based on 80 zones
srp 19 13:43:03 menpad named[1307081]: zone 'example.com.' allows unsigned updates from remote hosts, which is insecure
srp 19 13:43:03 menpad named[1307081]: loading NZD configs from 'v6.nzd' for view 'v6'
srp 19 13:43:03 menpad named[1307081]: none:102: 'max-cache-size 90%' - setting to 17465MB (out of 19406MB)
srp 19 13:43:03 menpad named[1307081]: set up managed keys zone for view v6, file '/var/named/dynamic/v6.mkeys'
srp 19 13:43:03 menpad named[1307081]: automatic empty zone: view v6: 16.172.IN-ADDR.ARPA
...
srp 19 13:43:04 menpad named[1307081]: zone cname/IN/v6: loaded serial 0
srp 19 13:43:04 menpad named[1307081]: ../../../lib/isc/rwlock.c:451: REQUIRE((__builtin_expect(!!((rwl) != ((void *)0)>
srp 19 13:43:04 menpad named[1307081]: #0 0x56251f0e3701 in ??
srp 19 13:43:04 menpad named[1307081]: #1 0x7f352cb973c0 in ??
srp 19 13:43:04 menpad named[1307081]: #2 0x7f352cbc172a in ??
srp 19 13:43:04 menpad named[1307081]: #3 0x7f352cbc184d in ??
srp 19 13:43:04 menpad named[1307081]: #4 0x7f352cd27774 in ??
srp 19 13:43:04 menpad named[1307081]: #5 0x7f352cd2546e in ??
srp 19 13:43:04 menpad named[1307081]: #6 0x7f352cd31130 in ??
srp 19 13:43:04 menpad named[1307081]: #7 0x7f352cdbc40f in ??
srp 19 13:43:04 menpad named[1307081]: #8 0x7f352cdbc5d5 in ??
srp 19 13:43:04 menpad named[1307081]: #9 0x7f352cbd1e9d in ??
srp 19 13:43:04 menpad named[1307081]: #10 0x7f352cbbd229 in ??
srp 19 13:43:04 menpad named[1307081]: #11 0x7f352cbbd3a5 in ??
srp 19 13:43:04 menpad named[1307081]: #12 0x7f352cbbdb97 in ??
srp 19 13:43:04 menpad named[1307081]: #13 0x7f352c95891d in ??
srp 19 13:43:04 menpad named[1307081]: #14 0x7f352c971ced in ??
srp 19 13:43:04 menpad named[1307081]: #15 0x7f352c9618e4 in ??
srp 19 13:43:04 menpad named[1307081]: #16 0x7f352cbbd45b in ??
srp 19 13:43:04 menpad named[1307081]: #17 0x7f352cbcfb23 in ??
srp 19 13:43:04 menpad named[1307081]: #18 0x7f352c63e299 in ??
srp 19 13:43:04 menpad named[1307081]: #19 0x7f352c564353 in ??
srp 19 13:43:04 menpad named[1307081]: exiting (due to assertion failure)
srp 19 13:43:05 menpad systemd[1]: named.service: Control process exited, code=exited, status=1/FAILURE
What is the expected correct behavior?
Should just start as usual
Relevant configuration files
(Paste any relevant configuration files - please use code blocks (```)
to format console output. If submitting the contents of your
configuration file in a non-confidential Issue, it is advisable to
obscure key secrets: this can be done automatically by using
named-checkconf -px
.)
Relevant logs and/or screenshots
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:49
#1 0x00007f352c48a8a4 in __GI_abort () at abort.c:79
#2 0x000056251f0e0695 in assertion_failed (file=<optimized out>, line=<optimized out>, type=<optimized out>,
cond=<optimized out>) at ../../../bin/named/main.c:270
#3 0x00007f352cb973c0 in isc_assertion_failed (file=<optimized out>, line=<optimized out>, type=<optimized out>,
cond=<optimized out>) at ../../../lib/isc/assertions.c:46
#4 0x00007f352cbc172a in isc_rwlock_trylock (rwl=rwl@entry=0x7f35100037c0, type=type@entry=isc_rwlocktype_read)
at ../../../lib/isc/rwlock.c:451
#5 0x00007f352cbc184d in isc_rwlock_lock (rwl=0x7f35100037c0, type=type@entry=isc_rwlocktype_read)
at ../../../lib/isc/rwlock.c:440
#6 0x00007f352cd27774 in zone_findrdataset (db=0x7f35255e7600, node=0x7f352cee8818, version=<optimized out>,
type=<optimized out>, covers=<optimized out>, now=0, rdataset=0x7f352a3d42e0, sigrdataset=0x0)
at ../../../lib/dns/rbtdb.c:5754
#7 0x00007f352cd2546e in iszonesecure (db=0x7f35255e7600, version=0x7f35255e9640, origin=0x7f352cee8818)
at ../../../lib/dns/rbtdb.c:2334
#8 0x00007f352cd31130 in endload (db=0x7f35255e7600, callbacks=0x7f352a3d4420) at ../../../lib/dns/rbtdb.c:7754
#9 0x00007f352cdbc40f in zone_startload (loadtime=..., zone=0x7f35206487a0, db=0x7f35255e7600)
at ../../../lib/dns/zone.c:2727
#10 zone_load (zone=0x7f35206487a0, flags=0, locked=locked@entry=true) at ../../../lib/dns/zone.c:2285
#11 0x00007f352cdbc5d5 in zone_asyncload (task=0x7f35269deb50, event=<optimized out>) at ../../../lib/dns/zone.c:2346
#12 0x00007f352cbd1e9d in task_run (task=0x7f35269deb50) at ../../../lib/isc/task.c:857
#13 isc_task_run (task=0x7f35269deb50) at ../../../lib/isc/task.c:950
#14 0x00007f352cbbd229 in isc__nm_async_task (worker=0x56251fbf1d20, ev0=0x7f35269e7a38)
at netmgr/../../../../lib/isc/netmgr/netmgr.c:873
#15 process_netievent (worker=worker@entry=0x56251fbf1d20, ievent=0x7f35269e7a38)
at netmgr/../../../../lib/isc/netmgr/netmgr.c:958
#16 0x00007f352cbbd3a5 in process_queue (worker=worker@entry=0x56251fbf1d20, type=type@entry=NETIEVENT_TASK)
at netmgr/../../../../lib/isc/netmgr/netmgr.c:1027
#17 0x00007f352cbbdb97 in process_all_queues (worker=0x56251fbf1d20) at netmgr/../../../../lib/isc/netmgr/netmgr.c:798
#18 async_cb (handle=0x56251fbf2080) at netmgr/../../../../lib/isc/netmgr/netmgr.c:827
#19 0x00007f352c95891d in uv__async_io (loop=0x56251fbf1d30, w=<optimized out>, events=<optimized out>)
at src/unix/async.c:163
#20 0x00007f352c971ced in uv__io_poll (loop=0x56251fbf1d30, timeout=<optimized out>) at src/unix/linux-core.c:462
#21 0x00007f352c9618e4 in uv_run (loop=loop@entry=0x56251fbf1d30, mode=mode@entry=UV_RUN_DEFAULT)
at src/unix/core.c:385
#22 0x00007f352cbbd45b in nm_thread (worker0=0x56251fbf1d20) at netmgr/../../../../lib/isc/netmgr/netmgr.c:733
#23 0x00007f352cbcfb23 in isc__trampoline_run (arg=0x56251fbdf750) at ../../../lib/isc/trampoline.c:191
#24 0x00007f352c63e299 in start_thread (arg=0x7f352a3d8640) at pthread_create.c:481
--Type <RET> for more, q to quit, c to continue without paging--
#25 0x00007f352c564353 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
Possible fixes
Not yet known
Edited by Petr Špaček