socket.c:3252: REQUIRE(sock->references == 1) failed
Summary
socket.c:3252: REQUIRE(sock->references == 1) fails when interface is removed from system.
BIND version used
running on FreeBSD i386 11.2-RELEASE-p2 FreeBSD 11.2-RELEASE-p2 #0: Tue Aug 14 19:30:14 UTC 2018 root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC
built by make with '--localstatedir=/var' '--disable-linux-caps' '--with-randomdev=/dev/random' '--with-libxml2=/usr/local' '--with-readline=-L/usr/local/lib -ledit' '--with-dlopen=yes' '--with-gost=no' '--sysconfdir=/usr/local/etc/namedb' '--with-dlz-filesystem=yes' '--disable-dnstap' '--enable-filter-aaaa' '--disable-fixed-rrset' '--without-geoip' '--without-gssapi' '--with-libidn2=/usr/local' '--enable-ipv6' '--with-libjson=/usr/local' '--disable-largefile' '--with-lmdb=/usr/local' '--disable-native-pkcs11' '--with-python=/usr/local/bin/python2.7' '--disable-querytrace' '--enable-rpz-nsdname' '--enable-rpz-nsip' 'STD_CDEFINES=-DDIG_SIGCHASE=1' '--with-openssl=/usr' '--enable-symtable' '--enable-threads' '--with-tuning=default' '--prefix=/usr/local' '--mandir=/usr/local/man' '--infodir=/usr/local/share/info/' '--build=i386-portbld-freebsd11.2' 'build_alias=i386-portbld-freebsd11.2' 'CC=cc' 'CFLAGS=-g -O0 -DLIBICONV_PLUG -fstack-protector -isystem /usr/local/include -fno-strict-aliasing ' 'LDFLAGS= -fstack-protector ' 'LIBS=-L/usr/local/lib' 'CPPFLAGS=-DLIBICONV_PLUG -isystem /usr/local/include' 'CPP=cpp'
compiled by CLANG 4.2.1 Compatible FreeBSD Clang 6.0.0 (tags/RELEASE_600/final 326565)
compiled with OpenSSL version: OpenSSL 1.0.2o-freebsd 27 Mar 2018
linked to OpenSSL version: OpenSSL 1.0.2o-freebsd 27 Mar 2018
compiled with libxml2 version: 2.9.7
linked to libxml2 version: 20907
compiled with libjson-c version: 0.13.1
linked to libjson-c version: 0.13.1
compiled with zlib version: 1.2.11
linked to zlib version: 1.2.11
threads support is enabled
Steps to reproduce
My DSL connection has been unstable for a couple of days, and when the DSL connection goes down, ppp exits, and tun0 is destroyed, named crashes. This did not happen in prior versions of bind. I can reproduce this bind crash by using ifconfig tun0 destroy.
What is the current bug behavior?
bind crashes. I am running bind911-9.11.5_1 from freebsd ports, with a modification so that --enable-symtable at least gets me a backtrace:
cwd is /usr/local/etc/namedb/working, owned by bind:bind 755, and bind is running as user bind, but I am not getting a core dump. bind is running as follows:
/usr/local/sbin/named -u bind -c /usr/local/etc/namedb/named.conf
I am happy to get a core dump if someone knows how to get the freebsd port to build or run in such a way that it will dump core. The crash is completely repeatable. Note that in the bind conf below, tun0 is an Internet-facing interface without any of the IP addresses in listen-on on it.
What is the expected correct behavior?
bind does not crash.
Relevant configuration files
acl "trusted" {
"localhost";
"localnets";
};
logging {
category "resolver" {
"null";
};
};
options {
directory "/usr/local/etc/namedb/working";
dump-file "/var/dump/named_dump.db";
listen-on {
127.0.0.1/32;
192.168.4.1/32;
192.168.2.1/32;
192.168.3.1/32;
};
pid-file "/var/run/named/pid";
statistics-file "/var/stats/named.stats";
allow-query-cache {
"trusted";
};
allow-recursion {
"trusted";
};
disable-empty-zone "255.255.255.255.IN-ADDR.ARPA";
disable-empty-zone "0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.IP6.ARPA";
disable-empty-zone "1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.IP6.ARPA";
dnssec-validation auto;
};
zone "." {
type hint;
file "/usr/local/etc/namedb/named.root";
};
zone "localhost" {
type master;
file "/usr/local/etc/namedb/master/localhost-forward.db";
};
zone "127.in-addr.arpa" {
type master;
file "/usr/local/etc/namedb/master/localhost-reverse.db";
};
zone "255.in-addr.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "0.ip6.arpa" {
type master;
file "/usr/local/etc/namedb/master/localhost-reverse.db";
};
zone "0.in-addr.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "10.in-addr.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "16.172.in-addr.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "17.172.in-addr.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "18.172.in-addr.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "19.172.in-addr.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "20.172.in-addr.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "21.172.in-addr.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "22.172.in-addr.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "23.172.in-addr.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "24.172.in-addr.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "25.172.in-addr.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "26.172.in-addr.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "27.172.in-addr.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "28.172.in-addr.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "29.172.in-addr.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "30.172.in-addr.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "31.172.in-addr.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "168.192.in-addr.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "64.100.in-addr.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "65.100.in-addr.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "66.100.in-addr.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "67.100.in-addr.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "68.100.in-addr.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "69.100.in-addr.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "70.100.in-addr.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "71.100.in-addr.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "72.100.in-addr.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "73.100.in-addr.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "74.100.in-addr.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "75.100.in-addr.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "76.100.in-addr.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "77.100.in-addr.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "78.100.in-addr.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "79.100.in-addr.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "80.100.in-addr.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "81.100.in-addr.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "82.100.in-addr.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "83.100.in-addr.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "84.100.in-addr.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "85.100.in-addr.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "86.100.in-addr.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "87.100.in-addr.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "88.100.in-addr.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "89.100.in-addr.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "90.100.in-addr.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "91.100.in-addr.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "92.100.in-addr.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "93.100.in-addr.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "94.100.in-addr.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "95.100.in-addr.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "96.100.in-addr.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "97.100.in-addr.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "98.100.in-addr.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "99.100.in-addr.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "100.100.in-addr.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "101.100.in-addr.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "102.100.in-addr.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "103.100.in-addr.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "104.100.in-addr.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "105.100.in-addr.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "106.100.in-addr.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "107.100.in-addr.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "108.100.in-addr.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "109.100.in-addr.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "110.100.in-addr.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "111.100.in-addr.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "112.100.in-addr.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "113.100.in-addr.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "114.100.in-addr.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "115.100.in-addr.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "116.100.in-addr.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "117.100.in-addr.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "118.100.in-addr.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "119.100.in-addr.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "120.100.in-addr.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "121.100.in-addr.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "122.100.in-addr.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "123.100.in-addr.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "124.100.in-addr.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "125.100.in-addr.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "126.100.in-addr.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "127.100.in-addr.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "254.169.in-addr.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "0.0.192.in-addr.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "2.0.192.in-addr.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "100.51.198.in-addr.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "113.0.203.in-addr.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "8.b.d.0.1.0.0.2.ip6.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "test" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "example" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "invalid" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "example.com" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "example.net" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "example.org" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "18.198.in-addr.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "19.198.in-addr.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "240.in-addr.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "241.in-addr.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "242.in-addr.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "243.in-addr.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "244.in-addr.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "245.in-addr.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "246.in-addr.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "247.in-addr.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "248.in-addr.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "249.in-addr.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "250.in-addr.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "251.in-addr.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "252.in-addr.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "253.in-addr.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "254.in-addr.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "1.ip6.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "3.ip6.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "4.ip6.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "5.ip6.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "6.ip6.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "7.ip6.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "8.ip6.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "9.ip6.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "a.ip6.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "b.ip6.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "c.ip6.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "d.ip6.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "e.ip6.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "0.f.ip6.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "1.f.ip6.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "2.f.ip6.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "3.f.ip6.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "4.f.ip6.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "5.f.ip6.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "6.f.ip6.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "7.f.ip6.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "8.f.ip6.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "9.f.ip6.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "a.f.ip6.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "b.f.ip6.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "0.e.f.ip6.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "1.e.f.ip6.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "2.e.f.ip6.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "3.e.f.ip6.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "4.e.f.ip6.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "5.e.f.ip6.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "6.e.f.ip6.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "7.e.f.ip6.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "c.f.ip6.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "d.f.ip6.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "8.e.f.ip6.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "9.e.f.ip6.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "a.e.f.ip6.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "b.e.f.ip6.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "c.e.f.ip6.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "d.e.f.ip6.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "e.e.f.ip6.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "f.e.f.ip6.arpa" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "ip6.int" {
type master;
file "/usr/local/etc/namedb/master/empty.db";
};
zone "luckie.org.nz" {
type master;
file "luckie.org.nz";
notify no;
};
zone "XXXXXX.dyndns.org" {
type master;
file "XXXXXX.dyndns.org";
notify no;
};
zone "4.168.192.in-addr.arpa" {
type master;
file "4.168.192.in-addr.arpa";
notify no;
};
zone "2.168.192.in-addr.arpa" {
type master;
file "2.168.192.in-addr.arpa";
notify no;
};
zone "3.168.192.in-addr.arpa" {
type master;
file "3.168.192.in-addr.arpa";
notify no;
};
Relevant logs and/or screenshots
Dec 12 19:07:40 XXX named[15312]: #0 0x809a2e8 in assertion_failed()+0xa8
Dec 12 19:07:40 XXX named[15312]: #1 0x8491db6 in isc_assertion_failed()+0x76
Dec 12 19:07:40 XXX named[15312]: #2 0x84fcf6c in isc__socket_close()+0x14c
Dec 12 19:07:40 XXX kernel: pid 15312 (named), uid 53: exited on signal 6
Dec 12 19:07:42 XXX dhcp6c[90941]: transmit failed: No buffer space available
Possible fixes
socket.c line 3252.