creating TCP dispatch now creates/binds the socket

Previously, creation of TCP dispatches differed from UDP in
that a TCP dispatch was created to attach to an existing socket,
whereas a UDP dispatch would be created in a vacuum and sockets
would be opened on demand when a transaction was initiated.

We are moving as much socket code as possible into the dispatch
module, so that it can be replaced with a netmgr version as easily
as possible. (This will also have the side effect of making TCP and
UDP dispatches more similar.)

As a step in that direction, this commit changes
dns_dispatch_createtcp() so that it creates the TCP socket. (The
still has to initiate the connect(); that will be changed later.)
73 jobs for !4744 with 2401-refactor-dns-dispatch in 61 minutes and 39 seconds (queued for 7 seconds)
latest detached
Status Job ID Name Coverage
  Autoconf
passed #1527315
amd64 linux
autoreconf

00:00:18

 
  Precheck
passed #1527317
amd64 linux
clang-format

00:00:17

passed #1527318
amd64 linux
coccinelle

00:04:01

failed #1527319
amd64 linux
danger

00:00:17

passed #1527316
amd64 linux
misc

00:00:18

passed #1527320
amd64 linux
tarball-create

00:01:38

 
  Build
passed #1527332
amd64 linux
clang:asan

00:02:08

passed #1527336
amd64 linux
clang:buster:amd64

00:00:59

passed #1527339
amd64 libvirt
clang:freebsd11:amd64

00:01:13

passed #1527340
amd64 libvirt
clang:freebsd12:amd64

00:01:13

passed #1527341
amd64 libvirt
clang:openbsd:amd64

00:02:31

passed #1527334
amd64 linux
clang:tsan

00:01:21

passed #1527321
amd64 linux
gcc:alpine3.13:amd64

00:01:00

passed #1527331
amd64 linux
gcc:asan

00:01:40

passed #1527325
amd64 linux
gcc:buster:amd64

00:00:48

passed #1527322
amd64 linux
gcc:centos7:amd64

00:00:47

passed #1527323
amd64 linux
gcc:centos8:amd64

00:00:56

passed #1527330
amd64 linux
gcc:focal:amd64

00:01:03

passed #1527335
amd64 linux
gcc:mutexatomics

00:00:53

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

00:00:59

passed #1527326
amd64 linux
gcc:sid:amd64

00:01:17

passed #1527337
amd64 linux
gcc:softhsm2.4

00:00:58

passed #1527338
amd64 linux
gcc:softhsm2.6

00:01:03

passed #1527324
amd64 linux
gcc:stretch:amd64

00:01:09

passed #1527333
amd64 linux
gcc:tsan

00:00:56

passed #1527328
amd64 linux
gcc:tumbleweed:amd64

00:01:06

passed #1527329
amd64 linux
gcc:xenial:amd64

00:01:11

passed #1527342
amd64 windows
msvc:windows:amd64

00:00:46

 
  Unit
passed #1527353
amd64 linux
unit:clang:asan

00:01:32

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

00:01:11

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

00:01:42

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

01:00:01

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

00:03:17

passed #1527355
amd64 linux
unit:clang:tsan

00:02:58

passed #1527343
amd64 linux
unit:gcc:alpine3.13:amd64

00:01:18

failed #1527352
amd64 linux
unit:gcc:asan

00:01:33

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

00:02:14

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

00:01:18

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

00:01:19

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

00:01:11

passed #1527356
amd64 linux
unit:gcc:mutexatomics

00:01:09

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

00:01:08

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

00:01:19

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

00:01:28

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

00:01:13

passed #1527354
amd64 linux
unit:gcc:tsan

00:04:37

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

00:01:08

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

00:01:12

 
  System
passed #1527373
amd64 linux
system:clang:asan

00:13:48

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

00:12:32

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

00:12:09

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

00:12:17

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

00:16:13

failed #1527363
amd64 linux
system:gcc:alpine3.13:amd64

00:12:54

passed #1527372
amd64 linux
system:gcc:asan

00:13:58

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

00:13:24

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

00:11:58

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

00:12:20

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

00:12:53

