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.
74 jobs for !2791 with 1476-threadsanitizer-data-race-lib-isc-log-multiple-issues in 28 minutes and 24 seconds (queued for 5 seconds)
detached
Status Job ID Name Coverage
  Precheck
passed #648447
amd64 linux
🐞:sid:amd64

00:03:41

passed #648445
amd64 linux
autoreconf:sid:amd64

00:00:32

passed #648446
amd64 linux
misc:sid:amd64

00:00:17

 
  Build
passed #648462
amd64 linux
asan:sid:amd64

00:01:36

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

00:01:09

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

00:01:01

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

00:06:04

passed #648466
amd64 linux
clang:stretch:amd64

00:01:43

passed #648467
i386 linux
clang:stretch:i386

00:01:23

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

00:02:27

passed #648461
amd64 linux
gcc:bionic:amd64

00:01:20

passed #648454
amd64 linux
gcc:buster:amd64

00:01:40

passed #648449
amd64 linux
gcc:centos6:amd64

00:01:30

passed #648450
amd64 linux
gcc:centos7:amd64

00:02:10

passed #648451
amd64 linux
gcc:centos8:amd64

00:02:27

passed #648459
amd64 linux
gcc:fedora31:amd64

00:02:25

passed #648452
amd64 linux
gcc:jessie:amd64

00:01:23

passed #648455
amd64 linux
gcc:sid:amd64

00:02:16

passed #648457
i386 linux
gcc:sid:i386

00:04:20

passed #648453
amd64 linux
gcc:stretch:amd64

00:01:43

passed #648458
amd64 linux
gcc:tumbleweed:amd64

00:03:49

passed #648460
amd64 linux
gcc:xenial:amd64

00:00:53

passed #648473
amd64 windows
msvc:windows:amd64

00:02:15

passed #648465
amd64 linux
mutexatomics:sid:amd64

00:00:55

passed #648472
amd64 linux
nolibtool:sid:amd64

00:02:29

passed #648456
amd64 linux
oot:sid:amd64

00:01:32

passed #648468
amd64 linux
pkcs11:sid:amd64

00:00:58

passed #648464
amd64 linux
rwlock:sid:amd64

00:01:43

passed #648463
amd64 linux
tsan:buster:amd64

00:03:02

failed #648471
amd64 libvirt
clang:openbsd6.6:amd64

00:01:02

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

00:01:13

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

00:00:35

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

00:00:37

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

00:00:48

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

00:01:00

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

00:00:46

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

00:00:56

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

00:00:56

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

00:00:41

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

00:00:51

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

00:00:59

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

00:00:29

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

00:00:55

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

00:00:50

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

00:00:44

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

00:00:52

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

00:01:00

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

00:02:00

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

00:00:40

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

00:00:54

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

00:02:28

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

00:13:37

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

00:12:39

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

00:12:33

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

00:13:28

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

00:11:24

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

00:12:52

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

00:15:51

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

00:10:55

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

00:13:00

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

00:12:52

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

00:12:04

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

00:11:53

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

00:11:17

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

00:11:32

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

00:12:13

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

00:11:24

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

00:12:08

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

00:10:58

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

00:11:10

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

00:15:41

 
  Docs
passed #648515
amd64 linux
docs:sid:amd64

00:00:32

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

00:02:05

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

00:10:49

 
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 268 matching files

tsan/: found 199 matching files

Uploading artifacts to coordinator... ok
id=648509 responseStatus=201 Created token=dFCGwLF8
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=648488 responseStatus=201 Created token=fpDdBSDy
ERROR: Job failed: exit code 1