TSAN error: view->adb detached too early.
zone
uses a weak attachment to view
and view->adb
is being removed before the last weak reference is gone.
WARNING: ThreadSanitizer: data race
Write of size 8 at 0x000000000001 by main thread (mutexes: write M1):
#0 dns_view_detach lib/dns/view.c:492:14 (BuildId: ed6942e73cb749ba369cb30e2b8cbff55912936c)
#1 load_configuration bin/named/server.c:9730:3 (BuildId: e22f5494ad4763562b247402252f579d302d266b)
#2 loadconfig bin/named/server.c:10306:11 (BuildId: e22f5494ad4763562b247402252f579d302d266b)
#3 named_server_reconfigcommand bin/named/server.c:10712:2
#4 named_control_docommand bin/named/control.c:244:12 (BuildId: e22f5494ad4763562b247402252f579d302d266b)
#5 control_command bin/named/controlconf.c:385:17 (BuildId: e22f5494ad4763562b247402252f579d302d266b)
#6 isc__async_cb lib/isc/async.c:84:3 (BuildId: da417881a15b47891f3b60c2e3b71c7ee8d91d1c)
#7 uv__async_io /usr/src/libuv-v1.44.1/src/unix/async.c:163:5 (BuildId: 120c450d14885aa5308bc95c4ea77de2c2b1cc36)
#8 isc_loopmgr_run lib/isc/loop.c:473:2 (BuildId: da417881a15b47891f3b60c2e3b71c7ee8d91d1c)
#9 main bin/named/main.c:1513:2 (BuildId: e22f5494ad4763562b247402252f579d302d266b)
Previous read of size 8 at 0x000000000001 by thread T1 (mutexes: write M2):
#0 zone_maintenance lib/dns/zone.c:10910:46 (BuildId: ed6942e73cb749ba369cb30e2b8cbff55912936c)
#1 zone_timer lib/dns/zone.c:14609:2 (BuildId: ed6942e73cb749ba369cb30e2b8cbff55912936c)
#2 timer_cb lib/isc/timer.c:111:2 (BuildId: da417881a15b47891f3b60c2e3b71c7ee8d91d1c)
#3 uv__run_timers /usr/src/libuv-v1.44.1/src/timer.c:178:5 (BuildId: 120c450d14885aa5308bc95c4ea77de2c2b1cc36)
#4 thread_run lib/isc/thread.c:77:17 (BuildId: da417881a15b47891f3b60c2e3b71c7ee8d91d1c)
Location is heap block of size 1448 at 0x000000000016 allocated by main thread:
#0 malloc <null> (BuildId: e22f5494ad4763562b247402252f579d302d266b)
#1 mallocx lib/isc/./jemalloc_shim.h:65:14 (BuildId: da417881a15b47891f3b60c2e3b71c7ee8d91d1c)
#2 mem_get lib/isc/mem.c:304:8
#3 isc__mem_get lib/isc/mem.c:667:8 (BuildId: da417881a15b47891f3b60c2e3b71c7ee8d91d1c)
#4 dns_view_create lib/dns/view.c:97:9 (BuildId: ed6942e73cb749ba369cb30e2b8cbff55912936c)
#5 create_view bin/named/server.c:6440:11 (BuildId: e22f5494ad4763562b247402252f579d302d266b)
#6 load_configuration bin/named/server.c:9141:12 (BuildId: e22f5494ad4763562b247402252f579d302d266b)
#7 loadconfig bin/named/server.c:10306:11 (BuildId: e22f5494ad4763562b247402252f579d302d266b)
#8 named_server_reconfigcommand bin/named/server.c:10712:2
#9 named_control_docommand bin/named/control.c:244:12 (BuildId: e22f5494ad4763562b247402252f579d302d266b)
#10 control_command bin/named/controlconf.c:385:17 (BuildId: e22f5494ad4763562b247402252f579d302d266b)
#11 isc__async_cb lib/isc/async.c:84:3 (BuildId: da417881a15b47891f3b60c2e3b71c7ee8d91d1c)
#12 uv__async_io /usr/src/libuv-v1.44.1/src/unix/async.c:163:5 (BuildId: 120c450d14885aa5308bc95c4ea77de2c2b1cc36)
#13 isc_loopmgr_run lib/isc/loop.c:473:2 (BuildId: da417881a15b47891f3b60c2e3b71c7ee8d91d1c)
#14 main bin/named/main.c:1513:2 (BuildId: e22f5494ad4763562b247402252f579d302d266b)
Mutex M2 (0x000000000023) created at:
#0 pthread_mutex_init <null> (BuildId: e22f5494ad4763562b247402252f579d302d266b)
#1 dns_view_create lib/dns/view.c:133:2 (BuildId: ed6942e73cb749ba369cb30e2b8cbff55912936c)
#2 create_view bin/named/server.c:6440:11 (BuildId: e22f5494ad4763562b247402252f579d302d266b)
#3 load_configuration bin/named/server.c:9141:12 (BuildId: e22f5494ad4763562b247402252f579d302d266b)
#4 loadconfig bin/named/server.c:10306:11 (BuildId: e22f5494ad4763562b247402252f579d302d266b)
#5 named_server_reconfigcommand bin/named/server.c:10712:2
#6 named_control_docommand bin/named/control.c:244:12 (BuildId: e22f5494ad4763562b247402252f579d302d266b)
#7 control_command bin/named/controlconf.c:385:17 (BuildId: e22f5494ad4763562b247402252f579d302d266b)
#8 isc__async_cb lib/isc/async.c:84:3 (BuildId: da417881a15b47891f3b60c2e3b71c7ee8d91d1c)
#9 uv__async_io /usr/src/libuv-v1.44.1/src/unix/async.c:163:5 (BuildId: 120c450d14885aa5308bc95c4ea77de2c2b1cc36)
#10 isc_loopmgr_run lib/isc/loop.c:473:2 (BuildId: da417881a15b47891f3b60c2e3b71c7ee8d91d1c)
#11 main bin/named/main.c:1513:2 (BuildId: e22f5494ad4763562b247402252f579d302d266b)
Mutex M2 (0x000000000026) created at:
#0 pthread_mutex_init <null> (BuildId: e22f5494ad4763562b247402252f579d302d266b)
#1 dns_zone_create lib/dns/zone.c:1124:2 (BuildId: ed6942e73cb749ba369cb30e2b8cbff55912936c)
#2 dns_zonemgr_createzone lib/dns/zone.c:18108:11 (BuildId: ed6942e73cb749ba369cb30e2b8cbff55912936c)
#3 configure_zone bin/named/server.c:6749:3 (BuildId: e22f5494ad4763562b247402252f579d302d266b)
#4 configure_view bin/named/server.c:4181:3 (BuildId: e22f5494ad4763562b247402252f579d302d266b)
#5 load_configuration bin/named/server.c:9194:12 (BuildId: e22f5494ad4763562b247402252f579d302d266b)
#6 run_server bin/named/server.c:9983:2 (BuildId: e22f5494ad4763562b247402252f579d302d266b)
#7 setup_jobs_cb lib/isc/loop.c:255:3 (BuildId: da417881a15b47891f3b60c2e3b71c7ee8d91d1c)
#8 isc__async_cb lib/isc/async.c:84:3 (BuildId: da417881a15b47891f3b60c2e3b71c7ee8d91d1c)
#9 uv__async_io /usr/src/libuv-v1.44.1/src/unix/async.c:163:5 (BuildId: 120c450d14885aa5308bc95c4ea77de2c2b1cc36)
#10 isc_loopmgr_run lib/isc/loop.c:473:2 (BuildId: da417881a15b47891f3b60c2e3b71c7ee8d91d1c)
#11 main bin/named/main.c:1513:2 (BuildId: e22f5494ad4763562b247402252f579d302d266b)
Thread T1 'isc-loop-0004' (running) created by main thread at:
#0 pthread_create <null> (BuildId: e22f5494ad4763562b247402252f579d302d266b)
#1 isc_thread_create lib/isc/thread.c:119:8 (BuildId: da417881a15b47891f3b60c2e3b71c7ee8d91d1c)
#2 isc_loopmgr_run lib/isc/loop.c:467:3 (BuildId: da417881a15b47891f3b60c2e3b71c7ee8d91d1c)
#3 main bin/named/main.c:1513:2 (BuildId: e22f5494ad4763562b247402252f579d302d266b)
SUMMARY: ThreadSanitizer: data race lib/dns/view.c:492:14 in dns_view_detach