ThreadSanitizer: data race in __interceptor_fclose
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 __interceptor_fclose
when the rndc
system test was run:
WARNING: ThreadSanitizer: data race
Write of size 8 at 0x000000000001 by thread T1 (mutexes: write M1, write M2):
#0 fclose <null>
#1 _nss_files_getprotobyname_r <null>
#2 dns_rdata_fromtext lib/dns/rdata.c:965
#3 load_text lib/dns/master.c:1862
#4 dns_master_loadfile lib/dns/master.c:2703
#5 zone_startload lib/dns/zone.c:2716
#6 zone_load lib/dns/zone.c:2281
#7 zone_asyncload lib/dns/zone.c:2342
#8 dispatch lib/isc/task.c:1152
#9 run lib/isc/task.c:1344
#10 <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>
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 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 __interceptor_fclose
Edited by Michal Nowak