data race lib/dns/zone.c:20592 in dns_zone_getxfr
Data race on v9.18-S in the statschannel
system test:
WARNING: ThreadSanitizer: data race
Read of size 8 at 0x000000000001 by thread T0001 (mutexes: read M0001, read M0002, write M0003):
#0 dns_zone_getxfr lib/dns/zone.c:20592 (BuildId: 8bfc1bd733df6d220add279c48e3c1cbfec13860)
#1 xfrin_xmlrender bin/named/statschannel.c:2017 (BuildId: 30b1d19e982f6157a1947131fd42a646d658f9d6)
#2 dns_zt_apply lib/dns/zt.c:553 (BuildId: 8bfc1bd733df6d220add279c48e3c1cbfec13860)
#3 generatexml bin/named/statschannel.c:2546 (BuildId: 30b1d19e982f6157a1947131fd42a646d658f9d6)
#4 render_xml bin/named/statschannel.c:2676 (BuildId: 30b1d19e982f6157a1947131fd42a646d658f9d6)
#5 render_xml_xfrins bin/named/statschannel.c:2746 (BuildId: 30b1d19e982f6157a1947131fd42a646d658f9d6)
#6 prepare_response lib/isc/httpd.c:821 (BuildId: 845c17593d8d6a439fd6819409e0d0939fb349ae)
#7 httpd_request lib/isc/httpd.c:982
#8 isc__nm_async_readcb netmgr/netmgr.c:2954 (BuildId: 845c17593d8d6a439fd6819409e0d0939fb349ae)
#9 isc__nm_readcb netmgr/netmgr.c:2927 (BuildId: 845c17593d8d6a439fd6819409e0d0939fb349ae)
#10 isc__nm_tcp_read_cb netmgr/tcp.c:904 (BuildId: 845c17593d8d6a439fd6819409e0d0939fb349ae)
#11 uv__read src/unix/stream.c:1148 (BuildId: 6a3f481774236f3126ac3ef5f5785b3bcc868d85)
#12 uv__stream_io src/unix/stream.c:1208 (BuildId: 6a3f481774236f3126ac3ef5f5785b3bcc868d85)
#13 uv__io_poll src/unix/linux.c:1564 (BuildId: 6a3f481774236f3126ac3ef5f5785b3bcc868d85)
#14 uv_run src/unix/core.c:458 (BuildId: 6a3f481774236f3126ac3ef5f5785b3bcc868d85)
#15 nm_thread netmgr/netmgr.c:711 (BuildId: 845c17593d8d6a439fd6819409e0d0939fb349ae)
#16 isc__trampoline_run lib/isc/trampoline.c:190 (BuildId: 845c17593d8d6a439fd6819409e0d0939fb349ae)
Previous write of size 8 at 0x000000000001 by thread T0002:
#0 dns_xfrin_create lib/dns/xfrin.c:743 (BuildId: 8bfc1bd733df6d220add279c48e3c1cbfec13860)
#1 got_transfer_quota lib/dns/zone.c:18738 (BuildId: 8bfc1bd733df6d220add279c48e3c1cbfec13860)
#2 task_run lib/isc/task.c:832 (BuildId: 845c17593d8d6a439fd6819409e0d0939fb349ae)
#3 isc_task_run lib/isc/task.c:913
#4 isc__nm_async_task netmgr/netmgr.c:867 (BuildId: 845c17593d8d6a439fd6819409e0d0939fb349ae)
#5 process_netievent netmgr/netmgr.c:949 (BuildId: 845c17593d8d6a439fd6819409e0d0939fb349ae)
#6 process_queue netmgr/netmgr.c:1042 (BuildId: 845c17593d8d6a439fd6819409e0d0939fb349ae)
#7 process_all_queues netmgr/netmgr.c:780 (BuildId: 845c17593d8d6a439fd6819409e0d0939fb349ae)
#8 async_cb netmgr/netmgr.c:809
#9 uv__async_io src/unix/async.c:176 (BuildId: 6a3f481774236f3126ac3ef5f5785b3bcc868d85)
#10 uv__async_io src/unix/async.c:140 (BuildId: 6a3f481774236f3126ac3ef5f5785b3bcc868d85)
#11 uv__io_poll src/unix/linux.c:1564 (BuildId: 6a3f481774236f3126ac3ef5f5785b3bcc868d85)
#12 uv_run src/unix/core.c:458 (BuildId: 6a3f481774236f3126ac3ef5f5785b3bcc868d85)
#13 nm_thread netmgr/netmgr.c:711 (BuildId: 845c17593d8d6a439fd6819409e0d0939fb349ae)
#14 isc__trampoline_run lib/isc/trampoline.c:190 (BuildId: 845c17593d8d6a439fd6819409e0d0939fb349ae)
Location is heap block of size 3352 at 0x000000000027 allocated by thread T0001:
#0 malloc <null> (BuildId: c8455fafa477dccacaa74df59b23caba0427f5bf)
#1 mallocx lib/isc/jemalloc_shim.h:43 (BuildId: 845c17593d8d6a439fd6819409e0d0939fb349ae)
#2 mem_get lib/isc/mem.c:352
#3 isc__mem_get lib/isc/mem.c:825 (BuildId: 845c17593d8d6a439fd6819409e0d0939fb349ae)
#4 dns_zone_create lib/dns/zone.c:1148 (BuildId: 8bfc1bd733df6d220add279c48e3c1cbfec13860)
#5 dns_zonemgr_createzone lib/dns/zone.c:19451 (BuildId: 8bfc1bd733df6d220add279c48e3c1cbfec13860)
#6 configure_zone bin/named/server.c:7154 (BuildId: 30b1d19e982f6157a1947131fd42a646d658f9d6)
#7 configure_view bin/named/server.c:4482 (BuildId: 30b1d19e982f6157a1947131fd42a646d658f9d6)
#8 load_configuration bin/named/server.c:9709 (BuildId: 30b1d19e982f6157a1947131fd42a646d658f9d6)
#9 run_server bin/named/server.c:10446 (BuildId: 30b1d19e982f6157a1947131fd42a646d658f9d6)
#10 task_run lib/isc/task.c:832 (BuildId: 845c17593d8d6a439fd6819409e0d0939fb349ae)
#11 isc_task_run lib/isc/task.c:913
#12 isc__nm_async_task netmgr/netmgr.c:867 (BuildId: 845c17593d8d6a439fd6819409e0d0939fb349ae)
#13 process_netievent netmgr/netmgr.c:949 (BuildId: 845c17593d8d6a439fd6819409e0d0939fb349ae)
#14 process_queue netmgr/netmgr.c:1042 (BuildId: 845c17593d8d6a439fd6819409e0d0939fb349ae)
#15 process_all_queues netmgr/netmgr.c:780 (BuildId: 845c17593d8d6a439fd6819409e0d0939fb349ae)
#16 async_cb netmgr/netmgr.c:809
#17 uv__async_io src/unix/async.c:176 (BuildId: 6a3f481774236f3126ac3ef5f5785b3bcc868d85)
#18 uv__async_io src/unix/async.c:140 (BuildId: 6a3f481774236f3126ac3ef5f5785b3bcc868d85)
#19 uv__io_poll src/unix/linux.c:1564 (BuildId: 6a3f481774236f3126ac3ef5f5785b3bcc868d85)
#20 uv_run src/unix/core.c:458 (BuildId: 6a3f481774236f3126ac3ef5f5785b3bcc868d85)
#21 nm_thread netmgr/netmgr.c:711 (BuildId: 845c17593d8d6a439fd6819409e0d0939fb349ae)
#22 isc__trampoline_run lib/isc/trampoline.c:190 (BuildId: 845c17593d8d6a439fd6819409e0d0939fb349ae)
Mutex M0001 (0x000000000037) created at:
#0 pthread_rwlock_init <null> (BuildId: c8455fafa477dccacaa74df59b23caba0427f5bf)
#1 isc_rwlock_init lib/isc/rwlock.c:40 (BuildId: 845c17593d8d6a439fd6819409e0d0939fb349ae)
#2 dns_zt_create lib/dns/zt.c:99 (BuildId: 8bfc1bd733df6d220add279c48e3c1cbfec13860)
#3 dns_view_create lib/dns/view.c:132 (BuildId: 8bfc1bd733df6d220add279c48e3c1cbfec13860)
#4 create_view bin/named/server.c:6819 (BuildId: 30b1d19e982f6157a1947131fd42a646d658f9d6)
#5 load_configuration bin/named/server.c:9663 (BuildId: 30b1d19e982f6157a1947131fd42a646d658f9d6)
#6 run_server bin/named/server.c:10446 (BuildId: 30b1d19e982f6157a1947131fd42a646d658f9d6)
#7 task_run lib/isc/task.c:832 (BuildId: 845c17593d8d6a439fd6819409e0d0939fb349ae)
#8 isc_task_run lib/isc/task.c:913
#9 isc__nm_async_task netmgr/netmgr.c:867 (BuildId: 845c17593d8d6a439fd6819409e0d0939fb349ae)
#10 process_netievent netmgr/netmgr.c:949 (BuildId: 845c17593d8d6a439fd6819409e0d0939fb349ae)
#11 process_queue netmgr/netmgr.c:1042 (BuildId: 845c17593d8d6a439fd6819409e0d0939fb349ae)
#12 process_all_queues netmgr/netmgr.c:780 (BuildId: 845c17593d8d6a439fd6819409e0d0939fb349ae)
#13 async_cb netmgr/netmgr.c:809
#14 uv__async_io src/unix/async.c:176 (BuildId: 6a3f481774236f3126ac3ef5f5785b3bcc868d85)
#15 uv__async_io src/unix/async.c:140 (BuildId: 6a3f481774236f3126ac3ef5f5785b3bcc868d85)
#16 uv__io_poll src/unix/linux.c:1564 (BuildId: 6a3f481774236f3126ac3ef5f5785b3bcc868d85)
#17 uv_run src/unix/core.c:458 (BuildId: 6a3f481774236f3126ac3ef5f5785b3bcc868d85)
#18 nm_thread netmgr/netmgr.c:711 (BuildId: 845c17593d8d6a439fd6819409e0d0939fb349ae)
#19 isc__trampoline_run lib/isc/trampoline.c:190 (BuildId: 845c17593d8d6a439fd6819409e0d0939fb349ae)
Mutex M0002 (0x000000000044) created at:
#0 pthread_rwlock_init <null> (BuildId: c8455fafa477dccacaa74df59b23caba0427f5bf)
#1 isc_rwlock_init lib/isc/rwlock.c:40 (BuildId: 845c17593d8d6a439fd6819409e0d0939fb349ae)
#2 dns_zonemgr_create lib/dns/zone.c:19337 (BuildId: 8bfc1bd733df6d220add279c48e3c1cbfec13860)
#3 named_server_create bin/named/server.c:10673 (BuildId: 30b1d19e982f6157a1947131fd42a646d658f9d6)
#4 setup bin/named/main.c:1339 (BuildId: 30b1d19e982f6157a1947131fd42a646d658f9d6)
#5 main bin/named/main.c:1598
Mutex M0003 (0x000000000048) created at:
#0 pthread_mutex_init <null> (BuildId: c8455fafa477dccacaa74df59b23caba0427f5bf)
#1 isc__mutex_init lib/isc/mutex.c:49 (BuildId: 845c17593d8d6a439fd6819409e0d0939fb349ae)
#2 dns_zone_create lib/dns/zone.c:1153 (BuildId: 8bfc1bd733df6d220add279c48e3c1cbfec13860)
#3 dns_zonemgr_createzone lib/dns/zone.c:19451 (BuildId: 8bfc1bd733df6d220add279c48e3c1cbfec13860)
#4 configure_zone bin/named/server.c:7154 (BuildId: 30b1d19e982f6157a1947131fd42a646d658f9d6)
#5 configure_view bin/named/server.c:4482 (BuildId: 30b1d19e982f6157a1947131fd42a646d658f9d6)
#6 load_configuration bin/named/server.c:9709 (BuildId: 30b1d19e982f6157a1947131fd42a646d658f9d6)
#7 run_server bin/named/server.c:10446 (BuildId: 30b1d19e982f6157a1947131fd42a646d658f9d6)
#8 task_run lib/isc/task.c:832 (BuildId: 845c17593d8d6a439fd6819409e0d0939fb349ae)
#9 isc_task_run lib/isc/task.c:913
#10 isc__nm_async_task netmgr/netmgr.c:867 (BuildId: 845c17593d8d6a439fd6819409e0d0939fb349ae)
#11 process_netievent netmgr/netmgr.c:949 (BuildId: 845c17593d8d6a439fd6819409e0d0939fb349ae)
#12 process_queue netmgr/netmgr.c:1042 (BuildId: 845c17593d8d6a439fd6819409e0d0939fb349ae)
#13 process_all_queues netmgr/netmgr.c:780 (BuildId: 845c17593d8d6a439fd6819409e0d0939fb349ae)
#14 async_cb netmgr/netmgr.c:809
#15 uv__async_io src/unix/async.c:176 (BuildId: 6a3f481774236f3126ac3ef5f5785b3bcc868d85)
#16 uv__async_io src/unix/async.c:140 (BuildId: 6a3f481774236f3126ac3ef5f5785b3bcc868d85)
#17 uv__io_poll src/unix/linux.c:1564 (BuildId: 6a3f481774236f3126ac3ef5f5785b3bcc868d85)
#18 uv_run src/unix/core.c:458 (BuildId: 6a3f481774236f3126ac3ef5f5785b3bcc868d85)
#19 nm_thread netmgr/netmgr.c:711 (BuildId: 845c17593d8d6a439fd6819409e0d0939fb349ae)
#20 isc__trampoline_run lib/isc/trampoline.c:190 (BuildId: 845c17593d8d6a439fd6819409e0d0939fb349ae)
Thread T0001 (running) created by main thread at:
#0 pthread_create <null> (BuildId: c8455fafa477dccacaa74df59b23caba0427f5bf)
#1 isc_thread_create lib/isc/thread.c:73 (BuildId: 845c17593d8d6a439fd6819409e0d0939fb349ae)
#2 isc__netmgr_create netmgr/netmgr.c:324 (BuildId: 845c17593d8d6a439fd6819409e0d0939fb349ae)
#3 isc_managers_create lib/isc/managers.c:31 (BuildId: 845c17593d8d6a439fd6819409e0d0939fb349ae)
#4 create_managers bin/named/main.c:1046 (BuildId: 30b1d19e982f6157a1947131fd42a646d658f9d6)
#5 setup bin/named/main.c:1317
#6 main bin/named/main.c:1598
Thread T0002 (running) created by main thread at:
#0 pthread_create <null> (BuildId: c8455fafa477dccacaa74df59b23caba0427f5bf)
#1 isc_thread_create lib/isc/thread.c:73 (BuildId: 845c17593d8d6a439fd6819409e0d0939fb349ae)
#2 isc__netmgr_create netmgr/netmgr.c:324 (BuildId: 845c17593d8d6a439fd6819409e0d0939fb349ae)
#3 isc_managers_create lib/isc/managers.c:31 (BuildId: 845c17593d8d6a439fd6819409e0d0939fb349ae)
#4 create_managers bin/named/main.c:1046 (BuildId: 30b1d19e982f6157a1947131fd42a646d658f9d6)
#5 setup bin/named/main.c:1317
#6 main bin/named/main.c:1598
SUMMARY: ThreadSanitizer: data race lib/dns/zone.c:20592 in dns_zone_getxfr