TSAN error: lib/dns/rbtdb.c
Job #1434050 failed for e6064e7c:
WARNING: ThreadSanitizer: data race
Write of size 4 at 0x000000000001 by thread T1 (mutexes: read M1, read M2):
#0 check_stale_header lib/dns/rbtdb.c:4573
#1 cache_find lib/dns/rbtdb.c:5061
#2 dns_db_findext lib/dns/db.c:536
#3 query_lookup lib/ns/query.c:5805
#4 query_gotanswer lib/ns/query.c:7556
#5 query_resume lib/ns/query.c:6614
#6 fetch_callback lib/ns/query.c:6161
#7 dispatch lib/isc/task.c:1152
#8 run lib/isc/task.c:1344
#9 <null> <null>
Previous write of size 4 at 0x000000000001 by thread T2 (mutexes: read M1, read M2):
#0 check_stale_header lib/dns/rbtdb.c:4573
#1 cache_find lib/dns/rbtdb.c:5061
#2 dns_db_findext lib/dns/db.c:536
#3 query_lookup lib/ns/query.c:5805
#4 query_gotanswer lib/ns/query.c:7556
#5 query_resume lib/ns/query.c:6614
#6 fetch_callback lib/ns/query.c:6161
#7 dispatch lib/isc/task.c:1152
#8 run lib/isc/task.c:1344
#9 <null> <null>
Location is heap block of size 209 at 0x000000000011 allocated by thread T3:
#0 malloc <null>
#1 default_memalloc lib/isc/mem.c:713
#2 mem_get lib/isc/mem.c:622
#3 mem_allocateunlocked lib/isc/mem.c:1268
#4 isc___mem_allocate lib/isc/mem.c:1288
#5 isc__mem_allocate lib/isc/mem.c:2453
#6 isc___mem_get lib/isc/mem.c:1037
#7 isc__mem_get lib/isc/mem.c:2432
#8 dns_rdataslab_fromrdataset lib/dns/rdataslab.c:270
#9 addrdataset lib/dns/rbtdb.c:6813
#10 dns_db_addrdataset lib/dns/db.c:719
#11 addoptout lib/dns/ncache.c:281
#12 dns_ncache_add lib/dns/ncache.c:101
#13 ncache_adderesult lib/dns/resolver.c:6795
#14 ncache_message lib/dns/resolver.c:6972
#15 rctx_ncache lib/dns/resolver.c:9350
#16 resquery_response lib/dns/resolver.c:8063
#17 dispatch lib/isc/task.c:1152
#18 run lib/isc/task.c:1344
#19 <null> <null>
Mutex M1 is already destroyed.
Mutex M2 is already destroyed.
Thread T1 (running) created by main thread at:
#0 pthread_create <null>
#1 isc_thread_create pthreads/thread.c:73
#2 isc_taskmgr_create lib/isc/task.c:1434
#3 create_managers bin/named/main.c:940
#4 setup bin/named/main.c:1248
#5 main bin/named/main.c:1548
Thread T2 (running) created by main thread at:
#0 pthread_create <null>
#1 isc_thread_create pthreads/thread.c:73
#2 isc_taskmgr_create lib/isc/task.c:1434
#3 create_managers bin/named/main.c:940
#4 setup bin/named/main.c:1248
#5 main bin/named/main.c:1548
Thread T3 (running) created by main thread at:
#0 pthread_create <null>
#1 isc_thread_create pthreads/thread.c:73
#2 isc_taskmgr_create lib/isc/task.c:1434
#3 create_managers bin/named/main.c:940
#4 setup bin/named/main.c:1248
#5 main bin/named/main.c:1548
SUMMARY: ThreadSanitizer: data race lib/dns/rbtdb.c:4573 in check_stale_header
Edited by Mark Andrews