passed #1527376
amd64 linux
system:gcc:mutexatomics

00:12:18

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

00:12:18

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

00:13:22

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

00:12:56

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

00:11:33

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

00:16:31

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

00:12:36

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

00:12:56

 
  Docs
passed #1527382
amd64 linux
docs

00:00:46

 
  Postcheck
passed #1527386
amd64 linux
cppcheck

00:00:54

passed #1527383
amd64 linux
flake8

00:00:20

passed #1527387
amd64 linux
gcov

00:00:31

76.0%
passed #1527384
amd64 linux
pylint

00:00:24

passed #1527385
amd64 linux
scan-build

00:04:12

 
Name Stage Failure
failed
unit:clang:freebsd12:amd64 Unit The script exceeded the maximum execution time set for the job
--- tcpdns_test.log ---
PASS: tcpdns_test
--- udp_test.log ---
PASS: udp_test
--- task_test.log ---
PASS: task_test
--- timer_test.log ---
PASS: timer_test
ERROR: Job failed: execution took longer than 1h0m0s seconds
failed
system:clang:tsan System
FAIL pipelined (exit status: 1)

$ find bin -name 'tsan.*' -exec python3 util/parse_tsan.py {} \;
Uploading artifacts for failed job
Uploading artifacts...
untracked: found 1831 files

Uploading artifacts as "archive" to coordinator... ok
id=1527375 responseStatus=201 Created token=pk8p-BzP
Cleaning up file based variables
ERROR: Job failed: exit code 1
failed
system:gcc:tsan System
FAIL pipelined (exit status: 1)

$ find bin -name 'tsan.*' -exec python3 util/parse_tsan.py {} \;
Uploading artifacts for failed job
Uploading artifacts...
untracked: found 1724 files

Uploading artifacts as "archive" to coordinator... ok
id=1527374 responseStatus=201 Created token=fMvHDe_v
Cleaning up file based variables
ERROR: Job failed: exit code 1
failed
system:gcc:softhsm2.4 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 2046 files

Uploading artifacts as "archive" to coordinator... ok
id=1527378 responseStatus=201 Created token=auT65sTy
Cleaning up file based variables
ERROR: Job failed: exit code 1
failed
system:gcc:alpine3.13:amd64 System
FAIL rrl (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 1523 files

Uploading artifacts as "archive" to coordinator... ok
id=1527363 responseStatus=201 Created token=A25JtgEy
Cleaning up file based variables
ERROR: Job failed: exit code 1
failed
system:clang:freebsd12:amd64 System

$ test -n "${OUT_OF_TREE_WORKSPACE}" && mv "${OUT_OF_TREE_WORKSPACE}" "${CI_PROJECT_DIR}"
Uploading artifacts for failed job
Uploading artifacts...
Runtime platform
arch=amd64 os=freebsd pid=77187 revision=2ebc4dc4 version=13.9.0
untracked: found 1539 files

Uploading artifacts as "archive" to coordinator... ok
id=1527381 responseStatus=201 Created token=adWgCKSm
Cleaning up file based variables
ERROR: Job failed: exit status 1
failed
system:gcc:centos8:amd64 System
FAIL rpz (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 1544 files

Uploading artifacts as "archive" to coordinator... ok
id=1527365 responseStatus=201 Created token=t4BfpP3t
Cleaning up file based variables
ERROR: Job failed: exit code 1
failed
unit:gcc:asan Unit
make[1]: Leaving directory '/builds/isc-projects/bind9/fuzz'
make: *** [Makefile:608: unit-recursive] Error 1
make: Target 'unit' not remade because of errors.
Uploading artifacts for failed job
Uploading artifacts...
untracked: found 1625 files

Uploading artifacts as "archive" to coordinator... ok
id=1527352 responseStatus=201 Created token=yqCB9xrb
Cleaning up file based variables
ERROR: Job failed: exit code 1
failed
danger Precheck
 * branch            main       -> FETCH_HEAD



Failing the build, there is 1 fail.
Feedback: https://gitlab.isc.org/isc-projects/bind9/merge_requests/4744#note_195937

Cleaning up file based variables
ERROR: Job failed: exit code 1