Assertion failure in dns__catz_zone_destroy() during shutdown
See https://gitlab.isc.org/isc-projects/bind9/-/jobs/3251511
Program terminated with signal SIGABRT, Aborted.
#0 0x00007f4ff83a4e5c in __pthread_kill_implementation () from /lib64/libc.so.6
[Current thread is 1 (Thread 0x7f4ff4fbd6c0 (LWP 27104))]
#0 0x00007f4ff83a4e5c in __pthread_kill_implementation () from /lib64/libc.so.6
#1 0x00007f4ff8354a76 in raise () from /lib64/libc.so.6
#2 0x00007f4ff833e7fc in abort () from /lib64/libc.so.6
#3 0x00007f4ff95d8f80 in abort () from /lib64/libtsan.so.2
#4 0x0000000000424f48 in assertion_failed (file=<optimized out>, line=<optimized out>, type=<optimized out>, cond=<optimized out>) at main.c:236
#5 0x00007f4ff90012d7 in isc_assertion_failed (file=file@entry=0x7f4ff8f4f2b7 "catz.c", line=line@entry=1004, type=type@entry=isc_assertiontype_insist, cond=cond@entry=0x7f4ff8f4f401 "!catz->updaterunning") at assertions.c:48
#6 0x00007f4ff8d3c971 in dns__catz_zone_destroy (catz=0x7b5400010180) at catz.c:1004
#7 dns_catz_zone_unref (ptr=ptr@entry=0x7b5400010180) at catz.c:1063
#8 0x00007f4ff8d3ca30 in dns_catz_zone_detach (ptrp=ptrp@entry=0x7f4ff4ef95e0) at catz.c:1063
#9 0x00007f4ff8d3f113 in dns__catz_shutdown (catz=<optimized out>) at catz.c:944
#10 dns_catz_shutdown_catzs (catzs=0x7b2000014b00) at catz.c:1049
#11 0x00007f4ff8ed5c7d in view_flushanddetach (viewp=viewp@entry=0x7f4ff4ef96f8, flush=flush@entry=false) at view.c:684
#12 0x00007f4ff8ed5e86 in dns_view_detach (viewp=viewp@entry=0x7f4ff4ef96f8) at view.c:716
#13 0x0000000000453cef in shutdown_server (task=<optimized out>, event=<optimized out>) at server.c:10137
#14 0x00007f4ff9030573 in task_run (task=0x7b3000000900) at task.c:815
#15 isc_task_run (task=0x7b3000000900) at task.c:896
#16 0x00007f4ff8fdbdec in isc__nm_async_task (worker=worker@entry=0x7ba400000000, ev0=ev0@entry=0x7b4800001980) at netmgr/netmgr.c:848
#17 0x00007f4ff8fe70ab in process_netievent (worker=worker@entry=0x7ba400000000, ievent=ievent@entry=0x7b4800001980) at netmgr/netmgr.c:920
#18 0x00007f4ff8fe7d7c in process_queue (worker=worker@entry=0x7ba400000000, type=type@entry=NETIEVENT_TASK) at netmgr/netmgr.c:1013
#19 0x00007f4ff8fe8af2 in process_all_queues (worker=0x7ba400000000) at netmgr/netmgr.c:767
#20 async_cb (handle=0x7ba400000360) at netmgr/netmgr.c:796
#21 0x00007f4ff86da18f in uv__async_io (loop=0x7ba400000010, w=0x7ba4000001d8, events=1) at /usr/src/libuv-v1.44.1/src/unix/async.c:163
#22 0x00007f4ff86f65da in uv__io_poll (loop=0x7ba400000010, timeout=-1) at /usr/src/libuv-v1.44.1/src/unix/epoll.c:374
#23 0x00007f4ff86dac2d in uv_run (loop=0x7ba400000010, mode=UV_RUN_DEFAULT) at /usr/src/libuv-v1.44.1/src/unix/core.c:391
#24 0x00007f4ff8fe818f in nm_thread (worker0=0x7ba400000000) at netmgr/netmgr.c:698
#25 0x00007f4ff903c0c2 in isc__trampoline_run (arg=0x7b0c00002190) at trampoline.c:189
#26 0x00007f4ff95b13f0 in __tsan_thread_start_func () from /lib64/libtsan.so.2
#27 0x00007f4ff83a312d in start_thread () from /lib64/libc.so.6
#28 0x00007f4ff8423d74 in clone () from /lib64/libc.so.6
Assertion on !catz->updaterunning
in dns__catz_zone_destroy()
, i.e. the catalog zone has been destroyed during shutdown while the update process was still running.
Holding an additional reference to catz
, while performing the update process, should fix this issue.