ThreadSanitizer: data race (bin/named/.libs/named+0x446212) in epoll_ctl
Compiled with clang-9
:
WARNING: ThreadSanitizer: data race (pid=2231)
Read of size 8 at 0x7ba000002000 by thread T18:
#0 epoll_ctl <null> (named+0x446212)
#1 watch_fd /home/ondrej/Projects/bind9/lib/isc/unix/socket.c:717:8 (libisc.so.1504+0x6535f)
#2 wakeup_socket /home/ondrej/Projects/bind9/lib/isc/unix/socket.c:915:11 (libisc.so.1504+0x68756)
#3 process_ctlfd /home/ondrej/Projects/bind9/lib/isc/unix/socket.c:3348:3 (libisc.so.1504+0x65a05)
#4 process_fds /home/ondrej/Projects/bind9/lib/isc/unix/socket.c:3263:10 (libisc.so.1504+0x65511)
#5 netthread /home/ondrej/Projects/bind9/lib/isc/unix/socket.c:3503:10 (libisc.so.1504+0x5f808)
Previous write of size 8 at 0x7ba000002000 by thread T9 (mutexes: write M641617021091569312):
#0 connect <null> (named+0x444c80)
#1 isc_socket_connect /home/ondrej/Projects/bind9/lib/isc/unix/socket.c:4750:7 (libisc.so.1504+0x62910)
#2 resquery_send /home/ondrej/Projects/bind9/lib/dns/resolver.c:2799:13 (libdns.so.1505+0x16564f)
#3 fctx_query /home/ondrej/Projects/bind9/lib/dns/resolver.c:2153:12 (libdns.so.1505+0x161233)
#4 fctx_try /home/ondrej/Projects/bind9/lib/dns/resolver.c:4141:11 (libdns.so.1505+0x15d801)
#5 rctx_nextserver /home/ondrej/Projects/bind9/lib/dns/resolver.c:9358:2 (libdns.so.1505+0x1699e1)
#6 rctx_done /home/ondrej/Projects/bind9/lib/dns/resolver.c:9498:3 (libdns.so.1505+0x16706c)
#7 resquery_response /home/ondrej/Projects/bind9/lib/dns/resolver.c (libdns.so.1505+0x165d43)
#8 dispatch /home/ondrej/Projects/bind9/lib/isc/task.c:1134:7 (libisc.so.1504+0x52007)
#9 run /home/ondrej/Projects/bind9/lib/isc/task.c:1319:2 (libisc.so.1504+0x4f3a8)
Location is file descriptor 512 created by thread T9 at:
#0 connect <null> (named+0x444c80)
#1 isc_socket_connect /home/ondrej/Projects/bind9/lib/isc/unix/socket.c:4750:7 (libisc.so.1504+0x62910)
#2 resquery_send /home/ondrej/Projects/bind9/lib/dns/resolver.c:2799:13 (libdns.so.1505+0x16564f)
#3 fctx_query /home/ondrej/Projects/bind9/lib/dns/resolver.c:2153:12 (libdns.so.1505+0x161233)
#4 fctx_try /home/ondrej/Projects/bind9/lib/dns/resolver.c:4141:11 (libdns.so.1505+0x15d801)
#5 rctx_nextserver /home/ondrej/Projects/bind9/lib/dns/resolver.c:9358:2 (libdns.so.1505+0x1699e1)
#6 rctx_done /home/ondrej/Projects/bind9/lib/dns/resolver.c:9498:3 (libdns.so.1505+0x16706c)
#7 resquery_response /home/ondrej/Projects/bind9/lib/dns/resolver.c (libdns.so.1505+0x165d43)
#8 dispatch /home/ondrej/Projects/bind9/lib/isc/task.c:1134:7 (libisc.so.1504+0x52007)
#9 run /home/ondrej/Projects/bind9/lib/isc/task.c:1319:2 (libisc.so.1504+0x4f3a8)
Mutex M641617021091569312 is already destroyed.
Thread T18 'isc-socket-0' (tid=2266, running) created by main thread at:
#0 pthread_create <null> (named+0x44011b)
#1 isc_thread_create /home/ondrej/Projects/bind9/lib/isc/pthreads/thread.c:75:8 (libisc.so.1504+0x6a9ea)
#2 isc_socketmgr_create2 /home/ondrej/Projects/bind9/lib/isc/unix/socket.c:3817:3 (libisc.so.1504+0x5f273)
#3 create_managers /home/ondrej/Projects/bind9/bin/named/./main.c:919:11 (named+0x4db2bb)
#4 setup /home/ondrej/Projects/bind9/bin/named/./main.c:1235:11 (named+0x4d98fe)
#5 main /home/ondrej/Projects/bind9/bin/named/./main.c:1515:2 (named+0x4d85c2)
Thread T9 'isc-worker0000' (tid=2257, running) created by main thread at:
#0 pthread_create <null> (named+0x44011b)
#1 isc_thread_create /home/ondrej/Projects/bind9/lib/isc/pthreads/thread.c:75:8 (libisc.so.1504+0x6a9ea)
#2 isc_taskmgr_create /home/ondrej/Projects/bind9/lib/isc/task.c:1410:3 (libisc.so.1504+0x4f1b2)
#3 create_managers /home/ondrej/Projects/bind9/bin/named/./main.c:902:11 (named+0x4db206)
#4 setup /home/ondrej/Projects/bind9/bin/named/./main.c:1235:11 (named+0x4d98fe)
#5 main /home/ondrej/Projects/bind9/bin/named/./main.c:1515:2 (named+0x4d85c2)
SUMMARY: ThreadSanitizer: data race (/home/ondrej/Projects/bind9/bin/named/.libs/named+0x446212) in epoll_ctl