Specifying "max-cache-size default;" causes core-dump

Nick Tait via bind-users <[email protected]>
Newsgroups gmane.network.dns.bind9.user
Message-ID <d4c46df7-68a2-4b4c-b84b-2eb7b67f327b__22683.5108640202$1757817217$gmane$org@tait.net.nz>
Hi list.

I've tried to raise a new issue for BIND on 
https://gitlab.isc.org/isc-projects/bind9/-/issues but unfortunately 
when I click "Create issue", it pops up a banner saying: /Your issue has 
been recognized as spam. Please, change the content or solve the 
reCAPTCHA to proceed./

...And no reCAPTCHA code is displayed.

So I hope it's OK if I report the issue to this list instead?

Thanks,

Nick.

------------------------------------------------------------------------

*/Specifying "max-cache-size default;" causes core-dump/*

*### Summary*

Specifying `max-cache-size default;` in the configuration causes an 
assertion failure.

*### BIND version affected*

The BIND versions that I've tested are 9.20.4 (included with Linux 
distro) and 9.20.14 (i.e. downloaded and compiled latest version).

```
BIND 9.20.14-dev (Stable Release) <id:1cbd8b8>
running on Linux x86_64 6.14.0-29-generic #29-Ubuntu SMP PREEMPT_DYNAMIC Thu Aug  7 18:32:38 UTC 2025
built by make with default
compiled by GCC 14.2.0
compiled with OpenSSL version: OpenSSL 3.4.1 11 Feb 2025
linked to OpenSSL version: OpenSSL 3.4.1 11 Feb 2025
compiled with libuv version: 1.50.0
linked to libuv version: 1.50.0
compiled with liburcu version: 0.15.1
compiled with jemalloc version: 5.3.0
compiled with libnghttp2 version: 1.64.0
linked to libnghttp2 version: 1.64.0
compiled with zlib version: 1.3.1
linked to zlib version: 1.3.1
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): no
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
```


*### Steps to reproduce*

1. Use configuration file below.
2. Start BIND server with command: `named -g -c named.conf ...`

*### What is the current *bug* behavior?*

BIND core-dumps and exits.

*### What is the expected *correct* behavior?*

BIND should use the default setting for max-cache-size according to the 
[documentation](https://bind9.readthedocs.io/en/stable/reference.html#namedconf-statement-max-cache-size):

 > The default size limit for each individual cache is:
 > * 90% of physical memory for views with recursion set to yes (the 
default), or
 > * 2 MB for views with recursion set to no.

*### Relevant configuration files*

named.conf

```
controls {};
options {
     forward only;
     forwarders { ::1; };
     listen-on port 8053 { 127.0.0.1; };
     listen-on-v6 port 8053 { ::1; };
     max-cache-size default;
     empty-zones-enable no;
     session-keyfile "session.key";
};
logging {
     category default { default_debug; };
     category unmatched { null; };
};
```


*### Relevant logs*

```
14-Sep-2025 13:33:24.314 starting BIND 9.20.14-dev (Stable Release) <id:1cbd8b8>
14-Sep-2025 13:33:24.314 running on Linux x86_64 6.14.0-29-generic #29-Ubuntu SMP PREEMPT_DYNAMIC Thu Aug  7 18:32:38 UTC 2025
14-Sep-2025 13:33:24.314 built with default
14-Sep-2025 13:33:24.314 running as: named -g -n 1 -c named.conf
14-Sep-2025 13:33:24.314 compiled by GCC 14.2.0
14-Sep-2025 13:33:24.314 compiled with OpenSSL version: OpenSSL 3.4.1 11 Feb 2025
14-Sep-2025 13:33:24.314 linked to OpenSSL version: OpenSSL 3.4.1 11 Feb 2025
14-Sep-2025 13:33:24.314 compiled with libuv version: 1.50.0
14-Sep-2025 13:33:24.314 linked to libuv version: 1.50.0
14-Sep-2025 13:33:24.314 compiled with liburcu version: 0.15.1
14-Sep-2025 13:33:24.314 compiled with jemalloc version: 5.3.0
14-Sep-2025 13:33:24.314 compiled with libnghttp2 version: 1.64.0
14-Sep-2025 13:33:24.314 linked to libnghttp2 version: 1.64.0
14-Sep-2025 13:33:24.314 compiled with zlib version: 1.3.1
14-Sep-2025 13:33:24.314 linked to zlib version: 1.3.1
14-Sep-2025 13:33:24.314 ----------------------------------------------------
14-Sep-2025 13:33:24.314 BIND 9 is maintained by Internet Systems Consortium,
14-Sep-2025 13:33:24.314 Inc. (ISC), a non-profit 501(c)(3) public-benefit
14-Sep-2025 13:33:24.314 corporation.  Support and training for BIND 9 are
14-Sep-2025 13:33:24.314 available athttps://www.isc.org/support
14-Sep-2025 13:33:24.314 ----------------------------------------------------
14-Sep-2025 13:33:24.314 adjusted limit on open files from 1024 to 1073741816
14-Sep-2025 13:33:24.314 found 8 CPUs, using 1 worker thread
14-Sep-2025 13:33:24.316 DNSSEC algorithms: RSASHA1 NSEC3RSASHA1 RSASHA256 RSASHA512 ECDSAP256SHA256 ECDSAP384SHA384 ED25519 ED448
14-Sep-2025 13:33:24.316 DS algorithms: SHA-1 SHA-256 SHA-384
14-Sep-2025 13:33:24.316 HMAC algorithms: HMAC-MD5 HMAC-SHA1 HMAC-SHA224 HMAC-SHA256 HMAC-SHA384 HMAC-SHA512
14-Sep-2025 13:33:24.316 TKEY mode 2 support (Diffie-Hellman): no
14-Sep-2025 13:33:24.316 TKEY mode 3 support (GSS-API): no
14-Sep-2025 13:33:24.317 the initial working directory is '/home/nick/Development/opensource/bind9/nick'
14-Sep-2025 13:33:24.317 loading configuration from '/home/nick/Development/opensource/bind9/nick/named.conf'
14-Sep-2025 13:33:24.317 using default UDP/IPv4 port range: [32768, 60999]
14-Sep-2025 13:33:24.317 using default UDP/IPv6 port range: [32768, 60999]
14-Sep-2025 13:33:24.318 listening on IPv4 interface lo, 127.0.0.1#8053
14-Sep-2025 13:33:24.318 listening on IPv6 interface lo, ::1#8053
14-Sep-2025 13:33:24.318 Disabling periodic interface re-scans timer
14-Sep-2025 13:33:24.318 couldn't mkdir '/usr/local/var': Permission denied
14-Sep-2025 13:33:24.318 generating session key for dynamic DNS
14-Sep-2025 13:33:24.319 server.c:4480: INSIST(strcasecmp(str, "unlimited") == 0) failed
14-Sep-2025 13:33:24.319 /home/nick/Development/opensource/bind9/lib/isc/.libs/libisc-9.20.14-dev.so(isc_backtrace_log+0x3f) [0x74a24afa5d3f]
14-Sep-2025 13:33:24.319 /home/nick/Development/opensource/bind9/bin/named/.libs/named(+0x278bb) [0x615c2e0348bb]
14-Sep-2025 13:33:24.319 /home/nick/Development/opensource/bind9/lib/isc/.libs/libisc-9.20.14-dev.so(isc_assertion_failed+0x10) [0x74a24afa5890]
14-Sep-2025 13:33:24.319 /home/nick/Development/opensource/bind9/bin/named/.libs/named(+0x3bf3b) [0x615c2e048f3b]
14-Sep-2025 13:33:24.319 /home/nick/Development/opensource/bind9/bin/named/.libs/named(+0x4a01a) [0x615c2e05701a]
14-Sep-2025 13:33:24.319 /home/nick/Development/opensource/bind9/bin/named/.libs/named(+0x4ad3d) [0x615c2e057d3d]
14-Sep-2025 13:33:24.319 /home/nick/Development/opensource/bind9/lib/isc/.libs/libisc-9.20.14-dev.so(isc__async_cb+0xa7) [0x74a24afa5bd7]
14-Sep-2025 13:33:24.319 /lib/x86_64-linux-gnu/libuv.so.1(+0xb933) [0x74a24ae9d933]
14-Sep-2025 13:33:24.319 /lib/x86_64-linux-gnu/libuv.so.1(+0x2bd9c) [0x74a24aebdd9c]
14-Sep-2025 13:33:24.319 /lib/x86_64-linux-gnu/libuv.so.1(uv_run+0x247) [0x74a24aeaaa47]
14-Sep-2025 13:33:24.319 /home/nick/Development/opensource/bind9/lib/isc/.libs/libisc-9.20.14-dev.so(+0x4c17e) [0x74a24afb917e]
14-Sep-2025 13:33:24.319 /home/nick/Development/opensource/bind9/bin/named/.libs/named(main+0xe02) [0x615c2e028ab2]
14-Sep-2025 13:33:24.319 /lib/x86_64-linux-gnu/libc.so.6(+0x2a578) [0x74a24a22a578]
14-Sep-2025 13:33:24.319 /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x8b) [0x74a24a22a63b]
14-Sep-2025 13:33:24.319 /home/nick/Development/opensource/bind9/bin/named/.libs/named(_start+0x25) [0x615c2e0294c5]
14-Sep-2025 13:33:24.319 exiting (due to assertion failure)
Aborted (core dumped)
```


/label ~Bug

-- 
Visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.