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)
80 jobs for !4377 with 2259-zone_namerd_tostr-called-w-o-lock-being-held-v9_16 in 34 minutes and 1 second (queued for 1 minute and 17 seconds)
detached
Status Job ID Name Coverage
  Precheck
passed #1286737
linux amd64
autoreconf

00:00:15

passed #1286739
linux amd64
clang-format

00:00:16

passed #1286740
linux amd64
coccinelle

00:03:21

passed #1286741
linux amd64
danger

00:00:13

passed #1286738
linux amd64
misc

00:00:12

 
  Build
passed #1286778
linux amd64
clang:asan

00:03:54

passed #1286790
linux amd64
clang:buster:amd64

00:01:41

passed #1286799
amd64 libvirt
clang:freebsd11:amd64

00:01:53

passed #1286802
amd64 libvirt
clang:freebsd12:amd64

00:01:50

passed #1286805
amd64 libvirt
clang:openbsd:amd64

00:03:49

passed #1286784
linux amd64
clang:tsan

00:02:14

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

00:01:36

passed #1286775
linux amd64
gcc:asan

00:03:07

passed #1286754
linux amd64
gcc:buster:amd64

00:01:24

passed #1286743
linux amd64
gcc:centos6:amd64

00:01:17

passed #1286744
linux amd64
gcc:centos7:amd64

00:01:34

passed #1286747
linux amd64
gcc:centos8:amd64

00:01:42

passed #1286772
linux amd64
gcc:focal:amd64

00:01:41

passed #1286787
linux amd64
gcc:mutexatomics

00:01:39

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

00:01:22

passed #1286757
linux amd64
gcc:sid:amd64

00:02:03

passed #1286762
linux i386
gcc:sid:i386

00:01:38

passed #1286793
linux amd64
gcc:softhsm2.4

00:01:40

passed #1286796
linux amd64
gcc:softhsm2.6

00:01:43

passed #1286750
linux amd64
gcc:stretch:amd64

00:01:42

passed #1286781
linux amd64
gcc:tsan

00:01:57

passed #1286765
linux amd64
gcc:tumbleweed:amd64

00:01:32

passed #1286769
linux amd64
gcc:xenial:amd64

00:01:45

passed #1286811
amd64 windows
msvc:windows:amd64

00:01:13

passed #1286808
linux amd64
nolibtool:sid:amd64

00:02:04

 
  Unit
passed #1286849
linux amd64
unit:clang:asan

00:00:57

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

00:00:41

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

00:01:00

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

00:00:58

passed #1286856
linux amd64
unit:clang:tsan

00:01:36

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

00:00:42

passed #1286845
linux amd64
unit:gcc:asan

00:00:54

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

00:00:59

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

00:00:38

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

00:00:37

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

00:00:39

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

00:00:38

passed #1286860
linux amd64
unit:gcc:mutexatomics

00:00:37

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

00:00:37

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

00:00:48

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

00:00:37

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

00:00:36

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

00:00:35

passed #1286853
linux amd64
unit:gcc:tsan

00:01:53

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

00:00:38

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

00:00:38

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

00:01:01

 
  System
passed #1286915
linux amd64
system:clang:asan

00:12:14

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

00:10:30

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

00:10:40

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

00:10:32

passed #1286921
linux amd64
system:clang:tsan

00:14:21

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

00:11:49

passed #1286913
linux amd64
system:gcc:asan

00:12:41

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

00:12:23

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

00:11:39

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

00:11:12

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

00:11:34

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

00:11:40

passed #1286923
linux amd64
system:gcc:mutexatomics

00:10:58

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

00:11:11

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

00:10:02

failed #1286930
linux amd64
system:gcc:softhsm2.4

00:10:49

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

00:11:08

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

00:10:55

passed #1286919
linux amd64
system:gcc:tsan

00:14:39

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

00:11:11

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

00:10:27

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

00:11:26

 
  Docs
passed #1286943
linux amd64
docs

00:02:04

 
  Postcheck
passed #1286955
linux amd64
cppcheck

00:00:20

passed #1286946
linux amd64
flake8

00:00:18

passed #1286958
linux amd64
gcov

00:00:32

76.0%
passed #1286949
linux amd64
pylint

00:00:21

passed #1286952
linux amd64
scan-build

00:09:01

 
Name Stage Failure
failed
system:gcc:softhsm2.4 System
I:The following system tests failed:
I: kasp
make: *** [Makefile:491: test] Error 1
Uploading artifacts for failed job
Uploading artifacts...
untracked: found 4424 files

Uploading artifacts as "archive" to coordinator... ok
id=1286930 responseStatus=201 Created token=6mZp8Usg
Cleaning up file based variables
ERROR: Job failed: exit code 1