ThreadSanitizer: data race - lib/dns/tests/zt_test
lib/dns/tests/zt_test failed
WARNING: ThreadSanitizer: data race
Write of size 8 at 0x000000000001 by main thread (mutexes: write M1, write M2):
#0 free <null>
#1 default_memfree lib/isc/mem.c:713:2
#2 mem_put lib/isc/mem.c:627:2
#3 isc___mem_putanddetach lib/isc/mem.c:960:3
#4 isc__mem_putanddetach lib/isc/mem.c:2380:2
#5 zt_destroy lib/dns/zt.c:233:2
#6 zt_flushanddetach lib/dns/zt.c:250:3
#7 dns_zt_detach lib/dns/zt.c:261:2
#8 view_flushanddetach lib/dns/view.c:594:5
#9 dns_view_detach lib/dns/view.c:635:2
#10 asyncload_zt lib/dns/tests/zt_test.c:339:2
#11 <null> <null>
#12 __libc_start_main <null>
Previous atomic write of size 8 at 0x000000000001 by thread T1:
#0 __tsan_atomic64_fetch_sub <null>
#1 doneloading lib/dns/zt.c:551:6
#2 zone_asyncload lib/dns/zone.c:2201:3
#3 dispatch lib/isc/task.c:1134:7
#4 run lib/isc/task.c:1319:2
Mutex M1 (0x000000000020) created at:
#0 pthread_mutex_init <null>
#1 isc__mutex_init lib/isc/pthreads/mutex.c:284:8
#2 dns_view_create lib/dns/view.c:107:2
#3 dns_test_makeview lib/dns/tests/dnstest.c:225:2
#4 dns_test_makezone lib/dns/tests/dnstest.c:273:12
#5 asyncload_zt lib/dns/tests/zt_test.c:275:11
#6 <null> <null>
#7 __libc_start_main <null>
Mutex M2 (0x000000000027) created at:
#0 pthread_mutex_init <null>
#1 isc__mutex_init lib/isc/pthreads/mutex.c:284:8
#2 mem_create lib/isc/mem.c:737:2
#3 isc_mem_create lib/isc/mem.c:2358:2
#4 dns_test_begin lib/dns/tests/dnstest.c:145:2
#5 _setup lib/dns/tests/zt_test.c:55:11
#6 <null> <null>
#7 __libc_start_main <null>
Thread T1 (running) created by main thread at:
#0 pthread_create <null>
#1 isc_thread_create lib/isc/pthreads/thread.c:75:8
#2 isc_taskmgr_create lib/isc/task.c:1410:3
#3 create_managers lib/dns/tests/dnstest.c:119:2
#4 dns_test_begin lib/dns/tests/dnstest.c:180:3
#5 _setup lib/dns/tests/zt_test.c:55:11
#6 <null> <null>
#7 __libc_start_main <null>
SUMMARY: ThreadSanitizer: data race in free
Edited by Mark Andrews