v9_11 timer_test tsan errors
WARNING: ThreadSanitizer: data race (pid=1842)
Write of size 4 at 0x000000f195b0 by thread T1:
#0 ticktock /builds/isc-projects/bind9/lib/isc/tests/timer_test.c:162:2 (timer_test+0x4b786d)
#1 dispatch /builds/isc-projects/bind9/lib/isc/task.c:1157:7 (libisc.so.1105+0x50785)
#2 run /builds/isc-projects/bind9/lib/isc/task.c:1331:2 (libisc.so.1105+0x4d6d9)
Previous read of size 4 at 0x000000f195b0 by main thread (mutexes: write M1051):
#0 setup_test /builds/isc-projects/bind9/lib/isc/tests/timer_test.c:140:9 (timer_test+0x4b7697)
#1 ticker /builds/isc-projects/bind9/lib/isc/tests/timer_test.c:225:2 (timer_test+0x4b6d05)
#2 <null> <null> (libcmocka.so.0+0x50d8)
#3 __libc_start_main /build/glibc-vjB4T1/glibc-2.28/csu/../csu/libc-start.c:308:16 (libc.so.6+0x2409a)
Location is global 'eventcnt' of size 4 at 0x000000f195b0 (timer_test+0x000000f195b0)
Mutex M1051 (0x000000f195b8) created at:
#0 pthread_mutex_init <null> (timer_test+0x42b2cd)
#1 isc__mutex_init /builds/isc-projects/bind9/lib/isc/pthreads/mutex.c:287:8 (libisc.so.1105+0x72317)
#2 setup_test /builds/isc-projects/bind9/lib/isc/tests/timer_test.c:115:11 (timer_test+0x4b759d)
#3 ticker /builds/isc-projects/bind9/lib/isc/tests/timer_test.c:225:2 (timer_test+0x4b6d05)
#4 <null> <null> (libcmocka.so.0+0x50d8)
#5 __libc_start_main /build/glibc-vjB4T1/glibc-2.28/csu/../csu/libc-start.c:308:16 (libc.so.6+0x2409a)
Thread T1 'isc-worker0000' (tid=1857, running) created by main thread at:
#0 pthread_create <null> (timer_test+0x429d4b)
#1 isc_thread_create /builds/isc-projects/bind9/lib/isc/pthreads/thread.c:60:8 (libisc.so.1105+0x72488)
#2 isc__taskmgr_create /builds/isc-projects/bind9/lib/isc/task.c:1468:7 (libisc.so.1105+0x4d5e5)
#3 isc_taskmgr_create /builds/isc-projects/bind9/lib/isc/task.c:2109:11 (libisc.so.1105+0x4f537)
#4 create_managers /builds/isc-projects/bind9/lib/isc/tests/isctest.c:96:2 (timer_test+0x4b8910)
#5 isc_test_begin /builds/isc-projects/bind9/lib/isc/tests/isctest.c:157:3 (timer_test+0x4b883b)
#6 _setup /builds/isc-projects/bind9/lib/isc/tests/timer_test.c:69:11 (timer_test+0x4b6d3d)
#7 <null> <null> (libcmocka.so.0+0x51e2)
#8 __libc_start_main /build/glibc-vjB4T1/glibc-2.28/csu/../csu/libc-start.c:308:16 (libc.so.6+0x2409a)
SUMMARY: ThreadSanitizer: data race /builds/isc-projects/bind9/lib/isc/tests/timer_test.c:162:2 in ticktock