ThreadSanitizer: data race in closedir
Same issue as #2457 (closed) this time on Debian 11 with Clang:
WARNING: ThreadSanitizer: data race
Write of size 8 at 0x000000000001 by thread T1:
#0 closedir <null>
#1 isc_dir_close lib/isc/dir.c:134:8
#2 dns_dnssec_findmatchingkeys lib/dns/dnssec.c:1514:3
#3 zone_rekey lib/dns/zone.c:21567:11
#4 zone_maintenance lib/dns/zone.c:11386:4
#5 zone_timer lib/dns/zone.c:15039:2
#6 task_run lib/isc/task.c:827:5
#7 isc_task_run lib/isc/task.c:907:10
#8 isc__nm_async_task lib/isc/netmgr/netmgr.c:834:11
#9 process_netievent lib/isc/netmgr/netmgr.c
#10 process_queue lib/isc/netmgr/netmgr.c:1007:16
#11 process_all_queues lib/isc/netmgr/netmgr.c:753:25
#12 async_cb lib/isc/netmgr/netmgr.c:782:6
#13 <null> <null>
#14 isc__trampoline_run lib/isc/trampoline.c:185:11
Previous read of size 8 at 0x000000000001 by thread T2:
#0 epoll_ctl <null>
#1 <null> <null>
#2 uv_run <null>
#3 isc__trampoline_run lib/isc/trampoline.c:185:11
Location is file descriptor 105 created by thread T2 at:
#0 accept4 <null>
#1 <null> <null>
#2 isc__trampoline_run lib/isc/trampoline.c:185:11
Thread T2 (running) created by main thread at:
#0 pthread_create <null>
#1 isc_thread_create lib/isc/thread.c:79:8
#2 isc__netmgr_create lib/isc/netmgr/netmgr.c:328:3
#3 isc_managers_create lib/isc/managers.c:36:2
#4 create_managers bin/named/main.c:920:11
#5 setup bin/named/main.c:1184:11
#6 main bin/named/main.c:1452:2
Thread T2 (running) created by main thread at:
#0 pthread_create <null>
#1 isc_thread_create lib/isc/thread.c:79:8
#2 isc__netmgr_create lib/isc/netmgr/netmgr.c:328:3
#3 isc_managers_create lib/isc/managers.c:36:2
#4 create_managers bin/named/main.c:920:11
#5 setup bin/named/main.c:1184:11
#6 main bin/named/main.c:1452:2
SUMMARY: ThreadSanitizer: data race in closedir
A blocker for base image upgrade from Debian 10 to Debian 11 (!5367 (merged)).
The solution is to have custom libuv for Debian 11 as have for Fedora already (https://gitlab.isc.org/isc-projects/images/-/merge_requests/112/diffs?commit_id=dd3c9f1d49f98a8d3584ef73478da8e9fdc2fd84).