ThreadSanitizer: data race rbtdb.c:{10066,10068,10069,10070} in update_header
- Binary:
named
- Commit:
c5b6f21515d44c997aa4aa259d2e0653a843fba0
- Tests: autosign
WARNING: ThreadSanitizer: data race (pid=45980)
Read of size 8 at 0x7b30000115e0 by thread T7 (mutexes: write M290055290576030928):
#0 update_header rbtdb.c:10066 (libdns.1503.dylib:x86_64+0xc9f52)
#1 find_deepest_zonecut rbtdb.c:4558 (libdns.1503.dylib:x86_64+0xc9886)
#2 cache_find rbtdb.c:4738 (libdns.1503.dylib:x86_64+0xb5f48)
#3 dns_db_find db.c:511 (libdns.1503.dylib:x86_64+0x2b4df)
#4 dns_view_find view.c:1019 (libdns.1503.dylib:x86_64+0x18cb59)
#5 dbfind_name adb.c:3658 (libdns.1503.dylib:x86_64+0xd8e3)
#6 dns_adb_createfind adb.c:3083 (libdns.1503.dylib:x86_64+0xc163)
#7 findname resolver.c:3371 (libdns.1503.dylib:x86_64+0x13ae8b)
#8 fctx_try resolver.c:3660 (libdns.1503.dylib:x86_64+0x136402)
#9 fctx_start resolver.c:4647 (libdns.1503.dylib:x86_64+0x12f383)
#10 run task.c:1134 (libisc.1503.dylib:x86_64+0x2c9e1)
Previous write of size 8 at 0x7b30000115e0 by thread T5:
#0 update_header rbtdb.c:10068 (libdns.1503.dylib:x86_64+0xca06e)
#1 cache_findzonecut rbtdb.c:5146 (libdns.1503.dylib:x86_64+0xb6cb7)
#2 dns_db_findzonecut db.c:577 (libdns.1503.dylib:x86_64+0x2b900)
#3 dns_view_findzonecut view.c:1309 (libdns.1503.dylib:x86_64+0x18d4be)
#4 rctx_done resolver.c:9348 (libdns.1503.dylib:x86_64+0x1443e8)
#5 resquery_response resolver.c (libdns.1503.dylib:x86_64+0x13ece7)
#6 run task.c:1134 (libisc.1503.dylib:x86_64+0x2c9e1)
Location is heap block of size 183 at 0x7b3000011580 allocated by thread T5:
#0 malloc <null>:7941664 (libclang_rt.tsan_osx_dynamic.dylib:x86_64h+0x4e65a)
#1 default_memalloc mem.c:685 (libisc.1503.dylib:x86_64+0x17ae1)
#2 addrdataset rbtdb.c:6450 (libdns.1503.dylib:x86_64+0xb88d4)
#3 dns_db_addrdataset db.c:744 (libdns.1503.dylib:x86_64+0x2c2ee)
#4 resquery_response resolver.c:6341 (libdns.1503.dylib:x86_64+0x1424a7)
#5 run task.c:1134 (libisc.1503.dylib:x86_64+0x2c9e1)
Mutex M290055290576030928 is already destroyed.
Thread T7 (tid=4654360, running) created by main thread at:
#0 pthread_create <null>:7941712 (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)
Thread T5 (tid=4654358, running) created by main thread at:
#0 pthread_create <null>:7941712 (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 rbtdb.c:10066 in update_header
And same memory block, just different location:
WARNING: ThreadSanitizer: data race (pid=45980)
Read of size 8 at 0x7b30000115e8 by thread T7 (mutexes: write M290055290576030928):
#0 update_header rbtdb.c:10068 (libdns.1503.dylib:x86_64+0xc9f6d)
#1 find_deepest_zonecut rbtdb.c:4558 (libdns.1503.dylib:x86_64+0xc9886)
#2 cache_find rbtdb.c:4738 (libdns.1503.dylib:x86_64+0xb5f48)
#3 dns_db_find db.c:511 (libdns.1503.dylib:x86_64+0x2b4df)
#4 dns_view_find view.c:1019 (libdns.1503.dylib:x86_64+0x18cb59)
#5 dbfind_name adb.c:3658 (libdns.1503.dylib:x86_64+0xd8e3)
#6 dns_adb_createfind adb.c:3083 (libdns.1503.dylib:x86_64+0xc163)
#7 findname resolver.c:3371 (libdns.1503.dylib:x86_64+0x13ae8b)
#8 fctx_try resolver.c:3660 (libdns.1503.dylib:x86_64+0x136402)
#9 fctx_start resolver.c:4647 (libdns.1503.dylib:x86_64+0x12f383)
#10 run task.c:1134 (libisc.1503.dylib:x86_64+0x2c9e1)
Previous write of size 8 at 0x7b30000115e8 by thread T5:
#0 update_header rbtdb.c:10068 (libdns.1503.dylib:x86_64+0xca06e)
#1 cache_findzonecut rbtdb.c:5146 (libdns.1503.dylib:x86_64+0xb6cb7)
#2 dns_db_findzonecut db.c:577 (libdns.1503.dylib:x86_64+0x2b900)
#3 dns_view_findzonecut view.c:1309 (libdns.1503.dylib:x86_64+0x18d4be)
#4 rctx_done resolver.c:9348 (libdns.1503.dylib:x86_64+0x1443e8)
#5 resquery_response resolver.c (libdns.1503.dylib:x86_64+0x13ece7)
#6 run task.c:1134 (libisc.1503.dylib:x86_64+0x2c9e1)
Location is heap block of size 183 at 0x7b3000011580 allocated by thread T5:
#0 malloc <null>:7941664 (libclang_rt.tsan_osx_dynamic.dylib:x86_64h+0x4e65a)
#1 default_memalloc mem.c:685 (libisc.1503.dylib:x86_64+0x17ae1)
#2 addrdataset rbtdb.c:6450 (libdns.1503.dylib:x86_64+0xb88d4)
#3 dns_db_addrdataset db.c:744 (libdns.1503.dylib:x86_64+0x2c2ee)
#4 resquery_response resolver.c:6341 (libdns.1503.dylib:x86_64+0x1424a7)
#5 run task.c:1134 (libisc.1503.dylib:x86_64+0x2c9e1)
Mutex M290055290576030928 is already destroyed.
Thread T7 (tid=4654360, running) created by main thread at:
#0 pthread_create <null>:7941712 (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)
Thread T5 (tid=4654358, running) created by main thread at:
#0 pthread_create <null>:7941712 (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 rbtdb.c:10068 in update_header
One more:
WARNING: ThreadSanitizer: data race (pid=45980)
Write of size 4 at 0x7b30000115d8 by thread T7 (mutexes: write M290055290576030928):
#0 update_header rbtdb.c:10069 (libdns.1503.dylib:x86_64+0xca0f1)
#1 find_deepest_zonecut rbtdb.c:4558 (libdns.1503.dylib:x86_64+0xc9886)
#2 cache_find rbtdb.c:4738 (libdns.1503.dylib:x86_64+0xb5f48)
#3 dns_db_find db.c:511 (libdns.1503.dylib:x86_64+0x2b4df)
#4 dns_view_find view.c:1019 (libdns.1503.dylib:x86_64+0x18cb59)
#5 dbfind_name adb.c:3658 (libdns.1503.dylib:x86_64+0xd8e3)
#6 dns_adb_createfind adb.c:3083 (libdns.1503.dylib:x86_64+0xc163)
#7 findname resolver.c:3371 (libdns.1503.dylib:x86_64+0x13ae8b)
#8 fctx_try resolver.c:3660 (libdns.1503.dylib:x86_64+0x136402)
#9 fctx_start resolver.c:4647 (libdns.1503.dylib:x86_64+0x12f383)
#10 run task.c:1134 (libisc.1503.dylib:x86_64+0x2c9e1)
Previous write of size 4 at 0x7b30000115d8 by thread T5:
#0 update_header rbtdb.c:10069 (libdns.1503.dylib:x86_64+0xca0f1)
#1 cache_findzonecut rbtdb.c:5146 (libdns.1503.dylib:x86_64+0xb6cb7)
#2 dns_db_findzonecut db.c:577 (libdns.1503.dylib:x86_64+0x2b900)
#3 dns_view_findzonecut view.c:1309 (libdns.1503.dylib:x86_64+0x18d4be)
#4 rctx_done resolver.c:9348 (libdns.1503.dylib:x86_64+0x1443e8)
#5 resquery_response resolver.c (libdns.1503.dylib:x86_64+0x13ece7)
#6 run task.c:1134 (libisc.1503.dylib:x86_64+0x2c9e1)
Location is heap block of size 183 at 0x7b3000011580 allocated by thread T5:
#0 malloc <null>:7941664 (libclang_rt.tsan_osx_dynamic.dylib:x86_64h+0x4e65a)
#1 default_memalloc mem.c:685 (libisc.1503.dylib:x86_64+0x17ae1)
#2 addrdataset rbtdb.c:6450 (libdns.1503.dylib:x86_64+0xb88d4)
#3 dns_db_addrdataset db.c:744 (libdns.1503.dylib:x86_64+0x2c2ee)
#4 resquery_response resolver.c:6341 (libdns.1503.dylib:x86_64+0x1424a7)
#5 run task.c:1134 (libisc.1503.dylib:x86_64+0x2c9e1)
Mutex M290055290576030928 is already destroyed.
Thread T7 (tid=4654360, running) created by main thread at:
#0 pthread_create <null>:7941712 (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)
Thread T5 (tid=4654358, running) created by main thread at:
#0 pthread_create <null>:7941712 (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 rbtdb.c:10069 in update_header
and from a different location (seems like rdatasetheader_t *header
is unlocked and it should be):
WARNING: ThreadSanitizer: data race (pid=45980)
Write of size 8 at 0x7b440003b610 by thread T1:
#0 update_header rbtdb.c:10070 (libdns.1503.dylib:x86_64+0xca1c7)
#1 find_deepest_zonecut rbtdb.c:4558 (libdns.1503.dylib:x86_64+0xc9886)
#2 cache_find rbtdb.c:4738 (libdns.1503.dylib:x86_64+0xb5f48)
#3 dns_db_findext db.c:551 (libdns.1503.dylib:x86_64+0x2b74e)
#4 query_lookup query.c:5515 (libns.1501.dylib:x86_64+0x1350e)
#5 ns__query_start query.c:5441 (libns.1501.dylib:x86_64+0x1146c)
#6 ns_query_start query.c:5162 (libns.1501.dylib:x86_64+0x172c8)
#7 ns__client_request client.c:2152 (libns.1501.dylib:x86_64+0x66a2)
#8 dnslisten_readcb tcpdns.c:185 (libisc.1503.dylib:x86_64+0x209b9)
#9 read_cb tcp.c:346 (libisc.1503.dylib:x86_64+0x1d15f)
#10 uv__stream_io <null>:1541232 (libuv.1.dylib:x86_64+0xeda1)
Previous read of size 8 at 0x7b440003b610 by thread T7:
#0 free_rdataset rbtdb.c:1463 (libdns.1503.dylib:x86_64+0xbf956)
#1 decrement_reference rbtdb.c:1572 (libdns.1503.dylib:x86_64+0xc31dc)
#2 detachnode rbtdb.c:5197 (libdns.1503.dylib:x86_64+0xb7024)
#3 rdataset_disassociate rbtdb.c:8377 (libdns.1503.dylib:x86_64+0xc0330)
#4 dns_rdataset_disassociate rdataset.c:118 (libdns.1503.dylib:x86_64+0x120089)
#5 fctx_destroy resolver.c:4395 (libdns.1503.dylib:x86_64+0x130251)
#6 fctx_doshutdown resolver.c:4570 (libdns.1503.dylib:x86_64+0x14c626)
#7 run task.c:1134 (libisc.1503.dylib:x86_64+0x2c9e1)
Location is heap block of size 273 at 0x7b440003b600 allocated by thread T5:
#0 malloc <null>:1541264 (libclang_rt.tsan_osx_dynamic.dylib:x86_64h+0x4e65a)
#1 default_memalloc mem.c:685 (libisc.1503.dylib:x86_64+0x17ae1)
#2 dns_db_create db.c:118 (libdns.1503.dylib:x86_64+0x2a09c)
#3 dns_cache_create cache.c:173 (libdns.1503.dylib:x86_64+0x1c5d0)
#4 configure_view server.c:4484 (named:x86_64+0x1000279cf)
#5 load_configuration server.c:8916 (named:x86_64+0x100021275)
#6 run_server server.c:9638 (named:x86_64+0x10000de29)
#7 run task.c:1134 (libisc.1503.dylib:x86_64+0x2c9e1)
Thread T1 (tid=4654354, running) created by main thread at:
#0 pthread_create <null>:1541312 (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 T7 (tid=4654360, running) created by main thread at:
#0 pthread_create <null>:1541312 (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)
Thread T5 (tid=4654358, running) created by main thread at:
#0 pthread_create <null>:1541216 (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 rbtdb.c:10070 in update_header