assertion failure dispatch.c:1239: REQUIRE(dispp != ((void *)0) && *dispp == ((void *)0)) failed
Summary
BIND hits an assertion failure after or while transfering the root zone to a mirror.
BIND version used
BIND 9.19.17 (Development Release) <id:464cf8c>
running on Linux x86_64 6.0.12-100.fc35.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 8 16:53:55 UTC 2022
built by make with '--enable-fixed-rrset' '--enable-dnstap' '--enable-querytrace=yes' '--with-openssl' '--with-libxml2' '--with-json-c' '--enable-full-report'
compiled by GCC 11.3.1 20220421 (Red Hat 11.3.1-3)
compiled with OpenSSL version: OpenSSL 1.1.1q FIPS 5 Jul 2022
linked to OpenSSL version: OpenSSL 1.1.1q FIPS 5 Jul 2022
compiled with libuv version: 1.44.2
linked to libuv version: 1.44.2
compiled with liburcu version: 0.13.0
compiled with jemalloc version: 5.2.1
compiled with libnghttp2 version: 1.45.1
linked to libnghttp2 version: 1.45.1
compiled with libxml2 version: 2.9.14
linked to libxml2 version: 20914
compiled with json-c version: 0.15
linked to json-c version: 0.15
compiled with zlib version: 1.2.11
linked to zlib version: 1.2.11
compiled with protobuf-c version: 1.4.0
linked to protobuf-c version: 1.4.0
threads support is enabled
DNSSEC algorithms: RSASHA1 NSEC3RSASHA1 RSASHA256 RSASHA512 ECDSAP256SHA256 ECDSAP384SHA384 ED25519 ED448
DS algorithms: SHA-1 SHA-256 SHA-384
HMAC algorithms: HMAC-MD5 HMAC-SHA1 HMAC-SHA224 HMAC-SHA256 HMAC-SHA384 HMAC-SHA512
TKEY mode 2 support (Diffie-Hellman): no
TKEY mode 3 support (GSS-API): yes
default paths:
named configuration: /usr/local/etc/named.conf
rndc configuration: /usr/local/etc/rndc.conf
nsupdate session key: /usr/local/var/run/named/session.key
named PID file: /usr/local/var/run/named/named.pid
named lock file: /usr/local/var/run/named/named.lock
Steps to reproduce
I haven't been able to reproduce this. It happened unexpectedly on a server with hardly any clients.
What is the current bug behavior?
BIND Terminates
What is the expected correct behavior?
BIND should not terminate, perhaps it should generate a warning messages.
Relevant configuration files
The configuration used:
acl "internal-acl" {
!10.0.0.1/32;
127.0.0.1/32;
10.0.0.0/24;
};
acl "internal_address_allow" {
10.0.0.1/32;
10.0.0.2/32;
10.0.0.3/32;
};
acl "internal_address_reject" {
!"internal_address_allow";
"any";
};
acl "hinternal-acl" {
!"internal_address_reject";
key "internal-key";
};
acl "ecternal_address_allow" {
10.0.0.1/32;
10.0.0.2/32;
10.0.0.3/32;
};
acl "external_address_reject" {
!"external_address_allow";
"any";
};
acl "external-acl" {
!"external_address_reject";
key "external-key";
};
controls {
inet 0.0.0.0 port 953 allow {
"any";
} keys {
"rndc-key";
};
};
logging {
channel "ch-debug" {
file "/home/named/log/debug.log";
severity dynamic;
print-time yes;
print-severity yes;
print-category yes;
};
channel "ch-client" {
file "/home/named/log/client.log";
print-time yes;
print-severity yes;
print-category yes;
};
channel "stale" {
file "/home/named/log/stale.log";
print-time yes;
print-severity yes;
print-category yes;
};
channel "ch-cname" {
file "/home/named/log/cname.log";
print-time yes;
print-severity yes;
print-category yes;
};
channel "ch-database" {
file "/home/named/log/database.log";
print-time yes;
print-severity yes;
print-category yes;
};
channel "ch-default" {
file "/home/named/log/default.log";
severity dynamic;
print-time yes;
print-severity yes;
print-category yes;
};
channel "ch-delegation-only" {
file "/home/named/log/delegation-only.log";
print-time yes;
print-severity yes;
print-category yes;
};
channel "ch-dispatch" {
file "/home/named/log/dispatch.log";
print-time yes;
print-severity yes;
print-category yes;
};
channel "ch-dnssec" {
file "/home/named/log/dnssec.log";
print-time yes;
print-severity yes;
print-category yes;
};
channel "ch-edns-disabled" {
file "/home/named/log/edns-disabled.log";
print-time yes;
print-severity yes;
print-category yes;
};
channel "ch-general" {
file "/home/named/log/general.log";
print-time yes;
print-severity yes;
print-category yes;
};
channel "ch-lame-servers" {
file "/home/named/log/lame-servers.log";
print-time yes;
print-severity yes;
print-category yes;
};
channel "ch-network" {
file "/home/named/log/network.log";
print-time yes;
print-severity yes;
print-category yes;
};
channel "ch-notify" {
file "/home/named/log/notify.log";
print-time yes;
print-severity yes;
print-category yes;
};
channel "ch-queries" {
file "/home/named/log/queries.log";
print-time yes;
print-severity yes;
print-category yes;
};
channel "ch-query-errors" {
file "/home/named/log/query-errors.log";
print-time yes;
print-severity yes;
print-category yes;
};
channel "ch-rate-limit" {
file "/home/named/log/rate-limit.log";
print-time yes;
print-severity yes;
print-category yes;
};
channel "ch-resolver" {
file "/home/named/log/resolver.log";
print-time yes;
print-severity yes;
print-category yes;
};
channel "ch-rpz" {
file "/home/named/log/rpz.log";
print-time yes;
print-severity yes;
print-category yes;
};
channel "ch-security" {
file "/home/named/log/security.log";
print-time yes;
print-severity yes;
print-category yes;
};
channel "ch-spill" {
file "/home/named/log/spill.log";
print-time yes;
print-severity yes;
print-category yes;
};
channel "ch-unmatched" {
file "/home/named/log/unmatched.log";
print-time yes;
print-severity yes;
print-category yes;
};
channel "ch-update" {
file "/home/named/log/update.log";
print-time yes;
print-severity yes;
print-category yes;
};
channel "ch-update-security" {
file "/home/named/log/update-security.log";
print-time yes;
print-severity yes;
print-category yes;
};
channel "ch-xfer-in" {
file "/home/named/log/xfer-in.log";
print-time yes;
print-severity yes;
print-category yes;
};
channel "ch-xfer-out" {
file "/home/named/log/xfer-out.log";
print-time yes;
print-severity yes;
print-category yes;
};
category "client" {
"ch-client";
"ch-debug";
};
category "serve-stale" {
"stale";
};
category "cname" {
"ch-cname";
"ch-debug";
};
category "database" {
"ch-database";
"ch-debug";
};
category "default" {
"ch-default";
"ch-debug";
};
category "dispatch" {
"ch-dispatch";
"ch-debug";
};
category "dnssec" {
"ch-dnssec";
"ch-debug";
};
category "edns-disabled" {
"ch-edns-disabled";
"ch-debug";
};
category "general" {
"ch-general";
"ch-debug";
};
category "lame-servers" {
"ch-lame-servers";
"ch-debug";
};
category "network" {
"ch-network";
"ch-debug";
};
category "notify" {
"ch-notify";
"ch-debug";
};
category "queries" {
"ch-queries";
"ch-debug";
};
category "query-errors" {
"ch-query-errors";
"ch-debug";
};
category "rate-limit" {
"ch-rate-limit";
"ch-debug";
};
category "resolver" {
"ch-resolver";
"ch-debug";
};
category "rpz" {
"ch-rpz";
"ch-debug";
};
category "security" {
"ch-security";
"ch-debug";
};
category "spill" {
"ch-spill";
"ch-debug";
};
category "unmatched" {
"ch-unmatched";
"ch-debug";
};
category "update" {
"ch-update";
"ch-debug";
};
category "update-security" {
"ch-update-security";
"ch-debug";
};
category "xfer-in" {
"ch-xfer-in";
"ch-debug";
};
category "xfer-out" {
"ch-xfer-out";
"ch-debug";
};
};
masters "mombassa" {
10.0.0.210 port 54;
};
options {
directory "/home/named";
listen-on port 53 {
"any";
};
memstatistics yes;
memstatistics-file "/home/named/named_mem_stats.txt";
notify-rate 1;
server-id "bialistock-53";
tcp-clients 35;
version "config-2020120201";
allow-new-zones yes;
deny-answer-aliases {
"home";
"local";
};
dnssec-validation auto;
edns-udp-size 4096;
empty-contact "peter.davies.ddi-consulting.com.";
empty-server "mombassa.home.";
empty-zones-enable yes;
lame-ttl 0;
minimal-responses no;
qname-minimization relaxed;
request-nsid yes;
require-server-cookie yes;
response-policy {
zone "badlist" add-soa yes log yes;
};
validate-except {
"na";
};
allow-query {
"any";
};
allow-transfer {
"any";
};
zone-statistics full;
};
statistics-channels {
inet 10.0.0.49 port 5353 allow {
"any";
};
inet 127.0.0.1 port 5353 allow {
127.0.0.1/32;
};
};
view "in" IN {
zone "badlist" {
type master;
check-names ignore;
file "badlist";
allow-query {
"any";
};
allow-transfer {
"any";
};
};
zone "badlist2" {
type master;
check-names ignore;
file "badlist2";
allow-query {
"any";
};
allow-transfer {
"any";
};
};
zone "." {
type mirror;
file "s/db.root";
masters {
199.9.14.201;
192.33.4.12;
199.7.91.13;
192.203.230.10;
192.5.5.241;
192.112.36.4;
198.97.190.53;
192.36.148.17;
192.58.128.30;
193.0.14.129;
199.7.83.42;
202.12.27.33;
};
allow-transfer {
"any";
};
};
zone "ddi.com" IN {
type master;
file "s/db.ddi.com";
allow-transfer {
"any";
};
};
zone "lan" IN {
type master;
file "s/db.lan";
allow-transfer {
"any";
};
};
zone "0.0.127.in-addr.arpa" in {
type master;
file "/home/named/m/db.127.0.0";
allow-transfer {
"any";
};
};
zone "0.0.10.in-addr.arpa" in {
type master;
file "/home/named/s/db.10.0.0";
};
zone "1.0.10.in-addr.arpa" in {
type master;
file "/home/named/m/db.10.0.1";
allow-transfer {
"any";
};
allow-update {
"any";
};
};
allow-recursion {
"any";
};
};
view "override_bind" chaos {
zone "version.bind" chaos {
type master;
database "_builtin version";
};
zone "hostname.bind" chaos {
type master;
database "_builtin hostname";
};
zone "authors.bind" chaos {
type master;
database "_builtin authors";
};
zone "id.server" chaos {
type master;
database "_builtin id";
};
allow-new-zones no;
recursion no;
notify no;
};
key "rndc-key" {
algorithm "hmac-md5";
secret "????????????????????????";
};
key "capaz-linux." {
algorithm "hmac-sha256";
secret "????????????????????????????????????????????";
};
key "linux-capaz." {
algorithm "hmac-sha256";
secret "????????????????????????????????????????????";
};
key "internal-key" {
algorithm "hmac-sha256";
secret "????????????????????????????????????????????";
};
key "external-key" {
algorithm "hmac-sha256";
secret "????????????????????????????????????????????";
};
key "localhost." {
algorithm "hmac-sha256";
secret "????????????????????????????????????????????";
};
server 10.0.0.210/32 {
keys "linux-capaz";
};
server ::/0 {
bogus yes;
};
Relevant logs and/or screenshots
Core file and named log file attached
Here's the output for Thread 1 from gdb:
Thread 1 (Thread 0x7f51a427f600 (LWP 78663)):
#0 __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44
#1 0x00007f51a56a15d3 in __pthread_kill_internal (signo=6, threadid=<optimized out>) at pthread_kill.c:78
#2 0x00007f51a5654d76 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#3 0x00007f51a56287f3 in __GI_abort () at abort.c:79
#4 0x000000000041795a in assertion_failed (file=0x7f51a6196ad0 "dispatch.c", line=1239, type=isc_assertiontype_require, cond=0x7f51a61976f0 "dispp != ((void *)0) && *dispp == ((void *)0)") at main.c:234
#5 0x00007f51a625848a in isc_assertion_failed (file=file@entry=0x7f51a6196ad0 "dispatch.c", line=line@entry=1239, type=type@entry=isc_assertiontype_require, cond=cond@entry=0x7f51a61976f0 "dispp != ((void *)0) && *dispp == ((void *)0)") at assertions.c:48
#6 0x00007f51a6053ae5 in dns_dispatch_gettcp (mgr=0x7f51a4c6d1e0, destaddr=0x7f51a0216a88, localaddr=<optimized out>, dispp=0x7f51a0216bb8) at dispatch.c:1239
#7 0x00007f51a6147113 in xfrin_start (xfr=<optimized out>) at xfrin.c:946
#8 0x00007f51a6147709 in xfrin_recv_done (result=DNS_R_NOTIMP, region=<optimized out>, arg=<optimized out>) at xfrin.c:1462
#9 0x00007f51a6051fe3 in tcp_recv_processall (resps=resps@entry=0x7f51a4279b60, region=region@entry=0x7f51a4279d70) at dispatch.c:781
#10 0x00007f51a6053df8 in tcp_recv (handle=<optimized out>, result=<optimized out>, region=0x7f51a4279d70, arg=<optimized out>) at dispatch.c:924
#11 0x00007f51a624d0f5 in streamdns_on_complete_dnsmessage (transphandle=0x7f5187dd4500, sock=0x7f51a0a0c000, region=0x7f51a4279d70, dnsasm=<optimized out>) at netmgr/streamdns.c:160
#12 streamdns_on_dnsmessage_data_cb (dnsasm=<optimized out>, result=<optimized out>, region=0x7f51a4279d70, cbarg=0x7f51a0a0c000, userarg=0x7f5187dd4500) at netmgr/streamdns.c:206
#13 0x00007f51a624c5fa in isc__dnsstream_assembler_callcb (userarg=<optimized out>, region=0x7f51a4279d70, result=ISC_R_SUCCESS, dnsasm=0x7f5187e92180) at ./include/isc/dnsstream.h:306
#14 isc__dnsstream_assembler_handle_message (dnsasm=0x7f5187e92180, userarg=<optimized out>) at ./include/isc/dnsstream.h:353
#15 0x00007f51a624d3d2 in isc__dnsstream_assembler_processing (userarg=0x7f5187dd4500, dnsasm=<optimized out>) at ./include/isc/dnsstream.h:370
#16 isc__dnsstream_assembler_incoming_direct (buf_size=123, buf=0x7f51a4580a00, userarg=0x7f5187dd4500, dnsasm=<optimized out>) at ./include/isc/dnsstream.h:396
#17 isc_dnsstream_assembler_incoming (buf_size=123, buf=0x7f51a4580a00, userarg=0x7f5187dd4500, dnsasm=<optimized out>) at ./include/isc/dnsstream.h:508
#18 streamdns_handle_incoming_data (sock=0x7f51a0a0c000, transphandle=0x7f5187dd4500, data=0x7f51a4580a00, len=123) at netmgr/streamdns.c:242
#19 0x00007f51a624aabd in isc___nm_readcb (arg=<optimized out>) at netmgr/netmgr.c:1783
#20 isc__nm_readcb (sock=sock@entry=0x7f51a0216000, uvreq=<optimized out>, eresult=eresult@entry=ISC_R_SUCCESS, async=async@entry=false) at netmgr/netmgr.c:1798
#21 0x00007f51a6251674 in isc__nm_tcp_read_cb (stream=<optimized out>, nread=123, buf=0x7f51a4279ed0) at netmgr/tcp.c:770
#22 0x00007f51a5ea1c59 in uv__read (stream=stream@entry=0x7f51a02165c8) at src/unix/stream.c:1201
#23 0x00007f51a5ea2018 in uv__stream_io (loop=<optimized out>, w=0x7f51a0216650, events=1) at src/unix/stream.c:1270
#24 0x00007f51a5ea6aae in uv__io_poll (loop=0x7f51a4c8d0a0, timeout=<optimized out>) at src/unix/epoll.c:374
#25 0x00007f51a5e90650 in uv__io_poll (timeout=<optimized out>, loop=0x7f51a4c8d0a0) at src/unix/udp.c:122
#26 uv_run (loop=loop@entry=0x7f51a4c8d0a0, mode=mode@entry=UV_RUN_DEFAULT) at src/unix/core.c:406
#27 0x00007f51a626a3fc in loop_thread (arg=arg@entry=0x7f51a4c8d080) at loop.c:282
#28 0x00007f51a6278d2a in thread_body (wrap=0xd8b630) at thread.c:85
#29 thread_run (wrap=0xd8b630) at thread.c:100
#30 0x00007f51a569f822 in start_thread (arg=<optimized out>) at pthread_create.c:443
#31 0x00007f51a563f450 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
Possible fixes
This server has no usable IPv6 address at the this time