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>
77 jobs for !4376 with 2259-zone_namerd_tostr-called-w-o-lock-being-held in 25 minutes and 3 seconds (queued for 10 seconds)
detached
Status Job ID Name Coverage
  Autoconf
passed #1286575
amd64 linux
autoreconf

00:00:16

 
  Precheck
passed #1286577
amd64 linux
clang-format

00:00:15

passed #1286578
amd64 linux
coccinelle

00:03:16

passed #1286651
linux amd64
danger

00:00:12

passed #1286576
amd64 linux
misc

00:00:12

passed #1286580
amd64 linux
tarball-create

00:01:19

passed #1286579
amd64 linux
danger

00:00:13

 
  Build
passed #1286593
amd64 linux
clang:asan

00:01:47

passed #1286597
amd64 linux
clang:buster:amd64

00:00:47

passed #1286600
amd64 libvirt
clang:freebsd11:amd64

00:01:01

passed #1286601
amd64 libvirt
clang:freebsd12:amd64

00:01:00

passed #1286602
amd64 libvirt
clang:openbsd:amd64

00:02:11

passed #1286595
amd64 linux
clang:tsan

00:01:04

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

00:00:44

passed #1286592
amd64 linux
gcc:asan

00:01:40

passed #1286585
amd64 linux
gcc:buster:amd64

00:00:45

passed #1286582
amd64 linux
gcc:centos7:amd64

00:00:43

passed #1286583
amd64 linux
gcc:centos8:amd64

00:00:50

passed #1286591
amd64 linux
gcc:focal:amd64

00:00:53

passed #1286596
amd64 linux
gcc:mutexatomics

00:00:44

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

00:00:43

passed #1286586
amd64 linux
gcc:sid:amd64

00:00:59

passed #1286588
i386 linux
gcc:sid:i386

00:00:47

passed #1286598
amd64 linux
gcc:softhsm2.4

00:00:44

passed #1286599
amd64 linux
gcc:softhsm2.6

00:00:44

passed #1286584
amd64 linux
gcc:stretch:amd64

00:00:50

passed #1286594
amd64 linux
gcc:tsan

00:00:59

passed #1286589
amd64 linux
gcc:tumbleweed:amd64

00:00:47

passed #1286590
amd64 linux
gcc:xenial:amd64

00:00:51

passed #1286603
amd64 windows
msvc:windows:amd64

00:00:46

 
  Unit
passed #1286615
amd64 linux
unit:clang:asan

00:01:21

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

00:00:56

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

00:01:29

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

00:01:19

passed #1286624
amd64 libvirt
unit:clang:openbsd:amd64

00:02:55

passed #1286617
amd64 linux
unit:clang:tsan

00:03:04

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

00:01:03

passed #1286614
amd64 linux
unit:gcc:asan

00:01:17

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

00:01:59

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

00:00:56

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

00:00:58

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

00:00:55

passed #1286618
amd64 linux
unit:gcc:mutexatomics

00:00:56

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

00:00:59

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

00:01:03

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

00:00:55

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

00:00:56

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

00:00:55

passed #1286616
amd64 linux
unit:gcc:tsan

00:03:57

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

00:00:53

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

00:01:01

 
  System
passed #1286636
amd64 linux
system:clang:asan

00:12:43

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

00:10:43

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

00:11:15

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

00:10:56

passed #1286638
amd64 linux
system:clang:tsan

00:14:26

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

00:12:20

passed #1286635
amd64 linux
system:gcc:asan

00:13:28

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

00:12:48

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

00:11:37

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

00:11:48

failed #1286634
amd64 linux
system:gcc:focal:amd64

00:11:51

passed #1286639
amd64 linux
system:gcc:mutexatomics

00:10:42

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

00:11:21

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

00:12:19

passed #1286641
amd64 linux
system:gcc:softhsm2.4

00:10:52

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

00:11:16

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

00:10:55

passed #1286637
amd64 linux
system:gcc:tsan

00:14:54

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

00:11:12

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

00:11:18

 
  Docs
passed #1286645
amd64 linux
docs

00:00:33

 
  Postcheck
passed #1286649
amd64 linux
cppcheck

00:00:47

passed #1286646
amd64 linux
flake8

00:00:18

passed #1286650
amd64 linux
gcov

00:00:32

77.0%
passed #1286647
amd64 linux
pylint

00:00:21

passed #1286648
amd64 linux
scan-build

00:04:01

 
Name Stage Failure
failed
system:gcc:focal:amd64 System
FAIL inline (exit status: 1)

$ test -n "${OUT_OF_TREE_WORKSPACE}" && mv "${OUT_OF_TREE_WORKSPACE}" "${CI_PROJECT_DIR}"
Uploading artifacts for failed job
Uploading artifacts...
untracked: found 1945 files

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