Bind9 going down with error rbtdb->next_serial
Summary
I have some instances bind9, and some of them going down with error
Nov 04 02:30:46 vm-name named[10257]: 04-Nov-2021 02:30:46.319 general: critical: ../../../lib/dns/rbtdb.c:1497: fatal error:
Nov 04 02:30:46 vm-name named[10257]: 04-Nov-2021 02:30:46.319 general: critical: RUNTIME_CHECK(rbtdb->next_serial != 0) failed
Nov 04 02:30:46 vm-name named[10257]: 04-Nov-2021 02:30:46.319 general: critical: exiting (due to fatal error in library)
Nov 04 02:30:46 vm-name systemd[1]: bind9.service: Main process exited, code=killed, status=6/ABRT
Nov 04 02:30:46 vm-name systemd[1]: bind9.service: Failed with result 'signal'.
BIND version used
BIND 9.11.5-P4-5.1+deb10u6-Debian (Extended Support Version) <id:998753c>
running on Linux x86_64 4.19.0-18-cloud-amd64 #1 SMP Debian 4.19.208-1 (2021-09-29)
built by make with '--build=x86_64-linux-gnu' '--prefix=/usr' '--includedir=/usr/include' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--sysconfdir=/etc' '--localstatedir=/var' '--disable-silent-rules' '--libdir=/usr/lib/x86_64-linux-gnu' '--libexecdir=/usr/lib/x86_64-linux-gnu' '--disable-maintainer-mode' '--disable-dependency-tracking' '--libdir=/usr/lib/x86_64-linux-gnu' '--sysconfdir=/etc/bind' '--with-python=python3' '--localstatedir=/' '--enable-threads' '--enable-largefile' '--with-libtool' '--enable-shared' '--enable-static' '--with-gost=no' '--with-openssl=/usr' '--with-gssapi=/usr' '--disable-isc-spnego' '--with-libidn2' '--with-libjson=/usr' '--with-lmdb=/usr' '--with-gnu-ld' '--with-geoip=/usr' '--with-atf=no' '--enable-ipv6' '--enable-rrl' '--enable-filter-aaaa' '--enable-native-pkcs11' '--with-pkcs11=/usr/lib/softhsm/libsofthsm2.so' '--with-randomdev=/dev/urandom' '--enable-dnstap' 'build_alias=x86_64-linux-gnu' 'CFLAGS=-g -O2 -fdebug-prefix-map=/build/bind9-gHNcz0/bind9-9.11.5.P4+dfsg=. -fstack-protector-strong -Wformat -Werror=format-security -fno-strict-aliasing -fno-delete-null-pointer-checks -DNO_VERSION_DATE -DDIG_SIGCHASE' 'LDFLAGS=-Wl,-z,relro -Wl,-z,now' 'CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2'
compiled by GCC 8.3.0
compiled with OpenSSL version: OpenSSL 1.1.1d 10 Sep 2019
linked to OpenSSL version: OpenSSL 1.1.1d 10 Sep 2019
compiled with libxml2 version: 2.9.4
linked to libxml2 version: 20904
compiled with libjson-c version: 0.12.1
linked to libjson-c version: 0.12.1
threads support is enabled
Steps to reproduce
Run bind9 with configuration, files down in text
What is the current bug behavior?
Bind9 fails and not automaticaly restarts
Nov 04 02:30:46 vm-name named[10257]: 04-Nov-2021 02:30:46.319 general: critical: ../../../lib/dns/rbtdb.c:1497: fatal error:
Nov 04 02:30:46 vm-name named[10257]: 04-Nov-2021 02:30:46.319 general: critical: RUNTIME_CHECK(rbtdb->next_serial != 0) failed
Nov 04 02:30:46 vm-name named[10257]: 04-Nov-2021 02:30:46.319 general: critical: exiting (due to fatal error in library)
Nov 04 02:30:46 vm-name systemd[1]: bind9.service: Main process exited, code=killed, status=6/ABRT
Nov 04 02:30:46 vm-name systemd[1]: bind9.service: Failed with result 'signal'.
What is the expected correct behavior?
Bind9 not going down
Relevant configuration files
My configuration is:
named.conf
key key.for.internal.domain {
algorithm HMAC-MD5;
secret "[masked]";
};
include "/etc/bind/named.conf.options";
include "/etc/bind/named.conf.local";
include "/etc/bind/named.conf.default-zones";
named.conf.options
acl "private" {
127.0.0.1/32; # localhost
172.16.1.0/24; # wg
};
options {
directory "/var/cache/bind";
allow-query { private; };
recursion yes;
forwarders {
127.0.0.1 port 5053;
1.1.1.1;
1.0.0.1;
8.8.8.8;
8.8.4.4;
};
dnssec-enable no;
dnssec-validation no;
listen-on { any; };
listen-on-v6 { none; };
};
named.conf.local
zone "dc1.internal.domain" {
type master;
file "/etc/bind/dc1.internal.domain.db";
allow-update { key "key.for.internal.domain"; };
};
zone "156.10.in-addr.arpa" {
type master;
file "/etc/bind/156.10.in-addr.arpa.db";
allow-update { key "key.for.internal.domain"; };
};
zone "dc2.internal.domain" {
type slave;
file "/etc/bind/slave_dc2.internal.domain.db";
masters { 10.60.0.1; };
};
zone "60.10.in-addr.arpa" {
type slave;
file "/etc/bind/slave_60.10.in-addr.arpa.db";
masters { 10.60.0.1; };
};
zone "dc3.internal.domain" {
type slave;
file "/etc/bind/slave_dc3.internal.domain.db";
masters { 10.200.0.1; };
};
zone "200.10.in-addr.arpa" {
type slave;
file "/etc/bind/slave_200.10.in-addr.arpa.db";
masters { 10.200.0.1; };
};
zone "dc4.internal.domain" {
type slave;
file "/etc/bind/slave_dc4.internal.domain.db";
masters { 10.90.0.1; };
};
zone "90.10.in-addr.arpa" {
type slave;
file "/etc/bind/slave_90.10.in-addr.arpa.db";
masters { 10.90.0.1; };
};
zone "dc5.internal.domain" {
type slave;
file "/etc/bind/slave_dc5.internal.domain.db";
masters { 10.9.96.1; };
};
zone "9.10.in-addr.arpa" {
type slave;
file "/etc/bind/slave_9.10.in-addr.arpa.db";
masters { 10.9.96.1; };
};
named.conf.default-zones
zone "." {
type hint;
file "/usr/share/dns/root.hints";
};
zone "internal.domain" {
type master;
file "/etc/bind/internal.domain.db";
};
zone "another.domain" {
type master;
file "/etc/bind/another.domain.db";
};
zone "third.domain" {
type master;
file "/etc/bind/third.domain.db";
};
zone "fourth.domain" {
type master;
file "/etc/bind/fourth.domain.db";
};