ThreadSanitizer: data race xfrin.c:1555:2 in xfrin_send_request
In https://gitlab.isc.org/isc-projects/bind9/-/jobs/3873145 there are multiple data races reported between atomic_init
s in xfrin_send_request
and atomic reads initiated from the statistics channel.
==================
WARNING: ThreadSanitizer: data race (pid=385819)
Write of size 4 at 0x7b7400022a64 by thread T2:
#0 xfrin_send_request /builds/isc-projects/bind9/lib/dns/xfrin.c:1555:2 (libdns-9.19.20-dev.so+0x1f7b2e) (BuildId: bab2735a59e6298892dc0108d4f46c7950d0e6bf)
#1 xfrin_connect_done /builds/isc-projects/bind9/lib/dns/xfrin.c:1363:11 (libdns-9.19.20-dev.so+0x1f7b2e)
#2 tcp_connected /builds/isc-projects/bind9/lib/dns/dispatch.c:1851:3 (libdns-9.19.20-dev.so+0x63ad2) (BuildId: bab2735a59e6298892dc0108d4f46c7950d0e6bf)
#3 streamdns_call_connect_cb /builds/isc-projects/bind9/lib/isc/netmgr/streamdns.c:275:2 (libisc-9.19.20-dev.so+0x2ea89) (BuildId: d2abce56422ade191082159bc906918b88117875)
#4 streamdns_transport_connected /builds/isc-projects/bind9/lib/isc/netmgr/streamdns.c:348:2 (libisc-9.19.20-dev.so+0x2ea89)
#5 isc___nm_connectcb /builds/isc-projects/bind9/lib/isc/netmgr/netmgr.c:1825:2 (libisc-9.19.20-dev.so+0x1f65a) (BuildId: d2abce56422ade191082159bc906918b88117875)
#6 isc__nm_connectcb /builds/isc-projects/bind9/lib/isc/netmgr/netmgr.c:1840:3 (libisc-9.19.20-dev.so+0x1f65a)
#7 tcp_connect_cb /builds/isc-projects/bind9/lib/isc/netmgr/tcp.c:211:2 (libisc-9.19.20-dev.so+0x35c14) (BuildId: d2abce56422ade191082159bc906918b88117875)
#8 uv__stream_connect /usr/src/libuv-v1.47.0/src/unix/stream.c:1278:5 (libuv.so.1+0x24315) (BuildId: 32453d368d146743ff5ec25a0074aa9dace64c7c)
#9 thread_body /builds/isc-projects/bind9/lib/isc/thread.c:85:8 (libisc-9.19.20-dev.so+0x76420) (BuildId: d2abce56422ade191082159bc906918b88117875)
#10 thread_run /builds/isc-projects/bind9/lib/isc/thread.c:100:14 (libisc-9.19.20-dev.so+0x76420)
Previous atomic read of size 4 at 0x7b7400022a64 by main thread:
#0 dns_xfrin_getstats /builds/isc-projects/bind9/lib/dns/xfrin.c:1016:2 (libdns-9.19.20-dev.so+0x1f6029) (BuildId: bab2735a59e6298892dc0108d4f46c7950d0e6bf)
#1 xfrin_jsonrender /builds/isc-projects/bind9/bin/named/statschannel.c:2735:3 (named+0x150aeb) (BuildId: d5303820077a5b152a0a5e70881da5cdadd80ee3)
#2 dns_zt_apply /builds/isc-projects/bind9/lib/dns/zt.c:524:12 (libdns-9.19.20-dev.so+0x254308) (BuildId: bab2735a59e6298892dc0108d4f46c7950d0e6bf)
#3 generatejson /builds/isc-projects/bind9/bin/named/statschannel.c:3021:5 (named+0x14dd6c) (BuildId: d5303820077a5b152a0a5e70881da5cdadd80ee3)
#4 render_json /builds/isc-projects/bind9/bin/named/statschannel.c:3351:11 (named+0x14dd6c)
#5 render_json_xfrins /builds/isc-projects/bind9/bin/named/statschannel.c:3421:10 (named+0x14a40a) (BuildId: d5303820077a5b152a0a5e70881da5cdadd80ee3)
#6 prepare_response /builds/isc-projects/bind9/lib/isc/httpd.c:790:12 (libisc-9.19.20-dev.so+0x4fab7) (BuildId: d2abce56422ade191082159bc906918b88117875)
#7 httpd_request /builds/isc-projects/bind9/lib/isc/httpd.c:944:2 (libisc-9.19.20-dev.so+0x4fab7)
#8 isc___nm_readcb /builds/isc-projects/bind9/lib/isc/netmgr/netmgr.c:1854:2 (libisc-9.19.20-dev.so+0x204d0) (BuildId: d2abce56422ade191082159bc906918b88117875)
#9 isc__nm_readcb /builds/isc-projects/bind9/lib/isc/netmgr/netmgr.c:1869:3 (libisc-9.19.20-dev.so+0x204d0)
#10 isc__nm_tcp_read_cb /builds/isc-projects/bind9/lib/isc/netmgr/tcp.c:773:2 (libisc-9.19.20-dev.so+0x34b0d) (BuildId: d2abce56422ade191082159bc906918b88117875)
#11 uv__read /usr/src/libuv-v1.47.0/src/unix/stream.c:1143:7 (libuv.so.1+0x23d89) (BuildId: 32453d368d146743ff5ec25a0074aa9dace64c7c)
#12 thread_body /builds/isc-projects/bind9/lib/isc/thread.c:85:8 (libisc-9.19.20-dev.so+0x76157) (BuildId: d2abce56422ade191082159bc906918b88117875)
#13 isc_thread_main /builds/isc-projects/bind9/lib/isc/thread.c:116:2 (libisc-9.19.20-dev.so+0x76157)
#14 isc_loopmgr_run /builds/isc-projects/bind9/lib/isc/loop.c:454:2 (libisc-9.19.20-dev.so+0x5cbf2) (BuildId: d2abce56422ade191082159bc906918b88117875)
#15 main /builds/isc-projects/bind9/bin/named/main.c:1574:2 (named+0x10ef71) (BuildId: d5303820077a5b152a0a5e70881da5cdadd80ee3)
Location is heap block of size 2440 at 0x7b7400022600 allocated by thread T2:
#0 malloc <null> (named+0x74bbc) (BuildId: d5303820077a5b152a0a5e70881da5cdadd80ee3)
#1 mallocx /builds/isc-projects/bind9/lib/isc/./jemalloc_shim.h:67:14 (libisc-9.19.20-dev.so+0x60180) (BuildId: d2abce56422ade191082159bc906918b88117875)
#2 mem_get /builds/isc-projects/bind9/lib/isc/mem.c:303:8 (libisc-9.19.20-dev.so+0x60180)
#3 isc__mem_get /builds/isc-projects/bind9/lib/isc/mem.c:675:8 (libisc-9.19.20-dev.so+0x600ca) (BuildId: d2abce56422ade191082159bc906918b88117875)
#4 xfrin_create /builds/isc-projects/bind9/lib/dns/xfrin.c:1154:8 (libdns-9.19.20-dev.so+0x1f51d6) (BuildId: bab2735a59e6298892dc0108d4f46c7950d0e6bf)
#5 dns_xfrin_create /builds/isc-projects/bind9/lib/dns/xfrin.c:903:2 (libdns-9.19.20-dev.so+0x1f51d6)
#6 got_transfer_quota /builds/isc-projects/bind9/lib/dns/zone.c:17878:11 (libdns-9.19.20-dev.so+0x22c620) (BuildId: bab2735a59e6298892dc0108d4f46c7950d0e6bf)
#7 isc__async_cb /builds/isc-projects/bind9/lib/isc/async.c:111:3 (libisc-9.19.20-dev.so+0x4027a) (BuildId: d2abce56422ade191082159bc906918b88117875)
#8 uv__async_io /usr/src/libuv-v1.47.0/src/unix/async.c:176:5 (libuv.so.1+0x11f3c) (BuildId: 32453d368d146743ff5ec25a0074aa9dace64c7c)
#9 thread_body /builds/isc-projects/bind9/lib/isc/thread.c:85:8 (libisc-9.19.20-dev.so+0x76420) (BuildId: d2abce56422ade191082159bc906918b88117875)
#10 thread_run /builds/isc-projects/bind9/lib/isc/thread.c:100:14 (libisc-9.19.20-dev.so+0x76420)
Thread T2 'isc-loop-0002' (tid=385839, running) created by main thread at:
#0 pthread_create <null> (named+0x7679b) (BuildId: d5303820077a5b152a0a5e70881da5cdadd80ee3)
#1 isc_thread_create /builds/isc-projects/bind9/lib/isc/thread.c:139:8 (libisc-9.19.20-dev.so+0x76277) (BuildId: d2abce56422ade191082159bc906918b88117875)
#2 isc_loopmgr_run /builds/isc-projects/bind9/lib/isc/loop.c:448:3 (libisc-9.19.20-dev.so+0x5cb79) (BuildId: d2abce56422ade191082159bc906918b88117875)
#3 main /builds/isc-projects/bind9/bin/named/main.c:1574:2 (named+0x10ef71) (BuildId: d5303820077a5b152a0a5e70881da5cdadd80ee3)
SUMMARY: ThreadSanitizer: data race /builds/isc-projects/bind9/lib/dns/xfrin.c:1555:2 in xfrin_send_request
==================
==================
WARNING: ThreadSanitizer: data race (pid=385819)
Write of size 4 at 0x7b7400022a68 by thread T2:
#0 xfrin_send_request /builds/isc-projects/bind9/lib/dns/xfrin.c:1556:2 (libdns-9.19.20-dev.so+0x1f7b44) (BuildId: bab2735a59e6298892dc0108d4f46c7950d0e6bf)
#1 xfrin_connect_done /builds/isc-projects/bind9/lib/dns/xfrin.c:1363:11 (libdns-9.19.20-dev.so+0x1f7b44)
#2 tcp_connected /builds/isc-projects/bind9/lib/dns/dispatch.c:1851:3 (libdns-9.19.20-dev.so+0x63ad2) (BuildId: bab2735a59e6298892dc0108d4f46c7950d0e6bf)
#3 streamdns_call_connect_cb /builds/isc-projects/bind9/lib/isc/netmgr/streamdns.c:275:2 (libisc-9.19.20-dev.so+0x2ea89) (BuildId: d2abce56422ade191082159bc906918b88117875)
#4 streamdns_transport_connected /builds/isc-projects/bind9/lib/isc/netmgr/streamdns.c:348:2 (libisc-9.19.20-dev.so+0x2ea89)
#5 isc___nm_connectcb /builds/isc-projects/bind9/lib/isc/netmgr/netmgr.c:1825:2 (libisc-9.19.20-dev.so+0x1f65a) (BuildId: d2abce56422ade191082159bc906918b88117875)
#6 isc__nm_connectcb /builds/isc-projects/bind9/lib/isc/netmgr/netmgr.c:1840:3 (libisc-9.19.20-dev.so+0x1f65a)
#7 tcp_connect_cb /builds/isc-projects/bind9/lib/isc/netmgr/tcp.c:211:2 (libisc-9.19.20-dev.so+0x35c14) (BuildId: d2abce56422ade191082159bc906918b88117875)
#8 uv__stream_connect /usr/src/libuv-v1.47.0/src/unix/stream.c:1278:5 (libuv.so.1+0x24315) (BuildId: 32453d368d146743ff5ec25a0074aa9dace64c7c)
#9 thread_body /builds/isc-projects/bind9/lib/isc/thread.c:85:8 (libisc-9.19.20-dev.so+0x76420) (BuildId: d2abce56422ade191082159bc906918b88117875)
#10 thread_run /builds/isc-projects/bind9/lib/isc/thread.c:100:14 (libisc-9.19.20-dev.so+0x76420)
Previous atomic read of size 4 at 0x7b7400022a68 by main thread:
#0 dns_xfrin_getstats /builds/isc-projects/bind9/lib/dns/xfrin.c:1017:2 (libdns-9.19.20-dev.so+0x1f604d) (BuildId: bab2735a59e6298892dc0108d4f46c7950d0e6bf)
#1 xfrin_jsonrender /builds/isc-projects/bind9/bin/named/statschannel.c:2735:3 (named+0x150aeb) (BuildId: d5303820077a5b152a0a5e70881da5cdadd80ee3)
#2 dns_zt_apply /builds/isc-projects/bind9/lib/dns/zt.c:524:12 (libdns-9.19.20-dev.so+0x254308) (BuildId: bab2735a59e6298892dc0108d4f46c7950d0e6bf)
#3 generatejson /builds/isc-projects/bind9/bin/named/statschannel.c:3021:5 (named+0x14dd6c) (BuildId: d5303820077a5b152a0a5e70881da5cdadd80ee3)
#4 render_json /builds/isc-projects/bind9/bin/named/statschannel.c:3351:11 (named+0x14dd6c)
#5 render_json_xfrins /builds/isc-projects/bind9/bin/named/statschannel.c:3421:10 (named+0x14a40a) (BuildId: d5303820077a5b152a0a5e70881da5cdadd80ee3)
#6 prepare_response /builds/isc-projects/bind9/lib/isc/httpd.c:790:12 (libisc-9.19.20-dev.so+0x4fab7) (BuildId: d2abce56422ade191082159bc906918b88117875)
#7 httpd_request /builds/isc-projects/bind9/lib/isc/httpd.c:944:2 (libisc-9.19.20-dev.so+0x4fab7)
#8 isc___nm_readcb /builds/isc-projects/bind9/lib/isc/netmgr/netmgr.c:1854:2 (libisc-9.19.20-dev.so+0x204d0) (BuildId: d2abce56422ade191082159bc906918b88117875)
#9 isc__nm_readcb /builds/isc-projects/bind9/lib/isc/netmgr/netmgr.c:1869:3 (libisc-9.19.20-dev.so+0x204d0)
#10 isc__nm_tcp_read_cb /builds/isc-projects/bind9/lib/isc/netmgr/tcp.c:773:2 (libisc-9.19.20-dev.so+0x34b0d) (BuildId: d2abce56422ade191082159bc906918b88117875)
#11 uv__read /usr/src/libuv-v1.47.0/src/unix/stream.c:1143:7 (libuv.so.1+0x23d89) (BuildId: 32453d368d146743ff5ec25a0074aa9dace64c7c)
#12 thread_body /builds/isc-projects/bind9/lib/isc/thread.c:85:8 (libisc-9.19.20-dev.so+0x76157) (BuildId: d2abce56422ade191082159bc906918b88117875)
#13 isc_thread_main /builds/isc-projects/bind9/lib/isc/thread.c:116:2 (libisc-9.19.20-dev.so+0x76157)
#14 isc_loopmgr_run /builds/isc-projects/bind9/lib/isc/loop.c:454:2 (libisc-9.19.20-dev.so+0x5cbf2) (BuildId: d2abce56422ade191082159bc906918b88117875)
#15 main /builds/isc-projects/bind9/bin/named/main.c:1574:2 (named+0x10ef71) (BuildId: d5303820077a5b152a0a5e70881da5cdadd80ee3)
Location is heap block of size 2440 at 0x7b7400022600 allocated by thread T2:
#0 malloc <null> (named+0x74bbc) (BuildId: d5303820077a5b152a0a5e70881da5cdadd80ee3)
#1 mallocx /builds/isc-projects/bind9/lib/isc/./jemalloc_shim.h:67:14 (libisc-9.19.20-dev.so+0x60180) (BuildId: d2abce56422ade191082159bc906918b88117875)
#2 mem_get /builds/isc-projects/bind9/lib/isc/mem.c:303:8 (libisc-9.19.20-dev.so+0x60180)
#3 isc__mem_get /builds/isc-projects/bind9/lib/isc/mem.c:675:8 (libisc-9.19.20-dev.so+0x600ca) (BuildId: d2abce56422ade191082159bc906918b88117875)
#4 xfrin_create /builds/isc-projects/bind9/lib/dns/xfrin.c:1154:8 (libdns-9.19.20-dev.so+0x1f51d6) (BuildId: bab2735a59e6298892dc0108d4f46c7950d0e6bf)
#5 dns_xfrin_create /builds/isc-projects/bind9/lib/dns/xfrin.c:903:2 (libdns-9.19.20-dev.so+0x1f51d6)
#6 got_transfer_quota /builds/isc-projects/bind9/lib/dns/zone.c:17878:11 (libdns-9.19.20-dev.so+0x22c620) (BuildId: bab2735a59e6298892dc0108d4f46c7950d0e6bf)
#7 isc__async_cb /builds/isc-projects/bind9/lib/isc/async.c:111:3 (libisc-9.19.20-dev.so+0x4027a) (BuildId: d2abce56422ade191082159bc906918b88117875)
#8 uv__async_io /usr/src/libuv-v1.47.0/src/unix/async.c:176:5 (libuv.so.1+0x11f3c) (BuildId: 32453d368d146743ff5ec25a0074aa9dace64c7c)
#9 thread_body /builds/isc-projects/bind9/lib/isc/thread.c:85:8 (libisc-9.19.20-dev.so+0x76420) (BuildId: d2abce56422ade191082159bc906918b88117875)
#10 thread_run /builds/isc-projects/bind9/lib/isc/thread.c:100:14 (libisc-9.19.20-dev.so+0x76420)
Thread T2 'isc-loop-0002' (tid=385839, running) created by main thread at:
#0 pthread_create <null> (named+0x7679b) (BuildId: d5303820077a5b152a0a5e70881da5cdadd80ee3)
#1 isc_thread_create /builds/isc-projects/bind9/lib/isc/thread.c:139:8 (libisc-9.19.20-dev.so+0x76277) (BuildId: d2abce56422ade191082159bc906918b88117875)
#2 isc_loopmgr_run /builds/isc-projects/bind9/lib/isc/loop.c:448:3 (libisc-9.19.20-dev.so+0x5cb79) (BuildId: d2abce56422ade191082159bc906918b88117875)
#3 main /builds/isc-projects/bind9/bin/named/main.c:1574:2 (named+0x10ef71) (BuildId: d5303820077a5b152a0a5e70881da5cdadd80ee3)
SUMMARY: ThreadSanitizer: data race /builds/isc-projects/bind9/lib/dns/xfrin.c:1556:2 in xfrin_send_request
==================
==================
WARNING: ThreadSanitizer: data race (pid=385819)
Write of size 8 at 0x7b7400022a70 by thread T2:
#0 xfrin_send_request /builds/isc-projects/bind9/lib/dns/xfrin.c:1557:2 (libdns-9.19.20-dev.so+0x1f7b5a) (BuildId: bab2735a59e6298892dc0108d4f46c7950d0e6bf)
#1 xfrin_connect_done /builds/isc-projects/bind9/lib/dns/xfrin.c:1363:11 (libdns-9.19.20-dev.so+0x1f7b5a)
#2 tcp_connected /builds/isc-projects/bind9/lib/dns/dispatch.c:1851:3 (libdns-9.19.20-dev.so+0x63ad2) (BuildId: bab2735a59e6298892dc0108d4f46c7950d0e6bf)
#3 streamdns_call_connect_cb /builds/isc-projects/bind9/lib/isc/netmgr/streamdns.c:275:2 (libisc-9.19.20-dev.so+0x2ea89) (BuildId: d2abce56422ade191082159bc906918b88117875)
#4 streamdns_transport_connected /builds/isc-projects/bind9/lib/isc/netmgr/streamdns.c:348:2 (libisc-9.19.20-dev.so+0x2ea89)
#5 isc___nm_connectcb /builds/isc-projects/bind9/lib/isc/netmgr/netmgr.c:1825:2 (libisc-9.19.20-dev.so+0x1f65a) (BuildId: d2abce56422ade191082159bc906918b88117875)
#6 isc__nm_connectcb /builds/isc-projects/bind9/lib/isc/netmgr/netmgr.c:1840:3 (libisc-9.19.20-dev.so+0x1f65a)
#7 tcp_connect_cb /builds/isc-projects/bind9/lib/isc/netmgr/tcp.c:211:2 (libisc-9.19.20-dev.so+0x35c14) (BuildId: d2abce56422ade191082159bc906918b88117875)
#8 uv__stream_connect /usr/src/libuv-v1.47.0/src/unix/stream.c:1278:5 (libuv.so.1+0x24315) (BuildId: 32453d368d146743ff5ec25a0074aa9dace64c7c)
#9 thread_body /builds/isc-projects/bind9/lib/isc/thread.c:85:8 (libisc-9.19.20-dev.so+0x76420) (BuildId: d2abce56422ade191082159bc906918b88117875)
#10 thread_run /builds/isc-projects/bind9/lib/isc/thread.c:100:14 (libisc-9.19.20-dev.so+0x76420)
Previous atomic read of size 8 at 0x7b7400022a70 by main thread:
#0 dns_xfrin_getstats /builds/isc-projects/bind9/lib/dns/xfrin.c:1018:2 (libdns-9.19.20-dev.so+0x1f6070) (BuildId: bab2735a59e6298892dc0108d4f46c7950d0e6bf)
#1 xfrin_jsonrender /builds/isc-projects/bind9/bin/named/statschannel.c:2735:3 (named+0x150aeb) (BuildId: d5303820077a5b152a0a5e70881da5cdadd80ee3)
#2 dns_zt_apply /builds/isc-projects/bind9/lib/dns/zt.c:524:12 (libdns-9.19.20-dev.so+0x254308) (BuildId: bab2735a59e6298892dc0108d4f46c7950d0e6bf)
#3 generatejson /builds/isc-projects/bind9/bin/named/statschannel.c:3021:5 (named+0x14dd6c) (BuildId: d5303820077a5b152a0a5e70881da5cdadd80ee3)
#4 render_json /builds/isc-projects/bind9/bin/named/statschannel.c:3351:11 (named+0x14dd6c)
#5 render_json_xfrins /builds/isc-projects/bind9/bin/named/statschannel.c:3421:10 (named+0x14a40a) (BuildId: d5303820077a5b152a0a5e70881da5cdadd80ee3)
#6 prepare_response /builds/isc-projects/bind9/lib/isc/httpd.c:790:12 (libisc-9.19.20-dev.so+0x4fab7) (BuildId: d2abce56422ade191082159bc906918b88117875)
#7 httpd_request /builds/isc-projects/bind9/lib/isc/httpd.c:944:2 (libisc-9.19.20-dev.so+0x4fab7)
#8 isc___nm_readcb /builds/isc-projects/bind9/lib/isc/netmgr/netmgr.c:1854:2 (libisc-9.19.20-dev.so+0x204d0) (BuildId: d2abce56422ade191082159bc906918b88117875)
#9 isc__nm_readcb /builds/isc-projects/bind9/lib/isc/netmgr/netmgr.c:1869:3 (libisc-9.19.20-dev.so+0x204d0)
#10 isc__nm_tcp_read_cb /builds/isc-projects/bind9/lib/isc/netmgr/tcp.c:773:2 (libisc-9.19.20-dev.so+0x34b0d) (BuildId: d2abce56422ade191082159bc906918b88117875)
#11 uv__read /usr/src/libuv-v1.47.0/src/unix/stream.c:1143:7 (libuv.so.1+0x23d89) (BuildId: 32453d368d146743ff5ec25a0074aa9dace64c7c)
#12 thread_body /builds/isc-projects/bind9/lib/isc/thread.c:85:8 (libisc-9.19.20-dev.so+0x76157) (BuildId: d2abce56422ade191082159bc906918b88117875)
#13 isc_thread_main /builds/isc-projects/bind9/lib/isc/thread.c:116:2 (libisc-9.19.20-dev.so+0x76157)
#14 isc_loopmgr_run /builds/isc-projects/bind9/lib/isc/loop.c:454:2 (libisc-9.19.20-dev.so+0x5cbf2) (BuildId: d2abce56422ade191082159bc906918b88117875)
#15 main /builds/isc-projects/bind9/bin/named/main.c:1574:2 (named+0x10ef71) (BuildId: d5303820077a5b152a0a5e70881da5cdadd80ee3)
Location is heap block of size 2440 at 0x7b7400022600 allocated by thread T2:
#0 malloc <null> (named+0x74bbc) (BuildId: d5303820077a5b152a0a5e70881da5cdadd80ee3)
#1 mallocx /builds/isc-projects/bind9/lib/isc/./jemalloc_shim.h:67:14 (libisc-9.19.20-dev.so+0x60180) (BuildId: d2abce56422ade191082159bc906918b88117875)
#2 mem_get /builds/isc-projects/bind9/lib/isc/mem.c:303:8 (libisc-9.19.20-dev.so+0x60180)
#3 isc__mem_get /builds/isc-projects/bind9/lib/isc/mem.c:675:8 (libisc-9.19.20-dev.so+0x600ca) (BuildId: d2abce56422ade191082159bc906918b88117875)
#4 xfrin_create /builds/isc-projects/bind9/lib/dns/xfrin.c:1154:8 (libdns-9.19.20-dev.so+0x1f51d6) (BuildId: bab2735a59e6298892dc0108d4f46c7950d0e6bf)
#5 dns_xfrin_create /builds/isc-projects/bind9/lib/dns/xfrin.c:903:2 (libdns-9.19.20-dev.so+0x1f51d6)
#6 got_transfer_quota /builds/isc-projects/bind9/lib/dns/zone.c:17878:11 (libdns-9.19.20-dev.so+0x22c620) (BuildId: bab2735a59e6298892dc0108d4f46c7950d0e6bf)
#7 isc__async_cb /builds/isc-projects/bind9/lib/isc/async.c:111:3 (libisc-9.19.20-dev.so+0x4027a) (BuildId: d2abce56422ade191082159bc906918b88117875)
#8 uv__async_io /usr/src/libuv-v1.47.0/src/unix/async.c:176:5 (libuv.so.1+0x11f3c) (BuildId: 32453d368d146743ff5ec25a0074aa9dace64c7c)
#9 thread_body /builds/isc-projects/bind9/lib/isc/thread.c:85:8 (libisc-9.19.20-dev.so+0x76420) (BuildId: d2abce56422ade191082159bc906918b88117875)
#10 thread_run /builds/isc-projects/bind9/lib/isc/thread.c:100:14 (libisc-9.19.20-dev.so+0x76420)
Thread T2 'isc-loop-0002' (tid=385839, running) created by main thread at:
#0 pthread_create <null> (named+0x7679b) (BuildId: d5303820077a5b152a0a5e70881da5cdadd80ee3)
#1 isc_thread_create /builds/isc-projects/bind9/lib/isc/thread.c:139:8 (libisc-9.19.20-dev.so+0x76277) (BuildId: d2abce56422ade191082159bc906918b88117875)
#2 isc_loopmgr_run /builds/isc-projects/bind9/lib/isc/loop.c:448:3 (libisc-9.19.20-dev.so+0x5cb79) (BuildId: d2abce56422ade191082159bc906918b88117875)
#3 main /builds/isc-projects/bind9/bin/named/main.c:1574:2 (named+0x10ef71) (BuildId: d5303820077a5b152a0a5e70881da5cdadd80ee3)
SUMMARY: ThreadSanitizer: data race /builds/isc-projects/bind9/lib/dns/xfrin.c:1557:2 in xfrin_send_request
==================
==================
WARNING: ThreadSanitizer: data race (pid=385819)
Write of size 8 at 0x7b7400022a78 by thread T2:
#0 xfrin_send_request /builds/isc-projects/bind9/lib/dns/xfrin.c:1558:27 (libdns-9.19.20-dev.so+0x1f7b7c) (BuildId: bab2735a59e6298892dc0108d4f46c7950d0e6bf)
#1 xfrin_connect_done /builds/isc-projects/bind9/lib/dns/xfrin.c:1363:11 (libdns-9.19.20-dev.so+0x1f7b7c)
#2 tcp_connected /builds/isc-projects/bind9/lib/dns/dispatch.c:1851:3 (libdns-9.19.20-dev.so+0x63ad2) (BuildId: bab2735a59e6298892dc0108d4f46c7950d0e6bf)
#3 streamdns_call_connect_cb /builds/isc-projects/bind9/lib/isc/netmgr/streamdns.c:275:2 (libisc-9.19.20-dev.so+0x2ea89) (BuildId: d2abce56422ade191082159bc906918b88117875)
#4 streamdns_transport_connected /builds/isc-projects/bind9/lib/isc/netmgr/streamdns.c:348:2 (libisc-9.19.20-dev.so+0x2ea89)
#5 isc___nm_connectcb /builds/isc-projects/bind9/lib/isc/netmgr/netmgr.c:1825:2 (libisc-9.19.20-dev.so+0x1f65a) (BuildId: d2abce56422ade191082159bc906918b88117875)
#6 isc__nm_connectcb /builds/isc-projects/bind9/lib/isc/netmgr/netmgr.c:1840:3 (libisc-9.19.20-dev.so+0x1f65a)
#7 tcp_connect_cb /builds/isc-projects/bind9/lib/isc/netmgr/tcp.c:211:2 (libisc-9.19.20-dev.so+0x35c14) (BuildId: d2abce56422ade191082159bc906918b88117875)
#8 uv__stream_connect /usr/src/libuv-v1.47.0/src/unix/stream.c:1278:5 (libuv.so.1+0x24315) (BuildId: 32453d368d146743ff5ec25a0074aa9dace64c7c)
#9 thread_body /builds/isc-projects/bind9/lib/isc/thread.c:85:8 (libisc-9.19.20-dev.so+0x76420) (BuildId: d2abce56422ade191082159bc906918b88117875)
#10 thread_run /builds/isc-projects/bind9/lib/isc/thread.c:100:14 (libisc-9.19.20-dev.so+0x76420)
Previous atomic read of size 8 at 0x7b7400022a78 by main thread:
#0 dns_xfrin_getstarttime /builds/isc-projects/bind9/lib/dns/xfrin.c:955:10 (libdns-9.19.20-dev.so+0x1f5db5) (BuildId: bab2735a59e6298892dc0108d4f46c7950d0e6bf)
#1 xfrin_jsonrender /builds/isc-projects/bind9/bin/named/statschannel.c:2719:35 (named+0x150a5a) (BuildId: d5303820077a5b152a0a5e70881da5cdadd80ee3)
#2 dns_zt_apply /builds/isc-projects/bind9/lib/dns/zt.c:524:12 (libdns-9.19.20-dev.so+0x254308) (BuildId: bab2735a59e6298892dc0108d4f46c7950d0e6bf)
#3 generatejson /builds/isc-projects/bind9/bin/named/statschannel.c:3021:5 (named+0x14dd6c) (BuildId: d5303820077a5b152a0a5e70881da5cdadd80ee3)
#4 render_json /builds/isc-projects/bind9/bin/named/statschannel.c:3351:11 (named+0x14dd6c)
#5 render_json_xfrins /builds/isc-projects/bind9/bin/named/statschannel.c:3421:10 (named+0x14a40a) (BuildId: d5303820077a5b152a0a5e70881da5cdadd80ee3)
#6 prepare_response /builds/isc-projects/bind9/lib/isc/httpd.c:790:12 (libisc-9.19.20-dev.so+0x4fab7) (BuildId: d2abce56422ade191082159bc906918b88117875)
#7 httpd_request /builds/isc-projects/bind9/lib/isc/httpd.c:944:2 (libisc-9.19.20-dev.so+0x4fab7)
#8 isc___nm_readcb /builds/isc-projects/bind9/lib/isc/netmgr/netmgr.c:1854:2 (libisc-9.19.20-dev.so+0x204d0) (BuildId: d2abce56422ade191082159bc906918b88117875)
#9 isc__nm_readcb /builds/isc-projects/bind9/lib/isc/netmgr/netmgr.c:1869:3 (libisc-9.19.20-dev.so+0x204d0)
#10 isc__nm_tcp_read_cb /builds/isc-projects/bind9/lib/isc/netmgr/tcp.c:773:2 (libisc-9.19.20-dev.so+0x34b0d) (BuildId: d2abce56422ade191082159bc906918b88117875)
#11 uv__read /usr/src/libuv-v1.47.0/src/unix/stream.c:1143:7 (libuv.so.1+0x23d89) (BuildId: 32453d368d146743ff5ec25a0074aa9dace64c7c)
#12 thread_body /builds/isc-projects/bind9/lib/isc/thread.c:85:8 (libisc-9.19.20-dev.so+0x76157) (BuildId: d2abce56422ade191082159bc906918b88117875)
#13 isc_thread_main /builds/isc-projects/bind9/lib/isc/thread.c:116:2 (libisc-9.19.20-dev.so+0x76157)
#14 isc_loopmgr_run /builds/isc-projects/bind9/lib/isc/loop.c:454:2 (libisc-9.19.20-dev.so+0x5cbf2) (BuildId: d2abce56422ade191082159bc906918b88117875)
#15 main /builds/isc-projects/bind9/bin/named/main.c:1574:2 (named+0x10ef71) (BuildId: d5303820077a5b152a0a5e70881da5cdadd80ee3)
Location is heap block of size 2440 at 0x7b7400022600 allocated by thread T2:
#0 malloc <null> (named+0x74bbc) (BuildId: d5303820077a5b152a0a5e70881da5cdadd80ee3)
#1 mallocx /builds/isc-projects/bind9/lib/isc/./jemalloc_shim.h:67:14 (libisc-9.19.20-dev.so+0x60180) (BuildId: d2abce56422ade191082159bc906918b88117875)
#2 mem_get /builds/isc-projects/bind9/lib/isc/mem.c:303:8 (libisc-9.19.20-dev.so+0x60180)
#3 isc__mem_get /builds/isc-projects/bind9/lib/isc/mem.c:675:8 (libisc-9.19.20-dev.so+0x600ca) (BuildId: d2abce56422ade191082159bc906918b88117875)
#4 xfrin_create /builds/isc-projects/bind9/lib/dns/xfrin.c:1154:8 (libdns-9.19.20-dev.so+0x1f51d6) (BuildId: bab2735a59e6298892dc0108d4f46c7950d0e6bf)
#5 dns_xfrin_create /builds/isc-projects/bind9/lib/dns/xfrin.c:903:2 (libdns-9.19.20-dev.so+0x1f51d6)
#6 got_transfer_quota /builds/isc-projects/bind9/lib/dns/zone.c:17878:11 (libdns-9.19.20-dev.so+0x22c620) (BuildId: bab2735a59e6298892dc0108d4f46c7950d0e6bf)
#7 isc__async_cb /builds/isc-projects/bind9/lib/isc/async.c:111:3 (libisc-9.19.20-dev.so+0x4027a) (BuildId: d2abce56422ade191082159bc906918b88117875)
#8 uv__async_io /usr/src/libuv-v1.47.0/src/unix/async.c:176:5 (libuv.so.1+0x11f3c) (BuildId: 32453d368d146743ff5ec25a0074aa9dace64c7c)
#9 thread_body /builds/isc-projects/bind9/lib/isc/thread.c:85:8 (libisc-9.19.20-dev.so+0x76420) (BuildId: d2abce56422ade191082159bc906918b88117875)
#10 thread_run /builds/isc-projects/bind9/lib/isc/thread.c:100:14 (libisc-9.19.20-dev.so+0x76420)
Thread T2 'isc-loop-0002' (tid=385839, running) created by main thread at:
#0 pthread_create <null> (named+0x7679b) (BuildId: d5303820077a5b152a0a5e70881da5cdadd80ee3)
#1 isc_thread_create /builds/isc-projects/bind9/lib/isc/thread.c:139:8 (libisc-9.19.20-dev.so+0x76277) (BuildId: d2abce56422ade191082159bc906918b88117875)
#2 isc_loopmgr_run /builds/isc-projects/bind9/lib/isc/loop.c:448:3 (libisc-9.19.20-dev.so+0x5cb79) (BuildId: d2abce56422ade191082159bc906918b88117875)
#3 main /builds/isc-projects/bind9/bin/named/main.c:1574:2 (named+0x10ef71) (BuildId: d5303820077a5b152a0a5e70881da5cdadd80ee3)
SUMMARY: ThreadSanitizer: data race /builds/isc-projects/bind9/lib/dns/xfrin.c:1558:27 in xfrin_send_request
==================
ThreadSanitizer: reported 4 warnings