interfacemgr shutdown race
Job #1748465 failed for 80ca95a9:
WARNING: ThreadSanitizer: data race
Write of size 8 at 0x000000000001 by thread T1 (mutexes: write M1):
#0 memset <null>
#1 memset /usr/include/x86_64-linux-gnu/bits/string_fortified.h:71:10
#2 mem_put lib/isc/mem.c:361:3
#3 isc__mem_free lib/isc/mem.c:1012:2
#4 isc__mem_put lib/isc/mem.c:777:3
#5 ns_interface_destroy lib/ns/interfacemgr.c:713:2
#6 ns_interface_detach lib/ns/interfacemgr.c:730:3
#7 purge_old_interfaces lib/ns/interfacemgr.c:770:4
#8 ns_interfacemgr_shutdown lib/ns/interfacemgr.c:401:2
#9 shutdown_server bin/named/server.c:10086:2
#10 task_run lib/isc/task.c:816:5
#11 isc_task_run lib/isc/task.c:896:10
#12 isc__nm_async_task lib/isc/netmgr/netmgr.c:863:11
#13 process_netievent lib/isc/netmgr/netmgr.c:942:3
#14 process_queue lib/isc/netmgr/netmgr.c:1032:16
#15 process_all_queues lib/isc/netmgr/netmgr.c:783:25
#16 async_cb lib/isc/netmgr/netmgr.c:812:6
#17 <null> <null>
#18 isc__trampoline_run lib/isc/trampoline.c:184:11
Previous read of size 8 at 0x000000000001 by thread T2:
#0 memmove <null>
#1 isc___nmhandle_get lib/isc/netmgr/netmgr.c
#2 isc__nm_get_read_req lib/isc/netmgr/netmgr.c:2130:18
#3 isc__nm_tcpdns_processbuffer lib/isc/netmgr/tcpdns.c:787:8
#4 processbuffer lib/isc/netmgr/netmgr.c:2257:11
#5 isc__nm_process_sock_buffer lib/isc/netmgr/netmgr.c:2282:25
#6 isc__nm_resume_processing lib/isc/netmgr/netmgr.c:2338:2
#7 nmhandle_detach_cb lib/isc/netmgr/netmgr.c:1864:4
#8 isc__nmhandle_detach lib/isc/netmgr/netmgr.c:1804:3
#9 isc___nm_uvreq_put lib/isc/netmgr/netmgr.c:2462:3
#10 isc__nm_async_sendcb lib/isc/netmgr/netmgr.c:2748:2
#11 process_netievent lib/isc/netmgr/netmgr.c:994:3
#12 process_queue lib/isc/netmgr/netmgr.c:1032:16
#13 process_all_queues lib/isc/netmgr/netmgr.c:783:25
#14 async_cb lib/isc/netmgr/netmgr.c:812:6
#15 <null> <null>
#16 isc__trampoline_run lib/isc/trampoline.c:184:11
Location is heap block of size 1392 at 0x000000000032 allocated by thread T1:
#0 malloc <null>
#1 default_memalloc lib/isc/mem.c:411:8
#2 mem_get lib/isc/mem.c:343:8
#3 mem_allocateunlocked lib/isc/mem.c:918:7
#4 isc__mem_allocate lib/isc/mem.c:935:7
#5 isc__mem_get lib/isc/mem.c:740:11
#6 ns_interface_create lib/ns/interfacemgr.c:412:8
#7 ns_interface_setup lib/ns/interfacemgr.c:599:11
#8 do_scan lib/ns/interfacemgr.c:1199:14
#9 ns_interfacemgr_scan0 lib/ns/interfacemgr.c:1258:11
#10 ns_interfacemgr_scan lib/ns/interfacemgr.c:1306:11
#11 load_configuration bin/named/server.c:9110:11
#12 run_server bin/named/server.c:10054:2
#13 task_run lib/isc/task.c:816:5
#14 isc_task_run lib/isc/task.c:896:10
#15 isc__nm_async_task lib/isc/netmgr/netmgr.c:863:11
#16 process_netievent lib/isc/netmgr/netmgr.c:942:3
#17 process_queue lib/isc/netmgr/netmgr.c:1032:16
#18 process_all_queues lib/isc/netmgr/netmgr.c:783:25
#19 async_cb lib/isc/netmgr/netmgr.c:812:6
#20 <null> <null>
#21 isc__trampoline_run lib/isc/trampoline.c:184:11
Mutex M1 is already destroyed.
Thread T1 (running) created by main thread at:
#0 pthread_create <null>
#1 isc_thread_create lib/isc/pthreads/thread.c:79:8
#2 isc__netmgr_create lib/isc/netmgr/netmgr.c:347:3
#3 isc_managers_create lib/isc/managers.c:39:2
#4 create_managers bin/named/main.c:941:11
#5 setup bin/named/main.c:1216:11
#6 main bin/named/main.c:1507:2
Thread T2 (running) created by main thread at:
#0 pthread_create <null>
#1 isc_thread_create lib/isc/pthreads/thread.c:79:8
#2 isc__netmgr_create lib/isc/netmgr/netmgr.c:347:3
#3 isc_managers_create lib/isc/managers.c:39:2
#4 create_managers bin/named/main.c:941:11
#5 setup bin/named/main.c:1216:11
#6 main bin/named/main.c:1507:2
SUMMARY: ThreadSanitizer: data race in memset
Edited by Ondřej Surý