It appears that you can't change what you are polling for while connecting.

    WARNING: ThreadSanitizer: data race
    Read of size 8 at 0x000000000001 by thread T1 (mutexes: write M1):
    #0 epoll_ctl <null>
    #1 watch_fd lib/isc/unix/socket.c:704:8
    #2 wakeup_socket lib/isc/unix/socket.c:897:11
    #3 process_ctlfd lib/isc/unix/socket.c:3362:3
    #4 process_fds lib/isc/unix/socket.c:3275:10
    #5 netthread lib/isc/unix/socket.c:3516:10

    Previous write of size 8 at 0x000000000001 by thread T2 (mutexes: write M2):
    #0 connect <null>
    #1 isc_socket_connect lib/isc/unix/socket.c:4737:7
    #2 resquery_send lib/dns/resolver.c:2892:13
    #3 fctx_query lib/dns/resolver.c:2202:12
    #4 fctx_try lib/dns/resolver.c:4300:11
    #5 resquery_connected lib/dns/resolver.c:3130:4
    #6 dispatch lib/isc/task.c:1152:7
    #7 run lib/isc/task.c:1344:2

    Location is file descriptor 513 created by thread T2 at:
    #0 connect <null>
    #1 isc_socket_connect lib/isc/unix/socket.c:4737:7
    #2 resquery_send lib/dns/resolver.c:2892:13
    #3 fctx_query lib/dns/resolver.c:2202:12
    #4 fctx_try lib/dns/resolver.c:4300:11
    #5 resquery_connected lib/dns/resolver.c:3130:4
    #6 dispatch lib/isc/task.c:1152:7
    #7 run lib/isc/task.c:1344:2

    Mutex M1 (0x000000000016) created at:
    #0 pthread_mutex_init <null>
    #1 isc__mutex_init lib/isc/pthreads/mutex.c:288:8
    #2 setup_thread lib/isc/unix/socket.c:3584:3
    #3 isc_socketmgr_create2 lib/isc/unix/socket.c:3825:3
    #4 create_managers bin/named/main.c:932:11
    #5 setup bin/named/main.c:1223:11
    #6 main bin/named/main.c:1523:2

    Mutex M2 is already destroyed.

    Thread T1 'isc-socket-1' (running) created by main thread at:
    #0 pthread_create <null>
    #1 isc_thread_create lib/isc/pthreads/thread.c:73:8
    #2 isc_socketmgr_create2 lib/isc/unix/socket.c:3826:3
    #3 create_managers bin/named/main.c:932:11
    #4 setup bin/named/main.c:1223:11
    #5 main bin/named/main.c:1523:2

    Thread T2 (running) created by main thread at:
    #0 pthread_create <null>
    #1 isc_thread_create lib/isc/pthreads/thread.c:73:8
    #2 isc_taskmgr_create lib/isc/task.c:1434:3
    #3 create_managers bin/named/main.c:915:11
    #4 setup bin/named/main.c:1223:11
    #5 main bin/named/main.c:1523:2

    SUMMARY: ThreadSanitizer: data race in epoll_ctl
74 jobs for !4171 with 2162-threadsanitizer-data-race-in-epoll_ctl in 61 minutes and 43 seconds (queued for 9 seconds)
latest detached
Status Job ID Name Coverage
  Autoconf
passed #1176451
amd64 linux
autoreconf

00:00:17

 
  Precheck
passed #1176453
amd64 linux
clang-format

00:00:15

passed #1176454
amd64 linux
coccinelle

00:03:25

passed #1176455
amd64 linux
danger

00:00:19

passed #1176452
amd64 linux
misc

00:00:15

passed #1176456
amd64 linux
tarball-create

00:01:36

 
  Build
passed #1176469
amd64 linux
clang:asan

00:02:13

passed #1176473
amd64 linux
clang:buster:amd64

00:01:03

passed #1176476
amd64 libvirt
clang:freebsd11:amd64

00:01:15

passed #1176477
amd64 libvirt
clang:freebsd12:amd64

00:01:08

passed #1176478
amd64 libvirt
clang:openbsd:amd64

00:02:46

passed #1176471
amd64 linux
clang:tsan

00:01:15

passed #1176457
amd64 linux
gcc:alpine3.12:amd64

00:00:54

passed #1176468
amd64 linux
gcc:asan

00:01:43

passed #1176461
amd64 linux
gcc:buster:amd64

00:00:53

passed #1176458
amd64 linux
gcc:centos7:amd64

00:00:53

passed #1176459
amd64 linux
gcc:centos8:amd64

00:00:53

passed #1176467
amd64 linux
gcc:focal:amd64

00:00:55

passed #1176472
amd64 linux
gcc:mutexatomics

00:00:55

passed #1176463
amd64 linux
gcc:out-of-tree

00:00:55

passed #1176462
amd64 linux
gcc:sid:amd64

00:01:14

passed #1176464
i386 linux
gcc:sid:i386

00:00:58

passed #1176474
amd64 linux
gcc:softhsm2.4

00:00:54

passed #1176475
amd64 linux
gcc:softhsm2.6

00:00:55

passed #1176460
amd64 linux
gcc:stretch:amd64

00:01:03

passed #1176470
amd64 linux
gcc:tsan

00:01:08

passed #1176465
amd64 linux
gcc:tumbleweed:amd64

