Fixed data race in log.c

A data race was happening while BIND was starting due to
isc_log_wouldlog function accessing lctx->logconfig without a lock.

To prevent that without incurring much costs, that variable was made
atomic.
83 jobs for !2791 with 1476-threadsanitizer-data-race-lib-isc-log-multiple-issues in 51 minutes and 30 seconds (queued for 7 seconds)
detached
Status Job ID Name Coverage
  Precheck
passed #746657
amd64 linux
🐞:sid:amd64

00:03:58

passed #746656
amd64 linux
💾:sid:amd64

00:00:19

passed #746654
amd64 linux
autoreconf:sid:amd64

00:00:33

passed #746655
amd64 linux
misc:sid:amd64

00:00:18

 
  Build
passed #746673
amd64 linux
asan:sid:amd64

00:03:22

passed #746680
amd64 freebsd
clang:freebsd11.3:amd64

00:01:11

passed #746681
amd64 freebsd
clang:freebsd12.0:amd64

00:01:01

passed #746682
amd64 libvirt
clang:openbsd6.6:amd64

00:05:19

passed #746677
amd64 linux
clang:stretch:amd64

00:01:42

passed #746678
i386 linux
clang:stretch:i386

00:01:45

passed #746658
amd64 linux
gcc:alpine3.11:amd64

00:02:47

passed #746672
amd64 linux
gcc:bionic:amd64

00:02:33

passed #746664
amd64 linux
gcc:buster:amd64

00:01:07

passed #746659
amd64 linux
gcc:centos6:amd64

00:02:19

passed #746660
amd64 linux
gcc:centos7:amd64

00:01:56

passed #746661
amd64 linux
gcc:centos8:amd64

00:02:46

passed #746670
amd64 linux
gcc:fedora31:amd64

00:02:28

passed #746662
amd64 linux
gcc:jessie:amd64

00:02:18

passed #746665
amd64 linux
gcc:sid:amd64

00:02:53

passed #746667
arm64 linux
gcc:sid:arm64

00:18:37

passed #746668
i386 linux
gcc:sid:i386

00:01:43

passed #746663
amd64 linux
gcc:stretch:amd64

00:02:56

passed #746669
amd64 linux
gcc:tumbleweed:amd64

00:02:37

passed #746671
amd64 linux
gcc:xenial:amd64

00:02:48

passed #746684
amd64 windows
msvc:windows:amd64

00:02:39

passed #746676
amd64 linux
mutexatomics:sid:amd64

00:02:29

passed #746683
amd64 linux
nolibtool:sid:amd64

00:02:54

passed #746666
amd64 linux
oot:sid:amd64

00:02:56

passed #746679
amd64 linux
pkcs11:sid:amd64

00:02:36

passed #746675
amd64 linux
rwlock:sid:amd64

00:02:40

passed #746674
amd64 linux
tsan:buster:amd64

00:02:28

 
  Unit
passed #746699
amd64 linux
unit:asan:sid:amd64

00:01:12

passed #746705
amd64 freebsd
unit:clang:freebsd11.3:amd64

00:00:34

passed #746706
amd64 freebsd
unit:clang:freebsd12.0:amd64

00:00:38

passed #746703
amd64 linux
unit:clang:stretch:amd64

00:00:40

passed #746685
amd64 linux
unit:gcc:alpine3.11:amd64

00:01:04

passed #746698
amd64 linux
unit:gcc:bionic:amd64

00:00:53

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

00:01:02

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

00:00:55

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

00:00:54

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

00:00:58

passed #746696
amd64 linux
unit:gcc:fedora31:amd64

00:00:54

passed #746689
amd64 linux
unit:gcc:jessie:amd64

00:00:31

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

00:00:55

passed #746693
arm64 linux
unit:gcc:sid:arm64

00:01:06

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

00:00:55

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

00:00:57

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

00:00:52

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

00:00:58

passed #746702
amd64 linux
unit:mutexatomics:sid:amd64

00:00:55

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

00:01:03

passed #746704
amd64 linux
unit:pkcs11:sid:amd64

00:00:54

passed #746701
amd64 linux
unit:rwlock:sid:amd64

00:00:56

failed #746700
amd64 linux allowed to fail
unit:tsan:buster:amd64

00:02:11

 
  System
passed #746722
amd64 linux
system:asan:sid:amd64

00:12:17

passed #746816
freebsd amd64
system:clang:freebsd11.3:amd64

00:11:09

passed #746728
amd64 freebsd
system:clang:freebsd12.0:amd64

00:11:36

passed #746708
amd64 linux
system:gcc:alpine3.11:amd64

00:11:38

passed #746721
amd64 linux
system:gcc:bionic:amd64

00:11:03

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

00:10:41

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

00:10:16

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

00:09:18

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

00:10:02

passed #746719
amd64 linux
system:gcc:fedora31:amd64

00:10:07

passed #746712
amd64 linux
system:gcc:jessie:amd64

00:09:59

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

00:09:50

passed #746716
arm64 linux
system:gcc:sid:arm64

00:10:59

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

00:10:41

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

00:09:32

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

00:10:26

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

00:09:14

passed #746725
amd64 linux
system:mutexatomics:sid:amd64

00:10:14

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

00:11:07

passed #746726
amd64 linux
system:pkcs11:sid:amd64

00:10:56

passed #746724
amd64 linux
system:rwlock:sid:amd64

00:09:17

failed #746723
amd64 linux allowed to fail
system:tsan:buster:amd64

00:14:39

failed #746727
amd64 freebsd
system:clang:freebsd11.3:amd64

00:11:26

failed #746815
linux amd64
system:gcc:centos8:amd64

00:09:06

failed #746711
amd64 linux
system:gcc:centos8:amd64

00:10:42

 
  Docs
passed #746730
amd64 linux
docs:sid:amd64

00:01:09

 
  Postcheck
passed #746732
amd64 linux
cppcheck:gcc:sid:amd64

00:01:47

passed #746733
arm64 linux
cppcheck:gcc:sid:arm64

00:02:21

passed #746731
amd64 linux
scan-build:buster:amd64

00:11:35

 
Name Stage Failure
failed
system:tsan:buster:amd64 System
make: *** [Makefile:486: test] Error 1
Running after script...
$ find bin -name 'tsan.*' -exec python3 util/parse_tsan.py {} \;
Uploading artifacts...
bin/tests/system/*/tsan.*: found 18 matching files
bin/tests/system/*/*/tsan.*: found 247 matching files

tsan/: found 209 matching files

Uploading artifacts to coordinator... ok
id=746723 responseStatus=201 Created token=2zrVEL_E
ERROR: Job failed: exit code 1
failed
unit:tsan:buster:amd64 Unit
$ find lib -name 'tsan.*' -exec python3 util/parse_tsan.py {} \;
Uploading artifacts...
WARNING: lib/*/tests/tsan.*: no matching files
WARNING: tsan/: no matching files
kyua.log: found 1 matching files

kyua.results: found 1 matching files

WARNING: kyua_html/: no matching files
Uploading artifacts to coordinator... ok
id=746700 responseStatus=201 Created token=qXzwdskC
ERROR: Job failed: exit code 1