data race in rdataset_addglue
WARNING: ThreadSanitizer: data race
Read of size 8 at 0x000000000001 by thread T1:
#0 rdataset_addglue lib/dns/rbtdb.c:10254
#1 dns_rdataset_addglue lib/dns/rdataset.c:747
#2 query_additional lib/ns/query.c:2105
#3 query_addrrset lib/ns/query.c:2194
#4 query_addanswer lib/ns/query.c:7342
#5 query_respond lib/ns/query.c:7432
#6 query_prepresponse lib/ns/query.c:9946
#7 query_gotanswer lib/ns/query.c:6863
#8 query_lookup lib/ns/query.c:5624
#9 ns__query_start lib/ns/query.c:5500
#10 query_setup lib/ns/query.c:5224
#11 ns_query_start lib/ns/query.c:11351
#12 ns__client_request lib/ns/client.c:2178
#13 udp_recv_cb netmgr/udp.c:377
#14 <null> <null>
#15 <null> <null>
Previous write of size 8 at 0x000000000001 by thread T2 (mutexes: write M1):
#0 rehash_gluetable lib/dns/rbtdb.c:10070
#1 rdataset_addglue lib/dns/rbtdb.c:10426
#2 dns_rdataset_addglue lib/dns/rdataset.c:747
#3 query_additional lib/ns/query.c:2105
#4 query_addrrset lib/ns/query.c:2194
#5 query_prepare_delegation_response lib/ns/query.c:7932
#6 query_zone_delegation lib/ns/query.c:8039
#7 query_delegation lib/ns/query.c:8064
#8 query_gotanswer lib/ns/query.c:6875
#9 query_lookup lib/ns/query.c:5624
#10 ns__query_start lib/ns/query.c:5500
#11 query_setup lib/ns/query.c:5224
#12 ns_query_start lib/ns/query.c:11351
#13 ns__client_request lib/ns/client.c:2178
#14 udp_recv_cb netmgr/udp.c:377
#15 <null> <null>
#16 <null> <null>
Location is heap block of size 537 at 0x000000000019 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 allocate_version lib/dns/rbtdb.c:1302
#9 dns_rbtdb_create lib/dns/rbtdb.c:8707
#10 dns_db_create lib/dns/db.c:118
#11 zone_load lib/dns/zone.c:2225
#12 zone_asyncload lib/dns/zone.c:2314
#13 dispatch lib/isc/task.c:1152
#14 run lib/isc/task.c:1344
#15 <null> <null>
Mutex M1 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_nm_start netmgr/netmgr.c:215
#3 create_managers bin/named/main.c:907
#4 setup bin/named/main.c:1221
#5 main bin/named/main.c:1521
Thread T2 (running) created by main thread at:
#0 pthread_create <null>
#1 isc_thread_create pthreads/thread.c:73
#2 isc_nm_start netmgr/netmgr.c:215
#3 create_managers bin/named/main.c:907
#4 setup bin/named/main.c:1221
#5 main bin/named/main.c:1521
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:913
#4 setup bin/named/main.c:1221
#5 main bin/named/main.c:1521
SUMMARY: ThreadSanitizer: data race lib/dns/rbtdb.c:10254 in rdataset_addglue