ThreadSanitizer: data race lib/dns/rbtdb.c:1365 in newversion
TSAN report during the mkeys
system test on commit 1d79b314 (based on 9_16
): https://gitlab.isc.org/isc-projects/bind9/-/jobs/3201599
==================
WARNING: ThreadSanitizer: data race (pid=23059)
Read of size 1 at 0x7b54000214e4 by thread T10 (mutexes: write M1109428466744296080):
#0 newversion /builds/isc-projects/bind9/lib/dns/rbtdb.c:1365 (libdns-9.16.39-dev.so+0x103c4a)
#1 dns_db_newversion /builds/isc-projects/bind9/lib/dns/db.c:381 (libdns-9.16.39-dev.so+0x60449)
#2 zone_rekey /builds/isc-projects/bind9/lib/dns/zone.c:21430 (libdns-9.16.39-dev.so+0x22d043)
#3 zone_maintenance /builds/isc-projects/bind9/lib/dns/zone.c:11447 (libdns-9.16.39-dev.so+0x230c97)
#4 zone_timer /builds/isc-projects/bind9/lib/dns/zone.c:15066 (libdns-9.16.39-dev.so+0x230c97)
#5 task_run /builds/isc-projects/bind9/lib/isc/task.c:859 (libisc-9.16.39-dev.so+0x641c5)
#6 isc_task_run /builds/isc-projects/bind9/lib/isc/task.c:953 (libisc-9.16.39-dev.so+0x641c5)
#7 isc__nm_async_task /builds/isc-projects/bind9/lib/isc/netmgr/netmgr.c:871 (libisc-9.16.39-dev.so+0x3c472)
#8 process_netievent /builds/isc-projects/bind9/lib/isc/netmgr/netmgr.c:943 (libisc-9.16.39-dev.so+0x446f6)
#9 process_queue /builds/isc-projects/bind9/lib/isc/netmgr/netmgr.c:1009 (libisc-9.16.39-dev.so+0x45000)
#10 process_all_queues /builds/isc-projects/bind9/lib/isc/netmgr/netmgr.c:790 (libisc-9.16.39-dev.so+0x45ba3)
#11 async_cb /builds/isc-projects/bind9/lib/isc/netmgr/netmgr.c:819 (libisc-9.16.39-dev.so+0x45ba3)
#12 uv__async_io /usr/src/libuv-v1.44.1/src/unix/async.c:163 (libuv.so.1+0x1118e)
#13 isc__trampoline_run /builds/isc-projects/bind9/lib/isc/trampoline.c:213 (libisc-9.16.39-dev.so+0x6717a)
Previous write of size 1 at 0x7b54000214e4 by thread T8 (mutexes: read M1109709941721006800):
#0 setnsec3parameters /builds/isc-projects/bind9/lib/dns/rbtdb.c:2398 (libdns-9.16.39-dev.so+0x104961)
#1 iszonesecure /builds/isc-projects/bind9/lib/dns/rbtdb.c:2369 (libdns-9.16.39-dev.so+0x104961)
#2 endload /builds/isc-projects/bind9/lib/dns/rbtdb.c:7790 (libdns-9.16.39-dev.so+0x104f76)
#3 dns_db_endload /builds/isc-projects/bind9/lib/dns/db.c:297 (libdns-9.16.39-dev.so+0x60088)
#4 zone_loaddone /builds/isc-projects/bind9/lib/dns/zone.c:17843 (libdns-9.16.39-dev.so+0x23fcbb)
#5 load_quantum /builds/isc-projects/bind9/lib/dns/master.c:3238 (libdns-9.16.39-dev.so+0xa6635)
#6 task_run /builds/isc-projects/bind9/lib/isc/task.c:859 (libisc-9.16.39-dev.so+0x641c5)
#7 isc_task_run /builds/isc-projects/bind9/lib/isc/task.c:953 (libisc-9.16.39-dev.so+0x641c5)
#8 isc__nm_async_task /builds/isc-projects/bind9/lib/isc/netmgr/netmgr.c:871 (libisc-9.16.39-dev.so+0x3c472)
#9 process_netievent /builds/isc-projects/bind9/lib/isc/netmgr/netmgr.c:943 (libisc-9.16.39-dev.so+0x446f6)
#10 process_queue /builds/isc-projects/bind9/lib/isc/netmgr/netmgr.c:1009 (libisc-9.16.39-dev.so+0x45000)
#11 process_all_queues /builds/isc-projects/bind9/lib/isc/netmgr/netmgr.c:790 (libisc-9.16.39-dev.so+0x45ba3)
#12 async_cb /builds/isc-projects/bind9/lib/isc/netmgr/netmgr.c:819 (libisc-9.16.39-dev.so+0x45ba3)
#13 uv__async_io /usr/src/libuv-v1.44.1/src/unix/async.c:163 (libuv.so.1+0x1118e)
#14 isc__trampoline_run /builds/isc-projects/bind9/lib/isc/trampoline.c:213 (libisc-9.16.39-dev.so+0x6717a)
Location is heap block of size 537 at 0x7b5400021480 allocated by thread T8:
#0 malloc <null> (libtsan.so.2+0x3f618)
#1 default_memalloc /builds/isc-projects/bind9/lib/isc/mem.c:715 (libisc-9.16.39-dev.so+0x37004)
#2 mem_get /builds/isc-projects/bind9/lib/isc/mem.c:624 (libisc-9.16.39-dev.so+0x35c6c)
#3 mem_allocateunlocked /builds/isc-projects/bind9/lib/isc/mem.c:1289 (libisc-9.16.39-dev.so+0x37c3f)
#4 isc___mem_allocate /builds/isc-projects/bind9/lib/isc/mem.c:1309 (libisc-9.16.39-dev.so+0x37c3f)
#5 isc__mem_allocate /builds/isc-projects/bind9/lib/isc/mem.c:2405 (libisc-9.16.39-dev.so+0x3b4cd)
#6 isc___mem_get /builds/isc-projects/bind9/lib/isc/mem.c:1059 (libisc-9.16.39-dev.so+0x3b84d)
#7 isc__mem_get /builds/isc-projects/bind9/lib/isc/mem.c:2384 (libisc-9.16.39-dev.so+0x3ab4b)
#8 allocate_version /builds/isc-projects/bind9/lib/dns/rbtdb.c:1326 (libdns-9.16.39-dev.so+0xfb085)
#9 dns_rbtdb_create /builds/isc-projects/bind9/lib/dns/rbtdb.c:8834 (libdns-9.16.39-dev.so+0x117760)
#10 dns_db_create /builds/isc-projects/bind9/lib/dns/db.c:120 (libdns-9.16.39-dev.so+0x5f86b)
#11 zone_load /builds/isc-projects/bind9/lib/dns/zone.c:2307 (libdns-9.16.39-dev.so+0x23ef95)
#12 zone_asyncload /builds/isc-projects/bind9/lib/dns/zone.c:2396 (libdns-9.16.39-dev.so+0x23f646)
#13 task_run /builds/isc-projects/bind9/lib/isc/task.c:859 (libisc-9.16.39-dev.so+0x641c5)
#14 isc_task_run /builds/isc-projects/bind9/lib/isc/task.c:953 (libisc-9.16.39-dev.so+0x641c5)
#15 isc__nm_async_task /builds/isc-projects/bind9/lib/isc/netmgr/netmgr.c:871 (libisc-9.16.39-dev.so+0x3c472)
#16 process_netievent /builds/isc-projects/bind9/lib/isc/netmgr/netmgr.c:943 (libisc-9.16.39-dev.so+0x446f6)
#17 process_queue /builds/isc-projects/bind9/lib/isc/netmgr/netmgr.c:1009 (libisc-9.16.39-dev.so+0x45000)
#18 process_all_queues /builds/isc-projects/bind9/lib/isc/netmgr/netmgr.c:790 (libisc-9.16.39-dev.so+0x45ba3)
#19 async_cb /builds/isc-projects/bind9/lib/isc/netmgr/netmgr.c:819 (libisc-9.16.39-dev.so+0x45ba3)
#20 uv__async_io /usr/src/libuv-v1.44.1/src/unix/async.c:163 (libuv.so.1+0x1118e)
#21 isc__trampoline_run /builds/isc-projects/bind9/lib/isc/trampoline.c:213 (libisc-9.16.39-dev.so+0x6717a)
Mutex M1109428466744296080 is already destroyed.
Mutex M1109709941721006800 is already destroyed.
Thread T10 'isc-net-0009' (tid=23105, running) created by main thread at:
#0 pthread_create <null> (libtsan.so.2+0x5f0e6)
#1 isc_thread_create /builds/isc-projects/bind9/lib/isc/pthreads/thread.c:81 (libisc-9.16.39-dev.so+0x81d01)
#2 isc__netmgr_create /builds/isc-projects/bind9/lib/isc/netmgr/netmgr.c:355 (libisc-9.16.39-dev.so+0x3ce55)
#3 isc_managers_create /builds/isc-projects/bind9/lib/isc/managers.c:28 (libisc-9.16.39-dev.so+0x34669)
#4 create_managers main.c:1065 (named+0x427ca4)
#5 setup main.c:1390 (named+0x427ca4)
#6 main main.c:1704 (named+0x427ca4)
Thread T8 'isc-net-0007' (tid=23090, running) created by main thread at:
#0 pthread_create <null> (libtsan.so.2+0x5f0e6)
#1 isc_thread_create /builds/isc-projects/bind9/lib/isc/pthreads/thread.c:81 (libisc-9.16.39-dev.so+0x81d01)
#2 isc__netmgr_create /builds/isc-projects/bind9/lib/isc/netmgr/netmgr.c:355 (libisc-9.16.39-dev.so+0x3ce55)
#3 isc_managers_create /builds/isc-projects/bind9/lib/isc/managers.c:28 (libisc-9.16.39-dev.so+0x34669)
#4 create_managers main.c:1065 (named+0x427ca4)
#5 setup main.c:1390 (named+0x427ca4)
#6 main main.c:1704 (named+0x427ca4)
SUMMARY: ThreadSanitizer: data race /builds/isc-projects/bind9/lib/dns/rbtdb.c:1365 in newversion
==================