Lock zone before calling zone_namerd_tostr()

    WARNING: ThreadSanitizer: data race
    Read of size 8 at 0x000000000001 by thread T1:
    #0 inline_raw lib/dns/zone.c:1375
    #1 zone_namerd_tostr lib/dns/zone.c:15316
    #2 dns_zone_name lib/dns/zone.c:15391
    #3 xfrin_log lib/dns/xfrin.c:1605
    #4 xfrin_destroy lib/dns/xfrin.c:1477
    #5 dns_xfrin_detach lib/dns/xfrin.c:739
    #6 xfrin_connect_done lib/dns/xfrin.c:970
    #7 tcpdnsconnect_cb netmgr/tcpdns.c:786
    #8 tcp_connect_cb netmgr/tcp.c:292
    #9 <null> <null>
    #10 <null> <null>

    Previous write of size 8 at 0x000000000001 by thread T2 (mutexes: write M1):
    #0 zone_shutdown lib/dns/zone.c:14462
    #1 dispatch lib/isc/task.c:1152
    #2 run lib/isc/task.c:1344
    #3 <null> <null>

    Location is heap block of size 2769 at 0x000000000013 allocated by thread T3:
    #0 malloc <null>
    #1 default_memalloc lib/isc/mem.c:713
    #2 mem_get lib/isc/mem.c:622
    #3 mem_allocateunlocked lib/isc/mem.c:1268
    #4 isc___mem_allocate lib/isc/mem.c:1288
    #5 isc__mem_allocate lib/isc/mem.c:2453
    #6 isc___mem_get lib/isc/mem.c:1037
    #7 isc__mem_get lib/isc/mem.c:2432
    #8 dns_zone_create lib/dns/zone.c:984
    #9 configure_zone bin/named/server.c:6502
    #10 do_addzone bin/named/server.c:13391
    #11 named_server_changezone bin/named/server.c:13788
    #12 named_control_docommand bin/named/control.c:207
    #13 control_command bin/named/controlconf.c:392
    #14 dispatch lib/isc/task.c:1152
    #15 run lib/isc/task.c:1344
    #16 <null> <null>

(cherry picked from commit 84f43903)
83 jobs for !4378 with 2259-zone_namerd_tostr-called-w-o-lock-being-held-v9_11 in 37 minutes and 6 seconds (queued for 1 minute and 12 seconds)
detached
Status Job ID Name Coverage
  Precheck
passed #1286746
linux amd64
autoreconf

00:00:16

passed #1286752
linux amd64
clang-format

00:00:07

passed #1286755
linux amd64
coccinelle

00:01:02

passed #1286758
linux amd64
danger

00:00:14

passed #1286749
linux amd64
misc

00:00:14

 
  Build
passed #1286804
linux amd64
clang:asan

00:04:25

passed #1286819
linux amd64
clang:buster:amd64

00:02:08

passed #1286825
amd64 libvirt
clang:freebsd11:amd64

00:01:52

passed #1286828
amd64 libvirt
clang:freebsd12:amd64

00:01:52

passed #1286831
amd64 libvirt
clang:openbsd:amd64

00:04:00

passed #1286809
linux amd64
clang:tsan

00:02:29

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

00:01:46

passed #1286801
linux amd64
gcc:asan

00:03:31

passed #1286777
linux amd64
gcc:buster:amd64

00:01:30

passed #1286764
linux amd64
gcc:centos6:amd64

00:01:21

passed #1286767
linux amd64
gcc:centos7:amd64

00:01:27

passed #1286770
linux amd64
gcc:centos8:amd64

00:01:40

passed #1286792
linux amd64
gcc:fedora33:amd64

00:01:43

passed #1286798
linux amd64
gcc:focal:amd64

00:01:37

passed #1286813
linux amd64
gcc:mutexatomics

00:01:52

passed #1286816
linux amd64
gcc:noatomics

00:02:05

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

00:01:38

passed #1286822
linux amd64
gcc:pkcs11

00:01:44

passed #1286780
linux amd64
gcc:sid:amd64

00:02:25

passed #1286785
linux i386
gcc:sid:i386

00:01:47

passed #1286774
linux amd64
gcc:stretch:amd64

00:01:50

passed #1286807
linux amd64
gcc:tsan

00:02:05

passed #1286789
linux amd64
gcc:tumbleweed:amd64

00:01:42

passed #1286795
linux amd64
gcc:xenial:amd64

00:01:48

passed #1286837
amd64 windows
msvc:windows:amd64

00:01:08

passed #1286834
linux amd64
nolibtool:sid:amd64

00:02:14

 
  Unit
passed #1286880
linux amd64
unit:clang:asan

00:01:15

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

00:00:32

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

00:01:07

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

00:00:54

passed #1286887
linux amd64
unit:clang:tsan

00:04:14

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

00:00:35

passed #1286877
linux amd64
unit:gcc:asan

00:01:18

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

00:01:08

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

00:00:43

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

00:00:35

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

00:00:34

passed #1286867
linux amd64
unit:gcc:fedora33:amd64

00:00:39

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

00:00:36

passed #1286888
linux amd64
unit:gcc:mutexatomics

00:00:32

passed #1286891
linux amd64
unit:gcc:noatomics

00:00:38

passed #1286897
linux amd64
unit:gcc:pkcs11

00:00:42

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

00:00:34

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

00:00:31

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

00:00:35

passed #1286883
linux amd64
unit:gcc:tsan

00:05:01

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

00:00:38

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

00:00:41

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

00:00:46

 
  System
passed #1286950
linux amd64
system:clang:asan

00:09:09

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

00:07:37

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

00:08:21

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

00:08:13

passed #1286956
linux amd64
system:clang:tsan

00:11:30

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

00:07:23

passed #1286947
linux amd64
system:gcc:asan

00:09:18

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

00:08:08

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

00:07:17

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

00:07:22

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

00:07:13

passed #1286937
linux amd64
system:gcc:fedora33:amd64

00:07:12

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

00:07:11

passed #1286959
linux amd64
system:gcc:mutexatomics

00:07:15

passed #1286961
linux amd64
system:gcc:noatomics

00:07:23

passed #1286964
linux amd64
system:gcc:pkcs11

00:07:53

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

00:07:03

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

00:06:44

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

00:07:21

passed #1286953
linux amd64
system:gcc:tsan

00:12:36

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

00:07:02

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

00:06:46

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

00:07:11

 
  Docs
passed #1286972
linux amd64
docs

00:00:28

 
  Postcheck
passed #1286981
linux amd64
cppcheck

00:00:26

passed #1286974
linux amd64
flake8

00:00:21

passed #1286982
linux amd64
gcov

00:00:35

74.0%
passed #1286976
linux amd64
pylint

00:00:22

passed #1286978
linux amd64
scan-build

00:08:33