Data race netmgr/netmgr.c:596 in isc___nmsocket_prep_destroy
When testing the AWS autoscaler, this TSAN error popped up in the stress
system test on system:gcc:tsan
.
WARNING: ThreadSanitizer: data race
Write of size 1 at 0x000000000001 by main thread (mutexes: write M2, write M2):
#0 isc___nmsocket_prep_destroy netmgr/netmgr.c:596 (BuildId: f82fc18af69228f16693926bb890ef35731d4a11)
#1 isc___nmsocket_detach netmgr/netmgr.c:660 (BuildId: f82fc18af69228f16693926bb890ef35731d4a11)
#2 nmhandle__destroy netmgr/netmgr.c:931 (BuildId: f82fc18af69228f16693926bb890ef35731d4a11)
#3 nmhandle_destroy netmgr/netmgr.c:966
#4 isc_nmhandle_unref netmgr/netmgr.c:982
#5 isc_nmhandle_detach netmgr/netmgr.c:982 (BuildId: f82fc18af69228f16693926bb890ef35731d4a11)
#6 dispentry_destroy lib/dns/dispatch.c:469 (BuildId: 13eb6cd62dc8cfe9ad825c1457c71cc82be5efb4)
#7 dns_dispentry_unref lib/dns/dispatch.c:488 (BuildId: 13eb6cd62dc8cfe9ad825c1457c71cc82be5efb4)
#8 dns_dispentry_detach lib/dns/dispatch.c:488 (BuildId: 13eb6cd62dc8cfe9ad825c1457c71cc82be5efb4)
#9 dns_dispatch_done lib/dns/dispatch.c:1797 (BuildId: 13eb6cd62dc8cfe9ad825c1457c71cc82be5efb4)
#10 request_cancel lib/dns/request.c:805 (BuildId: 13eb6cd62dc8cfe9ad825c1457c71cc82be5efb4)
#11 dns_request_cancel lib/dns/request.c:818 (BuildId: 13eb6cd62dc8cfe9ad825c1457c71cc82be5efb4)
#12 dns_requestmgr_shutdown lib/dns/request.c:192 (BuildId: 13eb6cd62dc8cfe9ad825c1457c71cc82be5efb4)
#13 dns_view_detach lib/dns/view.c:478 (BuildId: 13eb6cd62dc8cfe9ad825c1457c71cc82be5efb4)
#14 load_configuration bin/named/server.c:9729 (BuildId: a8d11c463d35223877314591808060f2a02dd191)
#15 loadconfig bin/named/server.c:10305 (BuildId: a8d11c463d35223877314591808060f2a02dd191)
#16 reload bin/named/server.c:10331 (BuildId: a8d11c463d35223877314591808060f2a02dd191)
#17 named_server_reloadcommand bin/named/server.c:10659 (BuildId: a8d11c463d35223877314591808060f2a02dd191)
#18 named_control_docommand bin/named/control.c:250 (BuildId: a8d11c463d35223877314591808060f2a02dd191)
#19 control_command bin/named/controlconf.c:401 (BuildId: a8d11c463d35223877314591808060f2a02dd191)
#20 isc__async_cb lib/isc/async.c:112 (BuildId: f82fc18af69228f16693926bb890ef35731d4a11)
#21 uv__async_io /usr/src/libuv-v1.44.1/src/unix/async.c:163 (BuildId: c935a505813749d6b0282805da62fd79140fd966)
#22 thread_body lib/isc/thread.c:88 (BuildId: f82fc18af69228f16693926bb890ef35731d4a11)
#23 isc_thread_main lib/isc/thread.c:119 (BuildId: f82fc18af69228f16693926bb890ef35731d4a11)
#24 isc_loopmgr_run lib/isc/loop.c:452 (BuildId: f82fc18af69228f16693926bb890ef35731d4a11)
#25 main bin/named/main.c:1532 (BuildId: a8d11c463d35223877314591808060f2a02dd191)
Previous write of size 1 at 0x000000000001 by thread T1:
#0 isc___nmsocket_prep_destroy netmgr/netmgr.c:596 (BuildId: f82fc18af69228f16693926bb890ef35731d4a11)
#1 udp_close_cb netmgr/udp.c:942 (BuildId: f82fc18af69228f16693926bb890ef35731d4a11)
#2 uv__finish_close /usr/src/libuv-v1.44.1/src/unix/core.c:308 (BuildId: c935a505813749d6b0282805da62fd79140fd966)
#3 thread_body lib/isc/thread.c:88 (BuildId: f82fc18af69228f16693926bb890ef35731d4a11)
#4 thread_run lib/isc/thread.c:103 (BuildId: f82fc18af69228f16693926bb890ef35731d4a11)
Location is heap block of size 2136 at 0x000000000029 allocated by thread T1:
#0 malloc <null> (BuildId: 0dfec843367c3385ed82c09439308cfa1112e54e)
#1 mallocx lib/isc/jemalloc_shim.h:65 (BuildId: f82fc18af69228f16693926bb890ef35731d4a11)
#2 mem_get lib/isc/mem.c:305
#3 isc__mem_get lib/isc/mem.c:674 (BuildId: f82fc18af69228f16693926bb890ef35731d4a11)
#4 isc_nm_udpconnect netmgr/udp.c:794 (BuildId: f82fc18af69228f16693926bb890ef35731d4a11)
#5 udp_dispatch_connect lib/dns/dispatch.c:1980 (BuildId: 13eb6cd62dc8cfe9ad825c1457c71cc82be5efb4)
#6 dns_dispatch_connect lib/dns/dispatch.c:2083 (BuildId: 13eb6cd62dc8cfe9ad825c1457c71cc82be5efb4)
#7 dns_request_create lib/dns/request.c:680 (BuildId: 13eb6cd62dc8cfe9ad825c1457c71cc82be5efb4)
#8 notify_send_toaddr lib/dns/zone.c:12324 (BuildId: 13eb6cd62dc8cfe9ad825c1457c71cc82be5efb4)
#9 isc__async_cb lib/isc/async.c:112 (BuildId: f82fc18af69228f16693926bb890ef35731d4a11)
#10 uv__async_io /usr/src/libuv-v1.44.1/src/unix/async.c:163 (BuildId: c935a505813749d6b0282805da62fd79140fd966)
#11 thread_body lib/isc/thread.c:88 (BuildId: f82fc18af69228f16693926bb890ef35731d4a11)
#12 thread_run lib/isc/thread.c:103 (BuildId: f82fc18af69228f16693926bb890ef35731d4a11)
Mutex M2 (0x000000000038) created at:
#0 pthread_mutex_init <null> (BuildId: 0dfec843367c3385ed82c09439308cfa1112e54e)
#1 dns_requestmgr_create lib/dns/request.c:147 (BuildId: 13eb6cd62dc8cfe9ad825c1457c71cc82be5efb4)
#2 dns_view_createresolver lib/dns/view.c:624 (BuildId: 13eb6cd62dc8cfe9ad825c1457c71cc82be5efb4)
#3 configure_view bin/named/server.c:4739 (BuildId: a8d11c463d35223877314591808060f2a02dd191)
#4 load_configuration bin/named/server.c:9193 (BuildId: a8d11c463d35223877314591808060f2a02dd191)
#5 loadconfig bin/named/server.c:10305 (BuildId: a8d11c463d35223877314591808060f2a02dd191)
#6 reload bin/named/server.c:10331 (BuildId: a8d11c463d35223877314591808060f2a02dd191)
#7 named_server_reloadcommand bin/named/server.c:10659 (BuildId: a8d11c463d35223877314591808060f2a02dd191)
#8 named_control_docommand bin/named/control.c:250 (BuildId: a8d11c463d35223877314591808060f2a02dd191)
#9 control_command bin/named/controlconf.c:401 (BuildId: a8d11c463d35223877314591808060f2a02dd191)
#10 isc__async_cb lib/isc/async.c:112 (BuildId: f82fc18af69228f16693926bb890ef35731d4a11)
#11 uv__async_io /usr/src/libuv-v1.44.1/src/unix/async.c:163 (BuildId: c935a505813749d6b0282805da62fd79140fd966)
#12 thread_body lib/isc/thread.c:88 (BuildId: f82fc18af69228f16693926bb890ef35731d4a11)
#13 isc_thread_main lib/isc/thread.c:119 (BuildId: f82fc18af69228f16693926bb890ef35731d4a11)
#14 isc_loopmgr_run lib/isc/loop.c:452 (BuildId: f82fc18af69228f16693926bb890ef35731d4a11)
#15 main bin/named/main.c:1532 (BuildId: a8d11c463d35223877314591808060f2a02dd191)
Mutex M2 (0x000000000044) created at:
#0 pthread_mutex_init <null> (BuildId: 0dfec843367c3385ed82c09439308cfa1112e54e)
#1 dns_requestmgr_create lib/dns/request.c:150 (BuildId: 13eb6cd62dc8cfe9ad825c1457c71cc82be5efb4)
#2 dns_view_createresolver lib/dns/view.c:624 (BuildId: 13eb6cd62dc8cfe9ad825c1457c71cc82be5efb4)
#3 configure_view bin/named/server.c:4739 (BuildId: a8d11c463d35223877314591808060f2a02dd191)
#4 load_configuration bin/named/server.c:9193 (BuildId: a8d11c463d35223877314591808060f2a02dd191)
#5 loadconfig bin/named/server.c:10305 (BuildId: a8d11c463d35223877314591808060f2a02dd191)
#6 reload bin/named/server.c:10331 (BuildId: a8d11c463d35223877314591808060f2a02dd191)
#7 named_server_reloadcommand bin/named/server.c:10659 (BuildId: a8d11c463d35223877314591808060f2a02dd191)
#8 named_control_docommand bin/named/control.c:250 (BuildId: a8d11c463d35223877314591808060f2a02dd191)
#9 control_command bin/named/controlconf.c:401 (BuildId: a8d11c463d35223877314591808060f2a02dd191)
#10 isc__async_cb lib/isc/async.c:112 (BuildId: f82fc18af69228f16693926bb890ef35731d4a11)
#11 uv__async_io /usr/src/libuv-v1.44.1/src/unix/async.c:163 (BuildId: c935a505813749d6b0282805da62fd79140fd966)
#12 thread_body lib/isc/thread.c:88 (BuildId: f82fc18af69228f16693926bb890ef35731d4a11)
#13 isc_thread_main lib/isc/thread.c:119 (BuildId: f82fc18af69228f16693926bb890ef35731d4a11)
#14 isc_loopmgr_run lib/isc/loop.c:452 (BuildId: f82fc18af69228f16693926bb890ef35731d4a11)
#15 main bin/named/main.c:1532 (BuildId: a8d11c463d35223877314591808060f2a02dd191)
Thread T1 'isc-loop-0002' (running) created by main thread at:
#0 pthread_create <null> (BuildId: 0dfec843367c3385ed82c09439308cfa1112e54e)
#1 isc_thread_create lib/isc/thread.c:142 (BuildId: f82fc18af69228f16693926bb890ef35731d4a11)
#2 isc_loopmgr_run lib/isc/loop.c:446 (BuildId: f82fc18af69228f16693926bb890ef35731d4a11)
#3 main bin/named/main.c:1532 (BuildId: a8d11c463d35223877314591808060f2a02dd191)
SUMMARY: ThreadSanitizer: data race netmgr/netmgr.c:596 in isc___nmsocket_prep_destroy