ThreadSanitizer: data race netmgr.c:813 in isc__nmhandle_get
Found in ns3 log while running named
in the serve-stale system compiled test compiled from c5b6f215:
WARNING: ThreadSanitizer: data race (pid=31106)
Write of size 8 at 0x7b7c00000978 by thread T3 (mutexes: write M803183881061665024):
#0 isc__nmhandle_get netmgr.c:813 (libisc.1503.dylib:x86_64+0x1b1d0)
#1 udp_recv_cb udp.c:309 (libisc.1503.dylib:x86_64+0x1ea53)
#2 uv__udp_io <null>:3676272 (libuv.1.dylib:x86_64+0x13244)
Previous read of size 8 at 0x7b7c00000978 by thread T1:
#0 isc_nmhandle_unref netmgr.c:899 (libisc.1503.dylib:x86_64+0x1b704)
#1 isc__nm_uvreq_put netmgr.c:1002 (libisc.1503.dylib:x86_64+0x1bdb8)
#2 udp_send_cb udp.c:436 (libisc.1503.dylib:x86_64+0x1f785)
#3 uv__udp_run_completed <null>:3676272 (libuv.1.dylib:x86_64+0x1278f)
Location is heap block of size 3313 at 0x7b7c00000000 allocated by thread T5:
#0 malloc <null>:3676304 (libclang_rt.tsan_osx_dynamic.dylib:x86_64h+0x4e65a)
#1 default_memalloc mem.c:685 (libisc.1503.dylib:x86_64+0x17ae1)
#2 ns_interface_setup interfacemgr.c:448 (libns.1501.dylib:x86_64+0xe9c0)
#3 ns_interfacemgr_scan0 interfacemgr.c:1067 (libns.1501.dylib:x86_64+0xd830)
#4 ns_interfacemgr_scan interfacemgr.c:1174 (libns.1501.dylib:x86_64+0xc7ee)
#5 load_configuration server.c:8696 (named:x86_64+0x10001f899)
#6 run_server server.c:9638 (named:x86_64+0x10000de29)
#7 run task.c:1134 (libisc.1503.dylib:x86_64+0x2c9e1)
Mutex M803183881061665024 is already destroyed.
Thread T3 (tid=4591307, running) created by main thread at:
#0 pthread_create <null>:3676352 (libclang_rt.tsan_osx_dynamic.dylib:x86_64h+0x2a9cd)
#1 isc_thread_create thread.c:75 (libisc.1503.dylib:x86_64+0x46d1c)
#2 main main.c:895 (named:x86_64+0x10000acbe)
Thread T1 (tid=4591305, running) created by main thread at:
#0 pthread_create <null>:3676352 (libclang_rt.tsan_osx_dynamic.dylib:x86_64h+0x2a9cd)
#1 isc_thread_create thread.c:75 (libisc.1503.dylib:x86_64+0x46d1c)
#2 main main.c:895 (named:x86_64+0x10000acbe)
Thread T5 (tid=4591309, running) created by main thread at:
#0 pthread_create <null>:3676256 (libclang_rt.tsan_osx_dynamic.dylib:x86_64h+0x2a9cd)
#1 isc_thread_create thread.c:75 (libisc.1503.dylib:x86_64+0x46d1c)
#2 main main.c:902 (named:x86_64+0x10000ad16)
SUMMARY: ThreadSanitizer: data race netmgr.c:813 in isc__nmhandle_get