ThreadSanitizer: data race in closedir
Custom experimental snapshot of gcc version 11.0.0 20210124 on Fedora 33 (as well as GCC 10.2.1 the default Fedora 33 compiler) identified following data race in closedir
when integrity
, idna
, and few other system test were run:
WARNING: ThreadSanitizer: data race
Write of size 8 at 0x000000000001 by thread T1:
#0 closedir <null>
#1 isc_dir_close lib/isc/unix/dir.c:134
#2 dns_dnssec_findmatchingkeys lib/dns/dnssec.c:1526
#3 statefile_exist lib/dns/zone.c:5858
#4 dns_zone_secure_to_insecure lib/dns/zone.c:5905
#5 dns_zone_use_kasp lib/dns/zone.c:5917
#6 add_sigs lib/dns/zone.c:6901
#7 dns__zone_updatesigs lib/dns/zone.c:8225
#8 zone_nsec3chain lib/dns/zone.c:8921
#9 zone_maintenance lib/dns/zone.c:11211
#10 zone_timer lib/dns/zone.c:14674
#11 dispatch lib/isc/task.c:1152
#12 run lib/isc/task.c:1344
#13 <null> <null>
Previous read of size 8 at 0x000000000001 by thread T2:
#0 epoll_ctl <null>
#1 uv__platform_invalidate_fd <null>
#2 uv_run <null>
#3 <null> <null>
Location is file descriptor 143 created by thread T2 at:
#0 accept4 <null>
#1 uv__accept <null>
#2 <null> <null>
Thread T1 (running) created by main thread at:
#0 pthread_create <null>
#1 isc_thread_create lib/isc/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 lib/isc/pthreads/thread.c:73
#2 isc_nm_start lib/isc/netmgr/netmgr.c:290
#3 create_managers bin/named/main.c:934
#4 setup bin/named/main.c:1248
#5 main bin/named/main.c:1548
SUMMARY: ThreadSanitizer: data race in closedir
Edited by Michal Nowak