Assertion failure on startup using the -X option
Summary
BIND exits with an assertion failure when started with the -X option an the configuration contain a "lock-file" statement.
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
Also reported on BIND 9.18.19
Steps to reproduce
Using the configuration below:
Start BIND with the -X option
named -c /etc/named.conf -X "/home/named/named.lock"
( the lock file name need not be the same on the commandline as in the configuration file)
(What actually happens.) BIND exits with an assertion failure
What is the expected correct behavior?
BIND should start without any error
Relevant configuration files
options {
directory "/home/named";
lock-file "/home/named/named.lock";
recursion yes;
allow-query { any; };
empty-zones-enable yes;
};
logging {
channel example-log {
file "/home/named/log/example.log";
severity info;
};
category default {
example-log;
};
};
Relevant logs and/or screenshots
Oct 24 06:56:58 bialistock named[696852]: starting BIND 9.19.17 (Development Release) <id:464cf8c>
Oct 24 06:56:58 bialistock named[696852]: running on Linux x86_64 6.0.12-100.fc35.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 8 16:53:55 UTC 2022
Oct 24 06:56:58 bialistock named[696852]: built with '--enable-fixed-rrset' '--enable-dnstap' '--enable-querytrace=yes' '--with-openssl' '--with-libxml2' '--with-json-c' '--enable-full-repo
rt'
Oct 24 06:56:58 bialistock named[696852]: running as: named -c ./basic-resolver.conf -X /home/named/named.lock
Oct 24 06:56:58 bialistock named[696852]: compiled by GCC 11.3.1 20220421 (Red Hat 11.3.1-3)
Oct 24 06:56:58 bialistock named[696852]: compiled with OpenSSL version: OpenSSL 1.1.1q FIPS 5 Jul 2022
Oct 24 06:56:58 bialistock named[696852]: linked to OpenSSL version: OpenSSL 1.1.1q FIPS 5 Jul 2022
Oct 24 06:56:58 bialistock named[696852]: compiled with libuv version: 1.44.2
Oct 24 06:56:58 bialistock named[696852]: linked to libuv version: 1.44.2
Oct 24 06:56:58 bialistock named[696852]: compiled with liburcu version: 0.13.0
Oct 24 06:56:58 bialistock named[696852]: compiled with jemalloc version: 5.2.1
Oct 24 06:56:58 bialistock named[696852]: compiled with libnghttp2 version: 1.45.1
Oct 24 06:56:58 bialistock named[696852]: linked to libnghttp2 version: 1.45.1
Oct 24 06:56:58 bialistock named[696852]: compiled with libxml2 version: 2.9.14
Oct 24 06:56:58 bialistock named[696852]: linked to libxml2 version: 20914
Oct 24 06:56:58 bialistock named[696852]: compiled with json-c version: 0.15
Oct 24 06:56:58 bialistock named[696852]: linked to json-c version: 0.15
Oct 24 06:56:58 bialistock named[696852]: compiled with zlib version: 1.2.11
Oct 24 06:56:58 bialistock named[696852]: linked to zlib version: 1.2.11
Oct 24 06:56:58 bialistock named[696852]: compiled with protobuf-c version: 1.4.0
Oct 24 06:56:58 bialistock named[696852]: linked to protobuf-c version: 1.4.0
Oct 24 06:56:58 bialistock named[696852]: ----------------------------------------------------
Oct 24 06:56:58 bialistock named[696852]: BIND 9 is maintained by Internet Systems Consortium,
Oct 24 06:56:58 bialistock named[696852]: Inc. (ISC), a non-profit 501(c)(3) public-benefit
Oct 24 06:56:58 bialistock named[696852]: corporation. Support and training for BIND 9 are
Oct 24 06:56:58 bialistock named[696852]: available at https://www.isc.org/support
Oct 24 06:56:58 bialistock named[696852]: ----------------------------------------------------
Oct 24 06:56:58 bialistock named[696852]: adjusted limit on open files from 1024 to 524288
Oct 24 06:56:58 bialistock named[696852]: found 4 CPUs, using 4 worker threads
Oct 24 06:56:58 bialistock named[696852]: using 4 UDP listeners per interface
Oct 24 06:56:58 bialistock named[696852]: DNSSEC algorithms: RSASHA1 NSEC3RSASHA1 RSASHA256 RSASHA512 ECDSAP256SHA256 ECDSAP384SHA384 ED25519 ED448
Oct 24 06:56:58 bialistock named[696852]: DS algorithms: SHA-1 SHA-256 SHA-384
Oct 24 06:56:58 bialistock named[696852]: HMAC algorithms: HMAC-MD5 HMAC-SHA1 HMAC-SHA224 HMAC-SHA256 HMAC-SHA384 HMAC-SHA512
Oct 24 06:56:58 bialistock named[696852]: TKEY mode 2 support (Diffie-Hellman): no
Oct 24 06:56:58 bialistock named[696852]: TKEY mode 3 support (GSS-API): yes
Oct 24 06:56:58 bialistock named[696852]: Disabling periodic interface re-scans timer
Oct 24 06:56:58 bialistock named[696852]: config.c: option 'trust-anchor-telemetry' is experimental and subject to change in the future
Oct 24 06:56:58 bialistock named[696852]: loading configuration from '/home/named/include/./basic-resolver.conf'
Oct 24 06:56:58 bialistock named[696852]: 'lock-file' has no effect because the server was run with -X
Oct 24 06:56:58 bialistock named[696852]: server.c:8191: INSIST(server->lockfile == ((void *)0)) failed
Oct 24 06:56:58 bialistock named[696852]: /usr/local/lib/libisc-9.19.17.so(isc_backtrace_log+0x2f) [0x7f8cd16c08af]
Oct 24 06:56:58 bialistock named[696852]: named() [0x423812]
Oct 24 06:56:58 bialistock named[696852]: /usr/local/lib/libisc-9.19.17.so(isc_assertion_failed+0xa) [0x7f8cd16c048a]
Oct 24 06:56:58 bialistock named[696852]: named() [0x443336]
Oct 24 06:56:58 bialistock named[696852]: named() [0x443f0a]
Oct 24 06:56:58 bialistock named[696852]: /usr/local/lib/libisc-9.19.17.so(isc__async_cb+0x97) [0x7f8cd16c0767]
Oct 24 06:56:58 bialistock named[696852]: /lib64/libuv.so.1(+0xac9d) [0x7f8cd0fd7c9d]
Oct 24 06:56:58 bialistock named[696852]: /lib64/libuv.so.1(+0x26aae) [0x7f8cd0ff3aae]
Oct 24 06:56:58 bialistock named[696852]: /lib64/libuv.so.1(uv_run+0x5e0) [0x7f8cd0fdd650]
Oct 24 06:56:58 bialistock named[696852]: /usr/local/lib/libisc-9.19.17.so(+0x3f3fc) [0x7f8cd16d23fc]
Oct 24 06:56:58 bialistock named[696852]: named(main+0xebb) [0x41881b]
Oct 24 06:56:58 bialistock named[696852]: /lib64/libc.so.6(+0x3feb0) [0x7f8cd0a3feb0]
Oct 24 06:56:58 bialistock named[696852]: /lib64/libc.so.6(__libc_start_main+0x80) [0x7f8cd0a3ff60]
Oct 24 06:56:58 bialistock named[696852]: named(_start+0x25) [0x4190f5]
Oct 24 06:56:58 bialistock named[696852]: exiting (due to assertion failure)