Keep track of the number of active connections inside the listener

Other methods are not reliable considering that the sequence of
synchronous operations is not really guaranteed.
76 jobs for !4389 with 2271-wrap-the-libuv-into-cmocka-mock-object-for-the-unit-test in 62 minutes and 29 seconds (queued for 8 seconds)
detached
Status Job ID Name Coverage
  Autoconf
passed #1327532
amd64 linux
autoreconf

00:00:17

 
  Precheck
failed #1327534
amd64 linux
clang-format

00:00:16

failed #1327535
amd64 linux
coccinelle

00:03:35

failed #1327536
amd64 linux
danger

00:00:18

failed #1327533
amd64 linux
misc

00:00:16

passed #1327537
amd64 linux
tarball-create

00:01:50

 
  Build
passed #1327550
amd64 linux
clang:asan

00:02:01

passed #1327554
amd64 linux
clang:buster:amd64

00:00:55

passed #1327557
amd64 libvirt
clang:freebsd11:amd64

00:01:09

passed #1327558
amd64 libvirt
clang:freebsd12:amd64

00:01:04

passed #1327559
amd64 libvirt
clang:openbsd:amd64

00:02:46

passed #1327552
amd64 linux
clang:tsan

00:01:17

failed #1327538
amd64 linux
gcc:alpine3.12:amd64

00:00:47

passed #1327549
amd64 linux
gcc:asan

00:01:50

passed #1327542
amd64 linux
gcc:buster:amd64

00:01:00

passed #1327539
amd64 linux
gcc:centos7:amd64

00:00:51

passed #1327540
amd64 linux
gcc:centos8:amd64

00:00:57

passed #1327548
amd64 linux
gcc:focal:amd64

00:01:01

failed #1327553
amd64 linux
gcc:mutexatomics

00:00:44

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

00:01:01

passed #1327543
amd64 linux
gcc:sid:amd64

00:01:41

failed #1327545
i386 linux
gcc:sid:i386

00:00:46

passed #1327555
amd64 linux
gcc:softhsm2.4

00:00:51

passed #1327556
amd64 linux
gcc:softhsm2.6

00:00:58

passed #1327541
amd64 linux
gcc:stretch:amd64

00:00:56

passed #1327551
amd64 linux
gcc:tsan

00:01:12

passed #1327546
amd64 linux
gcc:tumbleweed:amd64

00:01:00

passed #1327547
amd64 linux
gcc:xenial:amd64

00:01:02

failed #1327560
amd64 windows
msvc:windows:amd64

00:00:33

 
  Unit
passed #1327572
amd64 linux
unit:clang:asan

00:01:21

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

00:01:08

failed #1327579
amd64 libvirt
unit:clang:freebsd11:amd64

00:00:56

failed #1327580
amd64 libvirt
unit:clang:freebsd12:amd64

00:00:56

failed #1327581
amd64 libvirt
unit:clang:openbsd:amd64

00:01:32

passed #1327574
amd64 linux
unit:clang:tsan

00:03:06

skipped #1327561
amd64 linux
unit:gcc:alpine3.12:amd64
passed #1327571
amd64 linux
unit:gcc:asan

00:01:16

failed #1327565
amd64 linux
unit:gcc:buster:amd64

00:02:02

failed #1327562
amd64 linux
unit:gcc:centos7:amd64

00:00:36

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

00:01:06

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

00:01:10

skipped #1327575
amd64 linux
unit:gcc:mutexatomics
passed #1327566
amd64 linux
unit:gcc:sid:amd64

00:01:06

skipped #1327567
i386 linux
unit:gcc:sid:i386
passed #1327577
amd64 linux
unit:gcc:softhsm2.4

00:01:05

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

00:01:13

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

00:01:07

failed #1327573
amd64 linux
unit:gcc:tsan

00:03:42

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

00:01:06

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

00:01:14

 
  System
failed #1327593
amd64 linux
system:clang:asan

01:00:01

failed #1327597
amd64 linux
system:clang:buster:amd64

01:00:01

failed #1327600
amd64 libvirt
system:clang:freebsd11:amd64

01:00:01

failed #1327601
amd64 libvirt
system:clang:freebsd12:amd64

01:00:00

failed #1327595
amd64 linux allowed to fail
system:clang:tsan

01:00:01

skipped #1327582
amd64 linux
system:gcc:alpine3.12:amd64
failed #1327592
amd64 linux
system:gcc:asan

01:00:00

skipped #1327586
amd64 linux
system:gcc:buster:amd64
failed #1327583
amd64 linux
system:gcc:centos7:amd64

