named assertion failed in mem.c
I have a FreeBSD 12.1 under KVM (6 vCPU, 8 G RAM), where I am able to trigger core dump of
named by running system test under a tight loop (e.g.
while true; do make -j6 -k test V=1; done) and press-and-hold
Ctrl-C until everything eventually gets terminated. The test from which
named originated varies but all the
named backtraces are the same:
Here's the backtrace:
Core was generated by `/usr/home/newman/bind9/bin/named/.libs/named -D case-ns1 -X named.lock -m record'. Program terminated with signal SIGABRT, Aborted. #0 0x0000000800e0845a in thr_kill () from /lib/libc.so.7 [Current thread is 1 (LWP 102024)] (gdb) bt #0 0x0000000800e0845a in thr_kill () from /lib/libc.so.7 #1 0x0000000800e06844 in raise () from /lib/libc.so.7 #2 0x0000000800d79079 in abort () from /lib/libc.so.7 #3 0x00000000002309e5 in assertion_failed (file=0x8006dc1d7 "mem.c", line=2371, type=<optimized out>, cond=0x8006d29a5 "((mctx) != ((void *)0) && (mctx)->magic == (('A') << 24 | ('m') << 16 | ('c') << 8 | ('x')))") at ./main.c:261 #4 0x000000080070333a in isc_assertion_failed (file=0x18e88 <error: Cannot access memory at address 0x18e88>, line=6, type=isc_assertiontype_require, cond=0x800e0847a <thr_self+10> "\017\202\224\064") at assertions.c:48 #5 0x0000000800711dc5 in isc__mem_put (mctx=<optimized out>, ptr=<optimized out>, size=<optimized out>, file=<optimized out>, line=0) at mem.c:2371 #6 0x00000008002cb3b5 in ns_clientmgr_create (mctx=0x8011a8000, sctx=0x801911bd0, taskmgr=0x801901bd0, timermgr=0x801903bd0, interface=0x802a0a010, managerp=0x802a0a518) at client.c:2496 #7 0x00000008002d02b2 in ns_interface_create (mgr=0x801b7f010, addr=<optimized out>, name=0x7fffdf3f7960 "lo0", ifpret=0x7fffdf3f76f0) at interfacemgr.c:426 #8 0x00000008002cfb86 in ns_interface_setup (mgr=0x801b7f010, addr=0x6, name=0x0, ifpret=0x7fffdf3f7bf0, accept_tcp=true, dscp=-1, addr_in_use=0x7fffdf3f7c16) at interfacemgr.c:511 #9 0x00000008002cf8da in do_scan (mgr=<optimized out>, ext_listen=<optimized out>, verbose=<optimized out>) at interfacemgr.c:1081 #10 0x00000008002cea33 in ns_interfacemgr_scan0 (mgr=0x801b7f010, ext_listen=0x0, verbose=<optimized out>) at interfacemgr.c:1141 #11 0x00000008002ce9d9 in ns_interfacemgr_scan (mgr=0x801b7f010, verbose=false) at interfacemgr.c:1188 #12 0x000000000023ea9f in load_configuration (filename=<optimized out>, server=0x801906bd0, first_time=<optimized out>) at ./server.c:8638 #13 0x0000000000233815 in run_server (task=<optimized out>, event=0x0) at ./server.c:9580 #14 0x0000000800727329 in dispatch (manager=0x801901bd0, threadid=<optimized out>) at task.c:1150 #15 0x00000008007254af in run (queuep=<optimized out>) at task.c:1340 #16 0x0000000800c32776 in ?? () from /lib/libthr.so.3 #17 0x0000000000000000 in ?? () Backtrace stopped: Cannot access memory at address 0x7fffdf3f8000
BIND (7fae1ef1) was configured with
CC=clang CFLAGS="-fno-omit-frame-pointer -fno-optimize-sibling-calls -O1 -g -Wall -Wextra" ./configure --disable-maintainer-mode --enable-developer --with-libtool --disable-static --with-cmocka --with-libxml2 --with-json-c --prefix=$HOME/.local --without-make-clean.
A more detailed backtrace attached: gdb.case-ns1.out.