Lock access to control->symtab to prevent data race

    WARNING: ThreadSanitizer: data race
    Read of size 8 at 0x000000000001 by thread T1:
    #0 isccc_symtab_foreach lib/isccc/symtab.c:277:14
    #1 isccc_cc_cleansymtab lib/isccc/cc.c:954:2
    #2 control_recvmessage bin/named/controlconf.c:477:2
    #3 recv_data lib/isccc/ccmsg.c:110:2
    #4 read_cb lib/isc/netmgr/tcp.c:769:4
    #5 <null> <null>

    Previous write of size 8 at 0x000000000001 by thread T2:
    #0 isccc_symtab_define lib/isccc/symtab.c:242:2
    #1 isccc_cc_checkdup lib/isccc/cc.c:1026:11
    #2 control_recvmessage bin/named/controlconf.c:478:11
    #3 recv_data lib/isccc/ccmsg.c:110:2
    #4 read_cb lib/isc/netmgr/tcp.c:769:4
    #5 <null> <null>

    Location is heap block of size 190352 at 0x000000000011 allocated by main thread:
    #0 malloc <null>
    #1 isccc_symtab_create lib/isccc/symtab.c:76:18
    #2 isccc_cc_createsymtab lib/isccc/cc.c:948:10
    #3 named_controls_create bin/named/controlconf.c:1483:11
    #4 named_server_create bin/named/server.c:10057:2
    #5 setup bin/named/main.c:1256:2
    #6 main bin/named/main.c:1523:2

    Thread T1 (running) created by main thread at:
    #0 pthread_create <null>
    #1 isc_thread_create lib/isc/pthreads/thread.c:73:8
    #2 isc_nm_start lib/isc/netmgr/netmgr.c:215:3
    #3 create_managers bin/named/main.c:909:15
    #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_nm_start lib/isc/netmgr/netmgr.c:215:3
    #3 create_managers bin/named/main.c:909:15
    #4 setup bin/named/main.c:1223:11
    #5 main bin/named/main.c:1523:2

    SUMMARY: ThreadSanitizer: data race lib/isccc/symtab.c:277:14 in isccc_symtab_foreach

(cherry picked from commit 0450acc1)
79 jobs for !4139 with 2131-tsan-data-race-in-accessing-controls-symtab-v9_11 in 14 minutes and 55 seconds (queued for 7 seconds)
latest detached
Status Job ID Name Coverage
  Precheck
passed #1162802
amd64 linux
autoreconf

00:00:15

passed #1162804
amd64 linux
clang-format

00:00:09

passed #1162805
amd64 linux
coccinelle

00:01:05

passed #1162806
amd64 linux
danger

00:00:13

passed #1162803
amd64 linux
misc

00:00:16

 
  Build
passed #1162821
amd64 linux
clang:asan

00:04:32

passed #1162825
amd64 linux
clang:buster:amd64

00:02:08

passed #1162827
amd64 libvirt
clang:freebsd11:amd64

00:02:22

passed #1162828
amd64 libvirt
clang:freebsd12:amd64

00:01:44

passed #1162829
amd64 libvirt
clang:openbsd:amd64

00:04:05

passed #1162823
amd64 linux
clang:tsan

00:02:36

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

00:01:58

passed #1162820
amd64 linux
gcc:asan

00:03:33

passed #1162812
amd64 linux
gcc:buster:amd64

00:01:49

passed #1162808
amd64 linux
gcc:centos6:amd64

00:01:34

passed #1162809
amd64 linux
gcc:centos7:amd64

00:01:46

passed #1162810
amd64 linux
gcc:centos8:amd64

00:01:46

passed #1162817
amd64 linux
gcc:fedora32:amd64

00:01:52

passed #1162819
amd64 linux
gcc:focal:amd64

00:02:10

passed #1162824
amd64 linux
gcc:mutexatomics

00:01:40

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

00:01:54

passed #1162826
amd64 linux
gcc:pkcs11

00:01:47

passed #1162813
amd64 linux
gcc:sid:amd64

00:02:48

passed #1162815
i386 linux
gcc:sid:i386

00:02:02

passed #1162811
amd64 linux
gcc:stretch:amd64

00:02:03

passed #1162822
amd64 linux
gcc:tsan

00:02:14

passed #1162816
amd64 linux
gcc:tumbleweed:amd64

00:01:44

passed #1162818
amd64 linux
gcc:xenial:amd64

00:02:07

passed #1162831
amd64 windows
msvc:windows:amd64

00:00:56

passed #1162830
amd64 linux
nolibtool:sid:amd64

00:02:49

 
  Unit
passed #1162845
amd64 linux
unit:clang:asan

00:01:14

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

00:00:31

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

00:01:17

passed #1162852
amd64 libvirt
unit:clang:freebsd12:amd64

00:00:56

passed #1162847
amd64 linux
unit:clang:tsan

00:04:17

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

00:00:34

passed #1162844
amd64 linux
unit:gcc:asan

00:01:15

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

00:00:31

passed #1162833
amd64 linux
unit:gcc:centos6:amd64

00:00:37

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

00:00:36

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

00:00:34

passed #1162841
amd64 linux
unit:gcc:fedora32:amd64

00:00:34

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

00:00:49

passed #1162848
amd64 linux
unit:gcc:mutexatomics

00:00:34

passed #1162850
amd64 linux
unit:gcc:pkcs11

00:00:35

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

00:00:31

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

00:00:29

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

00:00:30

passed #1162846
amd64 linux
unit:gcc:tsan

00:05:06

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

00:00:33

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

00:00:49

passed #1162853
amd64 linux
unit:nolibtool:sid:amd64

00:00:56

 
  System
passed #1162867
amd64 linux
system:clang:asan

00:09:16

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

00:07:16

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

00:08:11

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

00:08:07

passed #1162869
amd64 linux
system:clang:tsan

00:11:06

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

00:07:28

passed #1162866
amd64 linux
system:gcc:asan

00:09:13

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

00:07:18

passed #1162855
amd64 linux
system:gcc:centos6:amd64

00:07:23

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

00:07:25

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

00:07:29

passed #1162863
amd64 linux
system:gcc:fedora32:amd64

00:07:15

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

00:07:12

passed #1162870
amd64 linux
system:gcc:mutexatomics

00:07:32

passed #1162872
amd64 linux
system:gcc:pkcs11

00:07:57

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

00:07:08

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

00:07:26

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

00:07:08

passed #1162868
amd64 linux
system:gcc:tsan

00:12:13

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

00:07:22

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

00:06:56

passed #1162875
amd64 linux
system:nolibtool:sid:amd64

00:07:16

 
  Docs
passed #1162876
amd64 linux
docs

00:00:28

 
  Postcheck
passed #1162880
amd64 linux
cppcheck

00:00:26

passed #1162877
amd64 linux
flake8

00:00:20

passed #1162878
amd64 linux
pylint

00:00:22

passed #1162879
amd64 linux
scan-build

00:09:54