00:00:45

passed #1176466
amd64 linux
gcc:xenial:amd64

00:01:01

passed #1176479
amd64 windows
msvc:windows:amd64

00:00:51

 
  Unit
passed #1176491
amd64 linux
unit:clang:asan

00:01:14

passed #1176495
amd64 linux
unit:clang:buster:amd64

00:00:57

passed #1176498
amd64 libvirt
unit:clang:freebsd11:amd64

00:01:34

failed #1176499
amd64 libvirt
unit:clang:freebsd12:amd64

01:00:00

passed #1176493
amd64 linux
unit:clang:tsan

00:02:57

passed #1176480
amd64 linux
unit:gcc:alpine3.12:amd64

00:01:03

passed #1176490
amd64 linux
unit:gcc:asan

00:01:15

passed #1176484
amd64 linux
unit:gcc:buster:amd64

00:01:00

passed #1176481
amd64 linux
unit:gcc:centos7:amd64

00:00:58

passed #1176482
amd64 linux
unit:gcc:centos8:amd64

00:00:58

passed #1176489
amd64 linux
unit:gcc:focal:amd64

00:00:58

passed #1176494
amd64 linux
unit:gcc:mutexatomics

00:01:03

passed #1176485
amd64 linux
unit:gcc:sid:amd64

00:01:00

passed #1176486
i386 linux
unit:gcc:sid:i386

00:01:04

passed #1176496
amd64 linux
unit:gcc:softhsm2.4

00:00:57

passed #1176497
amd64 linux
unit:gcc:softhsm2.6

00:00:56

passed #1176483
amd64 linux
unit:gcc:stretch:amd64

00:00:56

passed #1176492
amd64 linux
unit:gcc:tsan

00:03:55

passed #1176487
amd64 linux
unit:gcc:tumbleweed:amd64

00:00:56

passed #1176488
amd64 linux
unit:gcc:xenial:amd64

00:00:59

 
  System
passed #1176511
amd64 linux
system:clang:asan

00:11:53

passed #1176515
amd64 linux
system:clang:buster:amd64

00:10:46

passed #1176518
amd64 libvirt
system:clang:freebsd11:amd64

00:10:44

passed #1176519
amd64 libvirt
system:clang:freebsd12:amd64

00:09:57

failed #1176513
amd64 linux allowed to fail
system:clang:tsan

00:13:29

passed #1176500
amd64 linux
system:gcc:alpine3.12:amd64

00:11:47

passed #1176510
amd64 linux
system:gcc:asan

00:12:08

passed #1176504
amd64 linux
system:gcc:buster:amd64

00:10:35

passed #1176501
amd64 linux
system:gcc:centos7:amd64

00:10:50

passed #1176502
amd64 linux
system:gcc:centos8:amd64

00:11:12

passed #1176509
amd64 linux
system:gcc:focal:amd64

00:11:15

passed #1176514
amd64 linux
system:gcc:mutexatomics

00:10:30

passed #1176505
amd64 linux
system:gcc:sid:amd64

00:10:00

passed #1176506
i386 linux
system:gcc:sid:i386

00:10:57

passed #1176516
amd64 linux
system:gcc:softhsm2.4

00:10:05

passed #1176517
amd64 linux
system:gcc:softhsm2.6

00:11:36

passed #1176503
amd64 linux
system:gcc:stretch:amd64

00:10:59

failed #1176512
amd64 linux allowed to fail
system:gcc:tsan

00:14:00

passed #1176507
amd64 linux
system:gcc:tumbleweed:amd64

00:10:33

passed #1176508
amd64 linux
system:gcc:xenial:amd64

00:10:45

 
  Docs
passed #1176520
amd64 linux
docs

00:00:36

 
  Postcheck
passed #1176524
amd64 linux
cppcheck

00:00:41

passed #1176521
amd64 linux
flake8

00:00:25

passed #1176522
amd64 linux
pylint

00:00:28

passed #1176523
amd64 linux
scan-build

00:04:21

 
Name Stage Failure
failed
unit:clang:freebsd12:amd64 Unit The script exceeded the maximum execution time set for the job
PASS: time_test
--- timer_test.log ---
--- random_test.log ---
PASS: random_test
--- mem_test.log ---
PASS: mem_test
--- task_test.log ---
PASS: task_test
ERROR: Job failed: execution took longer than 1h0m0s seconds
failed
system:gcc:tsan System
E:rpzrecurse:2020-09-23T04:02:41+0000
FAIL rpzrecurse (exit status: 1)

$ find bin -name 'tsan.*' -exec python3 util/parse_tsan.py {} \;
Uploading artifacts for failed job
Uploading artifacts...
untracked: found 2889 files

Uploading artifacts as "archive" to coordinator... ok
id=1176512 responseStatus=201 Created token=u5mEs5n8
ERROR: Job failed: exit code 1
failed
system:clang:tsan System
E:rpzrecurse:2020-09-23T04:02:42+0000
FAIL rpzrecurse (exit status: 1)

$ find bin -name 'tsan.*' -exec python3 util/parse_tsan.py {} \;
Uploading artifacts for failed job
Uploading artifacts...
untracked: found 2890 files

Uploading artifacts as "archive" to coordinator... ok
id=1176513 responseStatus=201 Created token=fkfoiMUN
ERROR: Job failed: exit code 1