01:00:01

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

01:00:01

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

01:00:01

skipped #1327596
amd64 linux
system:gcc:mutexatomics
failed #1327587
amd64 linux
system:gcc:sid:amd64

01:00:01

skipped #1327588
i386 linux
system:gcc:sid:i386
failed #1327598
amd64 linux
system:gcc:softhsm2.4

01:00:01

failed #1327599
amd64 linux
system:gcc:softhsm2.6

01:00:01

failed #1327585
amd64 linux
system:gcc:stretch:amd64

01:00:01

failed #1327594
amd64 linux allowed to fail
system:gcc:tsan

01:00:00

failed #1327589
amd64 linux
system:gcc:tumbleweed:amd64

01:00:01

failed #1327590
amd64 linux
system:gcc:xenial:amd64

01:00:01

 
  Docs
passed #1327602
amd64 linux
docs

00:00:43

 
  Postcheck
passed #1327606
amd64 linux
cppcheck

00:00:56

passed #1327603
amd64 linux
flake8

00:00:24

skipped #1327607
amd64 linux
gcov
passed #1327604
amd64 linux
pylint

00:00:26

failed #1327605
amd64 linux
scan-build

00:04:03

 
Name Stage Failure
failed
system:clang:asan System The script exceeded the maximum execution time set for the job
FAIL: dnssec
D:shutdown:tests-shutdown.py::test_named_shutdown PASSED [100%]
D:shutdown:
D:shutdown:========================== 1 passed in 35.25 seconds ===========================
I:shutdown:stopping servers
R:shutdown:PASS
E:shutdown:2020-11-27T15:34:24+0000
PASS: shutdown
ERROR: Job failed: execution took longer than 1h0m0s seconds
failed
system:gcc:asan System The script exceeded the maximum execution time set for the job
I:rndc:check rndc -4 -6 (59)
I:rndc:check rndc -4 with an IPv6 server address (60)
I:rndc:check rndc nta reports adding to multiple views (61)
I:rndc:exit status: 0
I:rndc:stopping servers
R:rndc:PASS
E:rndc:2020-11-27T15:32:52+0000
PASS: rndc
ERROR: Job failed: execution took longer than 1h0m0s seconds
failed
system:gcc:sid:amd64 System The script exceeded the maximum execution time set for the job
D:kasp:#16 0x00007f16f139bea7 in start_thread (arg=<optimized out>) at pthread_create.c:477
D:kasp:#17 0x00007f16f10edd4f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
D:kasp:--------------------------------------------------------------------------------
D:kasp:full backtrace from kasp/ns3/core.19248 saved in core.19248-backtrace.txt
D:kasp:core dump kasp/ns3/core.19248 archived as kasp/ns3/core.19248.gz
R:kasp:FAIL
E:kasp:2020-11-27T15:34:53+0000
FAIL: kasp
ERROR: Job failed: execution took longer than 1h0m0s seconds
failed
system:clang:tsan System The script exceeded the maximum execution time set for the job
I:rndc:check rndc -4 -6 (59)
I:rndc:check rndc -4 with an IPv6 server address (60)
I:rndc:check rndc nta reports adding to multiple views (61)
I:rndc:exit status: 0
I:rndc:stopping servers
R:rndc:PASS
E:rndc:2020-11-27T15:35:34+0000
PASS: rndc
ERROR: Job failed: execution took longer than 1h0m0s seconds
failed
system:gcc:tsan System The script exceeded the maximum execution time set for the job
I:rndc:check rndc -4 -6 (59)
I:rndc:check rndc -4 with an IPv6 server address (60)
I:rndc:check rndc nta reports adding to multiple views (61)
I:rndc:exit status: 0
I:rndc:stopping servers
R:rndc:PASS
E:rndc:2020-11-27T15:35:50+0000
PASS: rndc
ERROR: Job failed: execution took longer than 1h0m0s seconds
failed
system:clang:freebsd12:amd64 System The script exceeded the maximum execution time set for the job
I:rrsetorder:starting servers
I:rrsetorder:Checking order fixed (primary)
I:rrsetorder:Checking order cyclic (primary + additional)
I:rrsetorder:Checking order cyclic (primary)
I:rrsetorder:Checking order random (primary)
I:rrsetorder:Random selection return 11 of 24 possible orders in 36 samples
I:rrsetorder:Checking order none (primary)
I:rrsetorder:Checking order fixed (secondary)
ERROR: Job failed: execution took longer than 1h0m0s seconds
failed
system:clang:freebsd11:amd64 System The script exceeded the maximum execution time set for the job
tee: inline.log: No space left on device
E:inline:2020-11-27T15:29:05+0000
echo: write error on stdout
FAIL: inline
echo: write error on stdout
echo: write error on stdout
echo: write error on stdout
echo: write error on stdout
ERROR: Job failed: execution took longer than 1h0m0s seconds
failed
system:gcc:xenial:amd64 System The script exceeded the maximum execution time set for the job
D:shutdown:tests-shutdown.py::test_named_shutdown PASSED
D:shutdown:
D:shutdown:========================== 1 passed in 35.11 seconds ===========================
I:shutdown:stopping servers
R:shutdown:PASS
I:file shutdown/.cache/v/cache/lastfailed not removed
E:shutdown:2020-11-27T16:02:14+0000
PASS: shutdown
ERROR: Job failed: execution took longer than 1h0m0s seconds
failed
system:gcc:focal:amd64 System The script exceeded the maximum execution time set for the job
D:kasp:#16 0x00007ff7992b5609 in start_thread (arg=<optimized out>) at pthread_create.c:477
D:kasp:#17 0x00007ff798ff4103 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
D:kasp:--------------------------------------------------------------------------------
D:kasp:full backtrace from kasp/ns3/core.20793 saved in core.20793-backtrace.txt
D:kasp:core dump kasp/ns3/core.20793 archived as kasp/ns3/core.20793.gz
R:kasp:FAIL
E:kasp:2020-11-27T15:40:19+0000
FAIL: kasp
ERROR: Job failed: execution took longer than 1h0m0s seconds
failed
system:gcc:centos8:amd64 System The script exceeded the maximum execution time set for the job
D:shutdown:#6  cleanup () at main.c:1331
D:shutdown:#7 main (argc=<optimized out>, argv=<optimized out>) at main.c:1588
D:shutdown:--------------------------------------------------------------------------------
D:shutdown:full backtrace from shutdown/resolver/core.1425 saved in core.1425-backtrace.txt
D:shutdown:core dump shutdown/resolver/core.1425 archived as shutdown/resolver/core.1425.gz
R:shutdown:FAIL
E:shutdown:2020-11-27T15:31:56+0000
FAIL: shutdown
ERROR: Job failed: execution took longer than 1h0m0s seconds
failed
system:gcc:tumbleweed:amd64 System The script exceeded the maximum execution time set for the job
E:nzd2nzf:2020-11-27T15:38:12+0000
PASS: nzd2nzf
S:digdelv:2020-11-27T15:38:12+0000
T:digdelv:1:A
A:digdelv:System test digdelv
I:digdelv:PORTS:26711,26712,26713,26714,26715,26716,26717,26718,26719,26720,26721
I:digdelv:starting servers
I:digdelv:check nslookup handles UPDATE response (1)
ERROR: Job failed: execution took longer than 1h0m0s seconds
failed
system:gcc:softhsm2.6 System The script exceeded the maximum execution time set for the job
/lib64/libuv.so.1(uv_run+0x114) [0x7f32d58a8794]
/builds/isc-projects/bind9/lib/isc/.libs/libisc.so.1706(+0x1ccff) [0x7f32d5d55cff]
/lib64/libpthread.so.0(+0x93f9) [0x7f32d5a9b3f9]
/lib64/libc.so.6(clone+0x43) [0x7f32d59c7b03]
tests.sh: line 447: 16585 Aborted (core dumped) $DIG $DIGOPTS example. @10.53.0.8 axfr -y key1.:1234abcd8765 > dig.out.msgsize.test$n
I:xfer:failed axfr size check
I:xfer:failed transfer message count check
I:xfer:test mapped zone with out of zone data (21)
ERROR: Job failed: execution took longer than 1h0m0s seconds
failed
system:clang:buster:amd64 System The script exceeded the maximum execution time set for the job
D:shutdown:
D:shutdown:tests-shutdown.py::test_named_shutdown PASSED [100%]
D:shutdown:
D:shutdown:========================== 1 passed in 64.06 seconds ===========================
I:shutdown:stopping servers
R:shutdown:PASS
E:shutdown:2020-11-27T15:54:02+0000
PASS: shutdown
ERROR: Job failed: execution took longer than 1h0m0s seconds
failed
system:gcc:stretch:amd64 System The script exceeded the maximum execution time set for the job
E:nzd2nzf:2020-11-27T15:50:59+0000
PASS: nzd2nzf
S:digdelv:2020-11-27T15:50:59+0000
T:digdelv:1:A
A:digdelv:System test digdelv
I:digdelv:PORTS:12911,12912,12913,12914,12915,12916,12917,12918,12919,12920,12921
I:digdelv:starting servers
I:digdelv:check nslookup handles UPDATE response (1)
ERROR: Job failed: execution took longer than 1h0m0s seconds
failed
system:gcc:softhsm2.4 System The script exceeded the maximum execution time set for the job
/usr/lib/x86_64-linux-gnu/libuv.so.1(uv__io_poll+0x320) [0x7fe001f2b4b0]
/usr/lib/x86_64-linux-gnu/libuv.so.1(uv_run+0x115) [0x7fe001f1cf85]
/builds/isc-projects/bind9/lib/isc/.libs/libisc.so.1706(+0x1cfbf) [0x7fe0023b0fbf]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x7fa3) [0x7fe002101fa3]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x3f) [0x7fe0020324cf]
tests.sh: line 233: 5202 Aborted (core dumped) $DIG -p ${PORT} ixfr=0 large @10.53.0.3 > dig.out.test$n
I:ixfr:failed
I:ixfr:test 'dig +notcp ixfr=<value>' vs 'dig ixfr=<value> +notcp' vs 'dig ixfr=<value>' (8)
ERROR: Job failed: execution took longer than 1h0m0s seconds
failed
system:gcc:centos7:amd64 System The script exceeded the maximum execution time set for the job
I:rndc:check rndc -4 -6 (59)
I:rndc:check rndc -4 with an IPv6 server address (60)
I:rndc:check rndc nta reports adding to multiple views (61)
I:rndc:exit status: 0
I:rndc:stopping servers
R:rndc:PASS
E:rndc:2020-11-27T15:30:46+0000
PASS: rndc
ERROR: Job failed: execution took longer than 1h0m0s seconds
failed
unit:gcc:tsan Unit
Running after script...
$ find lib -name 'tsan.*' -exec python3 util/parse_tsan.py {} \;
Uploading artifacts for failed job
Uploading artifacts...
WARNING: lib/*/tests/tsan.*: no matching files
WARNING: tsan/: no matching files
ERROR: No files to upload
Cleaning up file based variables
ERROR: Job failed: exit code 1
failed
unit:clang:openbsd:amd64 Unit
`unit' not remade because of errors.
Uploading artifacts for failed job
Uploading artifacts...
Runtime platform
arch=amd64 os=openbsd pid=11793 revision=9ad2ddee version=12.4.0~beta.1928.g9ad2ddee
untracked: found 1481 files

Uploading artifacts to coordinator... ok
id=1327581 responseStatus=201 Created token=_ajz7xpG
Cleaning up file based variables
Unsupported run stage 'cleanup_file_variables'
ERROR: Job failed: exit status 1
failed
scan-build Postcheck
make[1]: Leaving directory '/builds/isc-projects/bind9'
scan-build: 1 bug found.
scan-build: Run 'scan-view /builds/isc-projects/bind9/scan-build.reports/2020-11-27-150826-6944-1' to examine bug reports.
Uploading artifacts for failed job
Uploading artifacts...
scan-build.reports/: found 6 matching files and directories

Uploading artifacts as "archive" to coordinator... ok
id=1327605 responseStatus=201 Created token=y7CowKf3
Cleaning up file based variables
ERROR: Job failed: exit code 1
failed
coccinelle Precheck
 	if (!atomic_compare_exchange_strong(&sock->closed, &(bool){ false },
true)) {
INSIST(0);
+ ISC_UNREACHABLE();
}

isc__nm_incstats(sock->mgr, sock->statsindex[STATID_CLOSE]);
Cleaning up file based variables
ERROR: Job failed: exit code 1
failed
unit:gcc:buster:amd64 Unit
make[1]: Leaving directory '/builds/isc-projects/bind9/fuzz'
make: *** [Makefile:624: unit-recursive] Error 1
make: Target 'unit' not remade because of errors.
Uploading artifacts for failed job
Uploading artifacts...
untracked: found 2264 files

Uploading artifacts as "archive" to coordinator... ok
id=1327565 responseStatus=201 Created token=RQWjxzCh
Cleaning up file based variables
ERROR: Job failed: exit code 1
failed
unit:clang:freebsd12:amd64 Unit
============================================================================
Uploading artifacts for failed job
Uploading artifacts...
Runtime platform
arch=amd64 os=freebsd pid=14713 revision=ece86343 version=13.5.0
untracked: found 1512 files

Uploading artifacts as "archive" to coordinator... ok
id=1327580 responseStatus=201 Created token=2YtcgkWd
Cleaning up file based variables
Unsupported run stage 'cleanup_file_variables'
ERROR: Job failed: exit status 1
failed
unit:clang:freebsd11:amd64 Unit
make: stopped in /builds/isc-projects/bind9
Uploading artifacts for failed job
Uploading artifacts...
Runtime platform
arch=amd64 os=freebsd pid=14582 revision=ece86343 version=13.5.0
untracked: found 1499 files

Uploading artifacts as "archive" to coordinator... ok
id=1327579 responseStatus=201 Created token=95CaM8En
Cleaning up file based variables
Unsupported run stage 'cleanup_file_variables'
ERROR: Job failed: exit status 1
failed
unit:gcc:centos7:amd64 Unit
make[1]: Leaving directory `/builds/isc-projects/bind9/fuzz'
make: *** [unit-recursive] Error 1
make: Target `unit' not remade because of errors.
Uploading artifacts for failed job
Uploading artifacts...
untracked: found 1552 files

Uploading artifacts as "archive" to coordinator... ok
id=1327562 responseStatus=201 Created token=RHDnPzud
Cleaning up file based variables
ERROR: Job failed: exit code 1
failed
gcc:mutexatomics Build
make[2]: Leaving directory '/builds/isc-projects/bind9/fuzz'
make[1]: *** [Makefile:624: all-recursive] Error 1
make[1]: Leaving directory '/builds/isc-projects/bind9'
make: *** [Makefile:528: all] Error 2
Running after_script
Running after script...
$ test -n "${OUT_OF_TREE_WORKSPACE}" && mv "${OUT_OF_TREE_WORKSPACE}" "${CI_PROJECT_DIR}"
Cleaning up file based variables
ERROR: Job failed: exit code 1
failed
gcc:alpine3.12:amd64 Build
make[2]: Leaving directory '/builds/isc-projects/bind9/fuzz'
make[1]: *** [Makefile:624: all-recursive] Error 1
make[1]: Leaving directory '/builds/isc-projects/bind9'
make: *** [Makefile:528: all] Error 2
Running after_script
Running after script...
$ test -n "${OUT_OF_TREE_WORKSPACE}" && mv "${OUT_OF_TREE_WORKSPACE}" "${CI_PROJECT_DIR}"
Cleaning up file based variables
ERROR: Job failed: exit code 1
failed
gcc:sid:i386 Build
make[2]: Leaving directory '/builds/isc-projects/bind9/fuzz'
make[1]: Leaving directory '/builds/isc-projects/bind9'
make[1]: *** [Makefile:624: all-recursive] Error 1
make: *** [Makefile:528: all] Error 2
Running after_script
Running after script...
$ test -n "${OUT_OF_TREE_WORKSPACE}" && mv "${OUT_OF_TREE_WORKSPACE}" "${CI_PROJECT_DIR}"
Cleaning up file based variables
ERROR: Job failed: exit code 1
failed
msvc:windows:amd64 Build
OS/Arch:      windows/amd64
Uploading artifacts...
Runtime platform
arch=amd64 os=windows pid=41228 revision=ece86343 version=13.5.0
untracked: found 262 files

WARNING: Failed to load system CertPool: crypto/x509: system root pool is not available on Windows
Uploading artifacts as "archive" to coordinator... ok
id=1327560 responseStatus=201 Created token=cDNz8Jwa
Cleaning up file based variables
Unsupported run stage "cleanup_file_variables"
ERROR: Job failed: exit status 1
failed
danger Precheck
 * branch            main       -> FETCH_HEAD



Failing the build, there are 12 fails.
Feedback: https://gitlab.isc.org/isc-projects/bind9/merge_requests/4389#note_175889

Cleaning up file based variables
ERROR: Job failed: exit code 1
failed
clang-format Precheck
 M lib/isc/netmgr/udp.c
M lib/isc/netmgr/uverr2result.c
M lib/isc/quota.c
M lib/isc/tests/tcp_quota_test.c
M lib/isc/tests/tcp_test.c
M lib/isc/tests/tcpdns_test.c
M lib/isc/tests/uv_wrap.c
Cleaning up file based variables
ERROR: Job failed: exit code 1
failed
misc Precheck
 ./lib/isc/tests/time_test.c			C	2014,2015,2016,2018,2019,2020
./lib/isc/tests/timer_test.c C 2018,2019,2020
Uploading artifacts for failed job
Uploading artifacts...
util/newcopyrights: found 1 matching files and directories

checklibs.out: found 1 matching files and directories

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