ThreadSanitizer: data race in free (closeversion)
Binary: named
Commit:
Tests: autosign
WARNING: ThreadSanitizer: data race (pid=3192)
Write of size 8 at 0x7b5400020a98 by thread T13 (mutexes: write M745199812520979736):
#0 free <null> (libtsan.so.0+0x2b46a)
#1 default_memfree /home/ondrej/Projects/bind9/lib/isc/mem.c:713 (libisc.so.1504+0x3304c)
#2 mem_put /home/ondrej/Projects/bind9/lib/isc/mem.c:627 (libisc.so.1504+0x35fb1)
#3 isc___mem_free /home/ondrej/Projects/bind9/lib/isc/mem.c:1343 (libisc.so.1504+0x35fb1)
#4 isc__mem_free /home/ondrej/Projects/bind9/lib/isc/mem.c:2408 (libisc.so.1504+0x3d064)
#5 isc___mem_put /home/ondrej/Projects/bind9/lib/isc/mem.c:1061 (libisc.so.1504+0x3df2d)
#6 isc__mem_put /home/ondrej/Projects/bind9/lib/isc/mem.c:2373 (libisc.so.1504+0x3b1ef)
#7 closeversion /home/ondrej/Projects/bind9/lib/dns/rbtdb.c:2548 (libdns.so.1505+0x112e08)
#8 dns_db_closeversion /home/ondrej/Projects/bind9/lib/dns/db.c:418 (libdns.so.1505+0x66291)
#9 update_action /home/ondrej/Projects/bind9/lib/ns/update.c:3346 (libns.so.1502+0x4f8bc)
#10 dispatch /home/ondrej/Projects/bind9/lib/isc/task.c:1134 (libisc.so.1504+0x55606)
#11 run /home/ondrej/Projects/bind9/lib/isc/task.c:1319 (libisc.so.1504+0x55606)
#12 <null> <null> (libtsan.so.0+0x29b3d)
Previous read of size 8 at 0x7b5400020a98 by thread T7:
#0 closeversion /home/ondrej/Projects/bind9/lib/dns/rbtdb.c:2387 (libdns.so.1505+0x11264d)
#1 dns_db_closeversion /home/ondrej/Projects/bind9/lib/dns/db.c:418 (libdns.so.1505+0x66291)
#2 query_reset /home/ondrej/Projects/bind9/lib/ns/query.c:665 (libns.so.1502+0x32c21)
#3 query_cleanup /home/ondrej/Projects/bind9/lib/ns/query.c:751 (libns.so.1502+0x3388e)
#4 ns_client_endrequest /home/ondrej/Projects/bind9/lib/ns/client.c:191 (libns.so.1502+0x121cf)
#5 ns__client_reset_cb /home/ondrej/Projects/bind9/lib/ns/client.c:1528 (libns.so.1502+0x121cf)
#6 isc_nmhandle_unref /home/ondrej/Projects/bind9/lib/isc/netmgr/netmgr.c:993 (libisc.so.1504+0x4064b)
#7 isc__nm_uvreq_put /home/ondrej/Projects/bind9/lib/isc/netmgr/netmgr.c:1155 (libisc.so.1504+0x41aef)
#8 udp_send_cb /home/ondrej/Projects/bind9/lib/isc/netmgr/udp.c:440 (libisc.so.1504+0x455ed)
#9 <null> <null> (libuv.so.1+0x1d283)
#10 <null> <null> (libtsan.so.0+0x29b3d)
Mutex M745199812520979736 is already destroyed.
Thread T13 'isc-worker0004' (tid=3219, running) created by main thread at:
#0 pthread_create <null> (libtsan.so.0+0x2be1b)
#1 isc_thread_create /home/ondrej/Projects/bind9/lib/isc/pthreads/thread.c:75 (libisc.so.1504+0x7a324)
#2 isc_taskmgr_create /home/ondrej/Projects/bind9/lib/isc/task.c:1410 (libisc.so.1504+0x583c3)
#3 create_managers main.c:902 (named+0x1af1c)
#4 setup main.c:1235 (named+0x1af1c)
#5 main main.c:1513 (named+0x1af1c)
Thread T7 'isc-net-0006' (tid=3213, running) created by main thread at:
#0 pthread_create <null> (libtsan.so.0+0x2be1b)
#1 isc_thread_create /home/ondrej/Projects/bind9/lib/isc/pthreads/thread.c:75 (libisc.so.1504+0x7a324)
#2 isc_nm_start /home/ondrej/Projects/bind9/lib/isc/netmgr/netmgr.c:152 (libisc.so.1504+0x3e979)
#3 create_managers main.c:895 (named+0x1aec0)
#4 setup main.c:1235 (named+0x1aec0)
#5 main main.c:1513 (named+0x1aec0)
SUMMARY: ThreadSanitizer: data race (/usr/lib/x86_64-linux-gnu/libtsan.so.0+0x2b46a) in __interceptor_free
Edited by Ondřej Surý