]> git.ipfire.org Git - thirdparty/pdns.git/log
thirdparty/pdns.git
23 months agoMerge pull request #13132 from rgacogne/ddist18-12801-SpoofAction
Remi Gacogne [Wed, 23 Aug 2023 11:53:31 +0000 (13:53 +0200)] 
Merge pull request #13132 from rgacogne/ddist18-12801-SpoofAction

dnsdist-1.8x: SpoofAction: copy the QClass from the request

23 months agoMerge pull request #13131 from rgacogne/ddist18-fix-pool-cache-metrics
Remi Gacogne [Wed, 23 Aug 2023 11:53:07 +0000 (13:53 +0200)] 
Merge pull request #13131 from rgacogne/ddist18-fix-pool-cache-metrics

dnsdist-1.8.x: Fix cache hit and miss metrics with DoH queries

23 months agoMerge pull request #13130 from rgacogne/ddist18-ossl3-ticket-leak
Remi Gacogne [Wed, 23 Aug 2023 11:52:59 +0000 (13:52 +0200)] 
Merge pull request #13130 from rgacogne/ddist18-ossl3-ticket-leak

dnsdist-1.8.x: Fix a memory leak when processing TLS tickets w/ OpenSSL 3.x

23 months agoMerge pull request #13129 from rgacogne/ddist18-wait-reconnect
Remi Gacogne [Wed, 23 Aug 2023 11:52:48 +0000 (13:52 +0200)] 
Merge pull request #13129 from rgacogne/ddist18-wait-reconnect

dnsdist-1.8.x: Properly handle reconnection failure for backend UDP sockets

23 months agoMerge pull request #13128 from rgacogne/ddist18-12840-fix-console-desc
Remi Gacogne [Wed, 23 Aug 2023 11:49:50 +0000 (13:49 +0200)] 
Merge pull request #13128 from rgacogne/ddist18-12840-fix-console-desc

dnsdist-1.8.x: Fix the console description of PoolAction and QPSPoolAction

23 months agoMerge pull request #13127 from rgacogne/ddist18-yahttp-fuzz-overflow
Remi Gacogne [Wed, 23 Aug 2023 11:49:38 +0000 (13:49 +0200)] 
Merge pull request #13127 from rgacogne/ddist18-yahttp-fuzz-overflow

dnsdist-1.8.x: YaHTTP: Prevent integer overflow on very large chunks

23 months agoMerge pull request #13126 from rgacogne/ddist18-async-test-racy
Remi Gacogne [Wed, 23 Aug 2023 11:49:27 +0000 (13:49 +0200)] 
Merge pull request #13126 from rgacogne/ddist18-async-test-racy

dnsdist-1.8.x: Remove a racy test in the AsynchronousHolder unit tests

23 months agoMerge pull request #13125 from rgacogne/ddist18-increment-dyn-blocked-ebpf
Remi Gacogne [Wed, 23 Aug 2023 11:49:17 +0000 (13:49 +0200)] 
Merge pull request #13125 from rgacogne/ddist18-increment-dyn-blocked-ebpf

dnsdist-1.8.x: Increment the "dyn blocked" counter for eBPF blocks as well

23 months agoMerge pull request #13124 from rgacogne/ddist18-12916-docker-webserver
Remi Gacogne [Wed, 23 Aug 2023 11:49:08 +0000 (13:49 +0200)] 
Merge pull request #13124 from rgacogne/ddist18-12916-docker-webserver

dnsdist-1.8.x: Fix webserver config template for our docker container

23 months agoMerge pull request #13121 from rgacogne/ddist18-fix-crypto-detection-deprecated
Remi Gacogne [Wed, 23 Aug 2023 11:34:21 +0000 (13:34 +0200)] 
Merge pull request #13121 from rgacogne/ddist18-fix-crypto-detection-deprecated

dnsdist-1.8.x: Stop using the now deprecated ERR_load_CRYPTO_strings() to detect OpenSSL

23 months agoMerge pull request #13120 from rgacogne/ddist18-libeditr
Remi Gacogne [Wed, 23 Aug 2023 11:34:05 +0000 (13:34 +0200)] 
Merge pull request #13120 from rgacogne/ddist18-libeditr

dnsdist-1.8.x: fix typo libeditr -> libedit

23 months agoMerge pull request #13119 from rgacogne/ddist18-doing-red-hat-job-myself
Remi Gacogne [Wed, 23 Aug 2023 11:33:36 +0000 (13:33 +0200)] 
Merge pull request #13119 from rgacogne/ddist18-doing-red-hat-job-myself

dnsdist-1.8.x: Work around Red Hat 8 pooping the bed in OpenSSL's headers

23 months agoMerge pull request #13117 from rgacogne/ddist18-12738-disableZeroScope
Remi Gacogne [Wed, 23 Aug 2023 11:32:50 +0000 (13:32 +0200)] 
Merge pull request #13117 from rgacogne/ddist18-12738-disableZeroScope

dnsdist-1.8.x: Undo an accidentally change of disableZeroScope to disableZeroScoping

23 months agoMerge pull request #13150 from rgacogne/ddist18-fix-frontend-metrics-recvmmsg
Remi Gacogne [Thu, 17 Aug 2023 10:12:34 +0000 (12:12 +0200)] 
Merge pull request #13150 from rgacogne/ddist18-fix-frontend-metrics-recvmmsg

dnsdist-1.8.x: Properly record self-answered UDP responses with recvmmsg

23 months agodnsdist: Properly record self-answered UDP responses with recvmmsg 13150/head
Remi Gacogne [Thu, 17 Aug 2023 09:19:15 +0000 (11:19 +0200)] 
dnsdist: Properly record self-answered UDP responses with recvmmsg

Responses sent directly from dnsdist, without reaching out to a backend
(self-generated and cache hits answers, mostly) where not properly
accounted for in frontend metrics, ring buffer entries and latency
computation when recvmmsg/sendmmsg support was enabled via
`setUDPMultipleMessagesVectorSize()`.

(cherry picked from commit 3692220de3633434cb88556132cbb77255440ce3)

23 months agofix #12801 + regression test 13132/head
Christof Chen [Thu, 11 May 2023 18:00:01 +0000 (20:00 +0200)] 
fix #12801 + regression test

(cherry picked from commit 6bb404b627442d64b829edcffcc9f5fbc4987eb4)

23 months agodnsdist: Fix a boolean nit as suggested by Otto 13131/head
Remi Gacogne [Tue, 13 Jun 2023 08:02:45 +0000 (10:02 +0200)] 
dnsdist: Fix a boolean nit as suggested by Otto

(cherry picked from commit 2c9b6e8915304b24996e9382ba1e8a36713b5da4)

23 months agodnsdist: Fix cache hit and miss metrics with DoH queries
Remi Gacogne [Wed, 3 May 2023 13:02:34 +0000 (15:02 +0200)] 
dnsdist: Fix cache hit and miss metrics with DoH queries

Since we do two lookups for DoH queries forwarded over UDP (first
TCP then UDP), we need to be careful to only record a cache miss
in our last attempt.

(cherry picked from commit bc4d98b7cb2ecad488560d1dbef156708a1166af)

23 months agolibssl: Fix a memory leak when processing TLS tickets w/ OpenSSL 3.x 13130/head
Remi Gacogne [Tue, 9 May 2023 13:15:06 +0000 (15:15 +0200)] 
libssl: Fix a memory leak when processing TLS tickets w/ OpenSSL 3.x

(cherry picked from commit 0a18d0349145ae0c49b6dfef0be58bde925c4806)

23 months agodnsdist: Add a TSAN suppression for the backend re-connection code 13129/head
Remi Gacogne [Wed, 3 May 2023 15:55:34 +0000 (17:55 +0200)] 
dnsdist: Add a TSAN suppression for the backend re-connection code

(cherry picked from commit 0d199b6529f5c410d6014bf3058c717b57625553)

23 months agodnsdist: check that the UDP responder thread is running after reconnecting
Remi Gacogne [Wed, 3 May 2023 14:37:36 +0000 (16:37 +0200)] 
dnsdist: check that the UDP responder thread is running after reconnecting

(cherry picked from commit bb1ace1fedca0f6bdd2a962514cd5a6491f3c703)

23 months agodnsdist: Only log failed backend connection attempt at info on first try
Remi Gacogne [Wed, 3 May 2023 14:36:29 +0000 (16:36 +0200)] 
dnsdist: Only log failed backend connection attempt at info on first try

(cherry picked from commit 3de50c36895bc12a8555066f376e70320166c73e)

23 months agodnsdist: Properly handle reconnection failure for backend UDP sockets
Remi Gacogne [Wed, 5 Apr 2023 20:17:23 +0000 (22:17 +0200)] 
dnsdist: Properly handle reconnection failure for backend UDP sockets

We try to reconnect our UDP sockets toward backends on some kind of
network errors that indicate a topology change, but we need to be
careful to handle the case where we actually fail to reconnect, as
we end up with no remaining sockets to use.
This commit properly deals with this case by pausing the thread handling
UDP responses from the backend, instead of having it enter a busy loop,
and by attempting to reconnect if we get a `bad file number` error when
trying to send a UDP datagram to the backend.

(cherry picked from commit 541b8df1fc0773549a76c8de13fb1123baba8bda)

23 months agoUpdate dnsdist-console.cc 13128/head
phonedph1 [Thu, 18 May 2023 15:23:43 +0000 (09:23 -0600)] 
Update dnsdist-console.cc

(cherry picked from commit 6f1bb66b685ea467e94d6b06f443186e0dd80afd)

23 months agoYaHTTP: Prevent integer overflow on very large chunks 13127/head
Remi Gacogne [Wed, 8 Mar 2023 17:25:30 +0000 (18:25 +0100)] 
YaHTTP: Prevent integer overflow on very large chunks

If the chunk_size is very close to the maximum value of an integer,
we trigger an integer overflow when checking if we have a trailing
newline after the payload.
Reported by OSS-Fuzz as:
https://oss-fuzz.com/testcase-detail/6439610474692608
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=56804

(cherry picked from commit b602982fc5b4fb9139dec591541e0c070ceb47f5)

23 months agodnsdist: Remove a racy test in the AsynchronousHolder unit tests 13126/head
Remi Gacogne [Mon, 12 Jun 2023 09:04:51 +0000 (11:04 +0200)] 
dnsdist: Remove a racy test in the AsynchronousHolder unit tests

We are adding an expired event so the worker thread of the
AsynchronousHolder can pick it up immediately, even before we come
back from the call to push(), which leads to a racy test.
This was observed on GitHub Actions when running with TSAN:
```
FAIL: testrunner
================

Running 170 test cases...
test-dnsdistasync.cc(156): error: in "test_dnsdistasync/test_AddingExpiredEvent": check !holder->empty() has failed

*** 1 failure is detected in the test module "unit"
FAIL testrunner (exit status: 201)
```

(cherry picked from commit 35bbac75efbd4fb8a9523ab3974bea5507484f65)

23 months agodnsdist: Increment the "dyn blocked" counter for eBPF blocks as well 13125/head
Remi Gacogne [Tue, 13 Jun 2023 12:08:56 +0000 (14:08 +0200)] 
dnsdist: Increment the "dyn blocked" counter for eBPF blocks as well

Regular, userspace blocks increment the "dyn blocked" counter for every
dropped query. The eBPF blocks are executed in kernelspace and thus do
not increment that counter at all, which makes it challenging for
reporting to do its job. On the other hand we want our eBPF code to
be as efficient as possible since it is used when performance really
matters.
This commit updates the counter when a eBPF dynamic block is removed,
which is a compromise between the performance impact and a slight
reporting delay.

(cherry picked from commit e59686d645ff5d1652f2fdef109fff5d98d70ea2)

23 months agoUpdate dockerdata/startup.py 13124/head
Houtworm [Wed, 14 Jun 2023 08:09:15 +0000 (10:09 +0200)] 
Update dockerdata/startup.py

Co-authored-by: Remi Gacogne <github@coredump.fr>
(cherry picked from commit b9e82a462fae4cf5979de3e13c68a9af2ca169c8)

23 months agofixed the webserver config line?
djonker [Tue, 13 Jun 2023 22:34:09 +0000 (00:34 +0200)] 
fixed the webserver config line?

(cherry picked from commit fa8766c59d2cdf05d86c2dd2ea21018524b35609)

23 months agoStop using the now deprecated ERR_load_CRYPTO_strings() to detect OpenSSL 13121/head
Remi Gacogne [Wed, 21 Jun 2023 12:58:15 +0000 (14:58 +0200)] 
Stop using the now deprecated ERR_load_CRYPTO_strings() to detect OpenSSL

And move to BN_new() instead, which has been present since at least
0.9.6 and is still in 3.1.

(cherry picked from commit 9fcef4932c9323b085984f8a087045fef70103f5)

23 months agodnsdist: fix typo 13120/head
Peter van Dijk [Thu, 22 Jun 2023 08:50:13 +0000 (10:50 +0200)] 
dnsdist: fix typo

(cherry picked from commit d9b4683e38076cbf8a2bcd79ebf1f7c5da88ac00)

23 months agoWork around Red Hat 8 pooping the bed in OpenSSL's headers 13119/head
Remi Gacogne [Wed, 28 Jun 2023 13:23:35 +0000 (15:23 +0200)] 
Work around Red Hat 8 pooping the bed in OpenSSL's headers

The openssl/kdf.h header on EL8 is invalid because someone backported
a work-in-progress feature to an older OpenSSL branch and did not
bother to backport the fixes that were added later.

Red Hat declined to fix their mess and helpfully suggested we do the
work instead in https://bugzilla.redhat.com/show_bug.cgi?id=2215856

(cherry picked from commit 3dabf2d4a1a478fb00a232259e8043f075eb4d03)

23 months agoUndo an accidentally change 13117/head
Winfried Angele [Wed, 12 Apr 2023 08:30:45 +0000 (10:30 +0200)] 
Undo an accidentally change

'disableZeroScope' was  accidentally changed to 'disableZeroScoping' in commit 597a91a3cec373ebd4172d167a0f9c7500781027

(cherry picked from commit d85c923f52d1e2140f3ecf5467b513c7b54a856e)

2 years agoMerge pull request #12977 from rgacogne/ddist18-fix-doh-xforwardedfor-maxtcpconnperclient
Remi Gacogne [Mon, 10 Jul 2023 08:48:51 +0000 (10:48 +0200)] 
Merge pull request #12977 from rgacogne/ddist18-fix-doh-xforwardedfor-maxtcpconnperclient

dnsdist-1.8.x: Fix a crash when X-Forwarded-For overrides the initial source IP

2 years agodnsdist: Fix a crash when X-Forwarded-For overrides the initial source IP 12977/head
Remi Gacogne [Mon, 3 Jul 2023 12:06:05 +0000 (14:06 +0200)] 
dnsdist: Fix a crash when X-Forwarded-For overrides the initial source IP

When both the processing of X-Forwarded-For DNS-over-https headers
(`trustForwardedForHeader=true`) and a maximum number of concurrent
TCP connections per client (`setMaxTCPConnectionsPerClient()`) are
enabled, dnsdist could crash because of an uncaught exception:
```
dnsdist[X]: terminate called after throwing an instance of 'std::runtime_error'
dnsdist[X]:   what():  DOH thread failed to launch: map::at
```
This was caused by the TCP connection being first accounted for with the
initial source IP (from the upstream HTTP proxy) but later released using
the IP extracted from the X-Forwarded-For header, leading to an unexpected
failure to locate the corresponding entry in the map.

We might not actually want to enforce the maximum number of concurrent
TCP connections per client when X-Forwarded-For processing is enabled,
though, because we usually want to rate limit the actual client and
not the HTTP proxy, but X-Forwarded-For being set per HTTP query, instead
of per-connection, makes that pretty much impossible at our level since
the same connection from the HTTP proxy can be reused for several clients.
The proxy protocol would be a better option to enforce that limit.

(cherry picked from commit 9b703b51ca25838eeec19449a1c49cb926aef52a)

2 years agoMerge pull request #12824 from rgacogne/ddist18-12819
Remi Gacogne [Thu, 15 Jun 2023 13:58:40 +0000 (15:58 +0200)] 
Merge pull request #12824 from rgacogne/ddist18-12819

dnsdist-1.8.x: Stop setting SO_REUSEADDR on outgoing UDP client sockets

2 years agoMerge pull request #12823 from rgacogne/ddist18-12811
Remi Gacogne [Thu, 15 Jun 2023 13:58:05 +0000 (15:58 +0200)] 
Merge pull request #12823 from rgacogne/ddist18-12811

dnsdist-1.8.x: Add the query ID to health-check log messages, fix nits

2 years agoMerge pull request #12822 from rgacogne/ddist18-12802
Remi Gacogne [Thu, 15 Jun 2023 13:57:35 +0000 (15:57 +0200)] 
Merge pull request #12822 from rgacogne/ddist18-12802

dnsdist-1.8.x: Properly set the size of the UDP health-check response

2 years agoMerge pull request #12821 from rgacogne/ddist18-12804
Remi Gacogne [Thu, 15 Jun 2023 13:56:58 +0000 (15:56 +0200)] 
Merge pull request #12821 from rgacogne/ddist18-12804

dnsdist-1.8.x: Account for the health-check run time between two runs

2 years agoMerge pull request #12820 from rgacogne/ddist18-12800
Remi Gacogne [Thu, 15 Jun 2023 13:56:25 +0000 (15:56 +0200)] 
Merge pull request #12820 from rgacogne/ddist18-12800

dnsdist-1.8.x: Print the received, invalid health-check response ID

2 years agodnsdist: Really disable REUSEADDR on outgoing UDP client sockets 12824/head
Remi Gacogne [Mon, 15 May 2023 13:32:27 +0000 (15:32 +0200)] 
dnsdist: Really disable REUSEADDR on outgoing UDP client sockets

It turns out that our `Socket::bind()` will _helpfully_ enable this
by default.

(cherry picked from commit 20f67fee9447069d4586a41254468ac060b2d65e)

2 years agodnsdist: Stop setting SO_REUSEADDR on outgoing UDP client sockets
Remi Gacogne [Mon, 15 May 2023 12:10:55 +0000 (14:10 +0200)] 
dnsdist: Stop setting SO_REUSEADDR on outgoing UDP client sockets

`SO_REUSEADDR` is useful on TCP server sockets to allow binding quickly
after restarting the process without waiting `TIME_WAIT` seconds, or
to allow some port reuse on BSD. It also allows reusing a port more
quickly for TCP client sockets.
For UDP sockets, however, Linux allows two sockets to be bound to the
same address and port, and will distribute all packets to the most
recent socket, which is very unexpected, to say the least.

(cherry picked from commit b33f09f1989e938c503142a38c556df94254443a)

2 years agodnsdist: Add the query ID to health-check log messages, fix nits 12823/head
Remi Gacogne [Thu, 11 May 2023 13:22:25 +0000 (15:22 +0200)] 
dnsdist: Add the query ID to health-check log messages, fix nits

(cherry picked from commit 385fca46ffe3a6f84806aab67d47c8b80ebac26c)

2 years agodnsdist: Properly set the size of the UDP health-check response 12822/head
Remi Gacogne [Thu, 11 May 2023 13:27:07 +0000 (15:27 +0200)] 
dnsdist: Properly set the size of the UDP health-check response

We forgot to resize the response buffer to what we actually got,
so the initial buffer size (512) was mistakenly used later on.
Technically this should not be an issue as the buffer is large
enough, but that prevents us from reporting that the response
was broken if it not large enough for a DNS header, for example.

(cherry picked from commit 6a04912e36e32104434d2b1b0625a0de0e0c002d)

2 years agodnsdist: Account for the health-check run time between two runs 12821/head
Remi Gacogne [Thu, 11 May 2023 13:07:01 +0000 (15:07 +0200)] 
dnsdist: Account for the health-check run time between two runs

We used to wait one full second between every run, which only makes
sense if the runs are not taking a long time. But as soon as we have
at least one check timing out, the run is taking roughly the time
of the longest timeout configured, so after this commit we:
- do not wait at all if the last run took more than a full second
- wait one second minus the elapsed time of the last run otherwise

(cherry picked from commit 5b48dd1425dabbba7ab6758fe3ccf2b1410faef7)

2 years agodnsdist: Print the received, invalid health-check response ID 12820/head
Remi Gacogne [Thu, 11 May 2023 08:15:44 +0000 (10:15 +0200)] 
dnsdist: Print the received, invalid health-check response ID

(cherry picked from commit bf22f0fdc1b9fe5f5d4e1d96333751542c432fe6)

2 years agoMerge pull request #12795 from rgacogne/ddist18-only-ddist-ci
Remi Gacogne [Mon, 15 May 2023 08:25:58 +0000 (10:25 +0200)] 
Merge pull request #12795 from rgacogne/ddist18-only-ddist-ci

dnsdist-1.8.x: Remove the workflows that are not relevant to dnsdist 1.8.x

2 years agoPin pyasn1 to 0.4.8 because 0.5.0 broke the API with 0.5.0 12795/head
Fred Morcos [Fri, 21 Apr 2023 08:58:14 +0000 (10:58 +0200)] 
Pin pyasn1 to 0.4.8 because 0.5.0 broke the API with 0.5.0

https://github.com/pyasn1/pyasn1/issues/28

On 20230420: https://pypi.org/project/pyasn1/#history

(cherry picked from commit 7d6cbd0823d2ebdede600dc034d852ba2c5f39c6)

2 years agodnsdist-1.8.x: Remove the workflows that are not relevant to dnsdist 1.8.x
Remi Gacogne [Tue, 9 May 2023 14:43:45 +0000 (16:43 +0200)] 
dnsdist-1.8.x: Remove the workflows that are not relevant to dnsdist 1.8.x

2 years agoMerge pull request #12682 from rgacogne/ddist-ci-wait-for dnsdist-1.8.0
Remi Gacogne [Tue, 28 Mar 2023 10:39:46 +0000 (12:39 +0200)] 
Merge pull request #12682 from rgacogne/ddist-ci-wait-for

dnsdist: Wait until dnsdist is listening on the requested port in the tests

2 years agoMerge pull request #12688 from omoerbeek/rec-bound-invariant
Otto Moerbeek [Mon, 27 Mar 2023 15:04:41 +0000 (17:04 +0200)] 
Merge pull request #12688 from omoerbeek/rec-bound-invariant

rec: re-establish "recursion depth is always increasing" invariant

2 years agoALso derive alias recursion bound from s_maxdepth. 12688/head
Otto Moerbeek [Mon, 27 Mar 2023 10:22:16 +0000 (12:22 +0200)] 
ALso derive alias recursion bound from s_maxdepth.

This should be revisited, as it looks like the check
in doCNAMECacheCheck() overrides the less strick check in
doResolveNoQNameMinimization().

2 years agodnsdist: Don't test the web server port before the concurrent conns check 12682/head
Remi Gacogne [Mon, 27 Mar 2023 08:01:51 +0000 (10:01 +0200)] 
dnsdist: Don't test the web server port before the concurrent conns check

2 years agorec: re-establish "recursion depth is always increasing" invariant
Otto Moerbeek [Thu, 23 Mar 2023 10:42:35 +0000 (11:42 +0100)] 
rec: re-establish "recursion depth is always increasing" invariant

Now that we have getQMFallbackMode(), we can go back to always increase depth
and never decrease it and adapt the upper bound check if needed.

This should prevent a re-occurence of a bug similar to PowerDNS Security Advisory 2023-01.

2 years agoMerge pull request #12687 from rgacogne/ddist-rule-params
Remi Gacogne [Sat, 25 Mar 2023 14:54:09 +0000 (15:54 +0100)] 
Merge pull request #12687 from rgacogne/ddist-rule-params

dnsdist: Fix 'Unknown key' issue for actions and rules parameters

2 years agoMerge pull request #12684 from Habbie/amazon-linux-2023
Peter van Dijk [Fri, 24 Mar 2023 22:51:20 +0000 (23:51 +0100)] 
Merge pull request #12684 from Habbie/amazon-linux-2023

builder: add amazon-2023 target

2 years agodnsdist: Fix 'Unknown key' issue for actions and rules parameters 12687/head
Remi Gacogne [Fri, 24 Mar 2023 17:26:13 +0000 (18:26 +0100)] 
dnsdist: Fix 'Unknown key' issue for actions and rules parameters

The parameters were properly parsed but not marked as consumed,
leading to warnings such as:
```
addAction: Unknown key 'name' given - ignored
```

2 years agobuilder: add amazon-2023 target 12684/head
Peter van Dijk [Tue, 21 Mar 2023 14:32:06 +0000 (15:32 +0100)] 
builder: add amazon-2023 target

2 years agoMerge pull request #12668 from aerique/feature/add-auth-48-to-repo-script
Remi Gacogne [Fri, 24 Mar 2023 13:49:27 +0000 (14:49 +0100)] 
Merge pull request #12668 from aerique/feature/add-auth-48-to-repo-script

Add auth-48 to repo test script.

2 years agodnsdist: Remove a left-over startup delay in the regression tests
Remi Gacogne [Fri, 24 Mar 2023 09:47:27 +0000 (10:47 +0100)] 
dnsdist: Remove a left-over startup delay in the regression tests

2 years agodnsdist: Wait the correct port to come up on special case tests
Remi Gacogne [Fri, 24 Mar 2023 09:47:02 +0000 (10:47 +0100)] 
dnsdist: Wait the correct port to come up on special case tests

2 years agodnsdist: Wait for the API port to be available before running the tests
Remi Gacogne [Fri, 24 Mar 2023 09:45:08 +0000 (10:45 +0100)] 
dnsdist: Wait for the API port to be available before running the tests

2 years agoMerge pull request #12672 from omoerbeek/dnsheader-aligned
Otto Moerbeek [Wed, 22 Mar 2023 13:34:59 +0000 (14:34 +0100)] 
Merge pull request #12672 from omoerbeek/dnsheader-aligned

rec and dnsdist: fix a dnsheader unaligned case

2 years agoContinue processing records after OPT in ageDNSPacket() 12672/head
Otto Moerbeek [Wed, 22 Mar 2023 10:04:13 +0000 (11:04 +0100)] 
Continue processing records after OPT in ageDNSPacket()

2 years agoMerge pull request #12664 from rgacogne/auth-svcb-race-copy-const
Remi Gacogne [Wed, 22 Mar 2023 09:17:10 +0000 (10:17 +0100)] 
Merge pull request #12664 from rgacogne/auth-svcb-race-copy-const

DNSRecord: Ensure that the content can be read or replaced, not edited

2 years agoAnother case of too early API access
Otto Moerbeek [Tue, 21 Mar 2023 16:07:46 +0000 (17:07 +0100)] 
Another case of too early API access

2 years agorec and dnsdist: fix a case of potential unaligned header access
Otto Moerbeek [Tue, 21 Mar 2023 12:34:35 +0000 (13:34 +0100)] 
rec and dnsdist: fix a case of potential unaligned header access

I addded an argument to ageDNSPacket to circumvent having to do it in
two places in rec.

I am also wondering if the break in ageDNSPakcet() is right.
I suspect we want to continue with other records even if we see an OPT
(which does not *have* to be the last as far as I know)

2 years agoMerge pull request #12661 from Habbie/auth-4.8.0-alpha1-docs
Peter van Dijk [Tue, 21 Mar 2023 13:56:38 +0000 (14:56 +0100)] 
Merge pull request #12661 from Habbie/auth-4.8.0-alpha1-docs

auth-4.8.0-alpha1: secpoll&docs

2 years agoMerge pull request #12627 from Habbie/ubuntu-lunar
Peter van Dijk [Tue, 21 Mar 2023 12:34:03 +0000 (13:34 +0100)] 
Merge pull request #12627 from Habbie/ubuntu-lunar

add ubuntu:lunar builder target and test it daily

2 years agoauth-4.8.0-alpha1: secpoll&docs 12661/head
Peter van Dijk [Fri, 17 Mar 2023 13:09:01 +0000 (14:09 +0100)] 
auth-4.8.0-alpha1: secpoll&docs

2 years agoAdd auth-48 to repo test script. 12668/head
Erik Winkels [Tue, 21 Mar 2023 09:28:13 +0000 (10:28 +0100)] 
Add auth-48 to repo test script.

2 years agoMerge pull request #12667 from omoerbeek/rec-test-notify-wait-for-api
Otto Moerbeek [Tue, 21 Mar 2023 08:39:26 +0000 (09:39 +0100)] 
Merge pull request #12667 from omoerbeek/rec-test-notify-wait-for-api

rec: Wait for the API to come alive before using it in notify test

2 years agoMerge pull request #12654 from Habbie/dnsdist-secpoll-ctime
Remi Gacogne [Tue, 21 Mar 2023 08:25:08 +0000 (09:25 +0100)] 
Merge pull request #12654 from Habbie/dnsdist-secpoll-ctime

dnsdist secpoll: explicitly include necessary ctime header for time_t

2 years agorec: Wait for the API to come alive before using it in notify test 12667/head
Otto Moerbeek [Mon, 20 Mar 2023 11:36:20 +0000 (12:36 +0100)] 
rec: Wait for the API to come alive before using it in notify test

2 years agoMerge pull request #12666 from Habbie/lmdb-bit-header auth-4.8.0-alpha1
Peter van Dijk [Mon, 20 Mar 2023 10:03:26 +0000 (11:03 +0100)] 
Merge pull request #12666 from Habbie/lmdb-bit-header

lmdb-safe: remove unused header, plus assert macro presence

2 years agolmdb-safe: remove unused header, plus assert macro presence 12666/head
Peter van Dijk [Mon, 20 Mar 2023 09:03:25 +0000 (10:03 +0100)] 
lmdb-safe: remove unused header, plus assert macro presence

2 years agoDNSRecord: Ensure that the content can be read or replaced, not edited 12664/head
Remi Gacogne [Thu, 16 Mar 2023 21:55:56 +0000 (22:55 +0100)] 
DNSRecord: Ensure that the content can be read or replaced, not edited

2 years agoMerge pull request #12546 from Habbie/auth-lmdb-schema-5
Peter van Dijk [Fri, 17 Mar 2023 15:29:17 +0000 (16:29 +0100)] 
Merge pull request #12546 from Habbie/auth-lmdb-schema-5

auth: LMDB schema version 5

2 years ago auth: Prevent a race during the processing of SVC auto-hints
Remi Gacogne [Thu, 16 Mar 2023 13:18:49 +0000 (14:18 +0100)] 
 auth: Prevent a race during the processing of SVC auto-hints

When `svc-autohints` is enabled, the content of SVCB and HTTPS records
is modified in `PacketHandler::doAdditionalProcessing()` to expand
the IPv4 and IPv6 with their actual values.
This causes an issue because the content of these records might be
shared between threads, via the record cache, and one thread could
be trying to read from the internal `std::set` while a second thread
is altering it, leading to a data race and possibly to memory corruption
and a crash.
This is correctly detected by TSAN:
```
WARNING: ThreadSanitizer: data race (pid=102795)
  Write of size 8 at 0x7b3400010350 by thread T33:
    #0 operator delete(void*) <null> (pdns_server+0x211b7c) (BuildId: 384adc19a67695435bd5e89d0a77f562561f4593)
    #1 std::__new_allocator<std::_Rb_tree_node<SvcParam>>::deallocate(std::_Rb_tree_node<SvcParam>*, unsigned long) /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.1/../../../../include/c++/12.2.1/bits/new_allocator.h:158:2 (pdns_server+0x33fc78) (BuildId: 384adc19a67695435bd5e89d0a77f562561f4593)
    #2 std::allocator_traits<std::allocator<std::_Rb_tree_node<SvcParam>>>::deallocate(std::allocator<std::_Rb_tree_node<SvcParam>>&, std::_Rb_tree_node<SvcParam>*, unsigned long) /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.1/../../../../include/c++/12.2.1/bits/alloc_traits.h:496:13 (pdns_server+0x33fc78)
    #3 std::_Rb_tree<SvcParam, SvcParam, std::_Identity<SvcParam>, std::less<SvcParam>, std::allocator<SvcParam>>::_M_put_node(std::_Rb_tree_node<SvcParam>*) /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.1/../../../../include/c++/12.2.1/bits/stl_tree.h:565:9 (pdns_server+0x33fc78)
    #4 std::_Rb_tree<SvcParam, SvcParam, std::_Identity<SvcParam>, std::less<SvcParam>, std::allocator<SvcParam>>::_M_drop_node(std::_Rb_tree_node<SvcParam>*) /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.1/../../../../include/c++/12.2.1/bits/stl_tree.h:632:2 (pdns_server+0x33fc78)
    #5 std::_Rb_tree<SvcParam, SvcParam, std::_Identity<SvcParam>, std::less<SvcParam>, std::allocator<SvcParam>>::_M_erase_aux(std::_Rb_tree_const_iterator<SvcParam>) /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.1/../../../../include/c++/12.2.1/bits/stl_tree.h:2495:7 (pdns_server+0x33fc78)
    #6 std::_Rb_tree<SvcParam, SvcParam, std::_Identity<SvcParam>, std::less<SvcParam>, std::allocator<SvcParam>>::erase[abi:cxx11](std::_Rb_tree_const_iterator<SvcParam>) /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.1/../../../../include/c++/12.2.1/bits/stl_tree.h:1197:2 (pdns_server+0x33fc78)
    #7 std::set<SvcParam, std::less<SvcParam>, std::allocator<SvcParam>>::erase[abi:cxx11](std::_Rb_tree_const_iterator<SvcParam>) /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.1/../../../../include/c++/12.2.1/bits/stl_set.h:655:21 (pdns_server+0x33fc78)
    #8 SVCBBaseRecordContent::setHints(SvcParam::SvcParamKey const&, std::vector<ComboAddress, std::allocator<ComboAddress>> const&) /work/pdns/pdns/dnsrecords.cc:768:14 (pdns_server+0x33fc78)
    #9 PacketHandler::doAdditionalProcessing(DNSPacket&, std::unique_ptr<DNSPacket, std::default_delete<DNSPacket>>&) /work/pdns/pdns/packethandler.cc:565:16 (pdns_server+0x4ed330) (BuildId: 384adc19a67695435bd5e89d0a77f562561f4593)
    #10 PacketHandler::doQuestion(DNSPacket&) /work/pdns/pdns/packethandler.cc:1794:5 (pdns_server+0x4f79b4) (BuildId: 384adc19a67695435bd5e89d0a77f562561f4593)
    PowerDNS#11 PacketHandler::question(DNSPacket&) /work/pdns/pdns/packethandler.cc:1175:10 (pdns_server+0x4f649a) (BuildId: 384adc19a67695435bd5e89d0a77f562561f4593)
    PowerDNS#12 MultiThreadDistributor<DNSPacket, DNSPacket, PacketHandler>::distribute(int) /work/pdns/pdns/./distributor.hh:220:14 (pdns_server+0x260f70) (BuildId: 384adc19a67695435bd5e89d0a77f562561f4593)
    PowerDNS#13 MultiThreadDistributor<DNSPacket, DNSPacket, PacketHandler>::MultiThreadDistributor(int)::'lambda'()::operator()() const /work/pdns/pdns/./distributor.hh:179:25 (pdns_server+0x260b31) (BuildId: 384adc19a67695435bd5e89d0a77f562561f4593)
    PowerDNS#14 void std::__invoke_impl<void, MultiThreadDistributor<DNSPacket, DNSPacket, PacketHandler>::MultiThreadDistributor(int)::'lambda'()>(std::__invoke_other, MultiThreadDistributor<DNSPacket, DNSPacket, PacketHandler>::MultiThreadDistributor(int)::'lambda'()&&) /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.1/../../../../include/c++/12.2.1/bits/invoke.h:61:14 (pdns_server+0x260b31)
    PowerDNS#15 std::__invoke_result<MultiThreadDistributor<DNSPacket, DNSPacket, PacketHandler>::MultiThreadDistributor(int)::'lambda'()>::type std::__invoke<MultiThreadDistributor<DNSPacket, DNSPacket, PacketHandler>::MultiThreadDistributor(int)::'lambda'()>(MultiThreadDistributor<DNSPacket, DNSPacket, PacketHandler>::MultiThreadDistributor(int)::'lambda'()&&) /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.1/../../../../include/c++/12.2.1/bits/invoke.h:96:14 (pdns_server+0x260b31)
    PowerDNS#16 void std:thread:_Invoker<std::tuple<MultiThreadDistributor<DNSPacket, DNSPacket, PacketHandler>::MultiThreadDistributor(int)::'lambda'()>>::_M_invoke<0ul>(std::_Index_tuple<0ul>) /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.1/../../../../include/c++/12.2.1/bits/std_thread.h:258:13 (pdns_server+0x260b31)
    PowerDNS#17 std:thread:_Invoker<std::tuple<MultiThreadDistributor<DNSPacket, DNSPacket, PacketHandler>::MultiThreadDistributor(int)::'lambda'()>>::operator()() /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.1/../../../../include/c++/12.2.1/bits/std_thread.h:265:11 (pdns_server+0x260b31)
    PowerDNS#18 std:thread:_State_impl<std:thread:_Invoker<std::tuple<MultiThreadDistributor<DNSPacket, DNSPacket, PacketHandler>::MultiThreadDistributor(int)::'lambda'()>>>::_M_run() /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.1/../../../../include/c++/12.2.1/bits/std_thread.h:210:13 (pdns_server+0x260b31)
    PowerDNS#19 execute_native_thread_routine /usr/src/debug/gcc/gcc/libstdc++-v3/src/c++11/thread.cc:82:18 (libstdc++.so.6+0xd72c2) (BuildId: 6fe66a2d539a78c993bd2d377e00fad389220963)

  Previous read of size 2 at 0x7b3400010350 by thread T39:
    #0 SvcParam::getKey() const /work/pdns/pdns/./svc-records.hh:80:12 (pdns_server+0x3721f3) (BuildId: 384adc19a67695435bd5e89d0a77f562561f4593)
    #1 GenericDNSPacketWriter<std::vector<unsigned char, std::allocator<unsigned char>>>::xfrSvcParamKeyVals(std::set<SvcParam, std::less<SvcParam>, std::allocator<SvcParam>> const&) /work/pdns/pdns/dnswriter.cc:404:23 (pdns_server+0x3721f3)
    #2 void HTTPSRecordContent::xfrPacket<GenericDNSPacketWriter<std::vector<unsigned char, std::allocator<unsigned char>>>>(GenericDNSPacketWriter<std::vector<unsigned char, std::allocator<unsigned char>>>&, bool) /work/pdns/pdns/dnsrecords.cc:348:1 (pdns_server+0x3349bd) (BuildId: 384adc19a67695435bd5e89d0a77f562561f4593)
    #3 HTTPSRecordContent::toPacket(GenericDNSPacketWriter<std::vector<unsigned char, std::allocator<unsigned char>>>&) /work/pdns/pdns/dnsrecords.cc:348:1 (pdns_server+0x3349bd)
    #4 DNSRecordContent::serialize[abi:cxx11](DNSName const&, bool, bool) /work/pdns/pdns/./dnsparser.hh:215:11 (pdns_server+0x311140) (BuildId: 384adc19a67695435bd5e89d0a77f562561f4593)
    #5 DNSPacket::addRecord(DNSZoneRecord&&) /work/pdns/pdns/dnspacket.cc:177:68 (pdns_server+0x2fa894) (BuildId: 384adc19a67695435bd5e89d0a77f562561f4593)
    #6 PacketHandler::doAdditionalProcessing(DNSPacket&, std::unique_ptr<DNSPacket, std::default_delete<DNSPacket>>&) /work/pdns/pdns/packethandler.cc:542:8 (pdns_server+0x4eccf2) (BuildId: 384adc19a67695435bd5e89d0a77f562561f4593)
    #7 PacketHandler::doQuestion(DNSPacket&) /work/pdns/pdns/packethandler.cc:1794:5 (pdns_server+0x4f79b4) (BuildId: 384adc19a67695435bd5e89d0a77f562561f4593)
    #8 PacketHandler::question(DNSPacket&) /work/pdns/pdns/packethandler.cc:1175:10 (pdns_server+0x4f649a) (BuildId: 384adc19a67695435bd5e89d0a77f562561f4593)
    #9 MultiThreadDistributor<DNSPacket, DNSPacket, PacketHandler>::distribute(int) /work/pdns/pdns/./distributor.hh:220:14 (pdns_server+0x260f70) (BuildId: 384adc19a67695435bd5e89d0a77f562561f4593)
    #10 MultiThreadDistributor<DNSPacket, DNSPacket, PacketHandler>::MultiThreadDistributor(int)::'lambda'()::operator()() const /work/pdns/pdns/./distributor.hh:179:25 (pdns_server+0x260b31) (BuildId: 384adc19a67695435bd5e89d0a77f562561f4593)
    PowerDNS#11 void std::__invoke_impl<void, MultiThreadDistributor<DNSPacket, DNSPacket, PacketHandler>::MultiThreadDistributor(int)::'lambda'()>(std::__invoke_other, MultiThreadDistributor<DNSPacket, DNSPacket, PacketHandler>::MultiThreadDistributor(int)::'lambda'()&&) /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.1/../../../../include/c++/12.2.1/bits/invoke.h:61:14 (pdns_server+0x260b31)
    PowerDNS#12 std::__invoke_result<MultiThreadDistributor<DNSPacket, DNSPacket, PacketHandler>::MultiThreadDistributor(int)::'lambda'()>::type std::__invoke<MultiThreadDistributor<DNSPacket, DNSPacket, PacketHandler>::MultiThreadDistributor(int)::'lambda'()>(MultiThreadDistributor<DNSPacket, DNSPacket, PacketHandler>::MultiThreadDistributor(int)::'lambda'()&&) /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.1/../../../../include/c++/12.2.1/bits/invoke.h:96:14 (pdns_server+0x260b31)
    PowerDNS#13 void std:thread:_Invoker<std::tuple<MultiThreadDistributor<DNSPacket, DNSPacket, PacketHandler>::MultiThreadDistributor(int)::'lambda'()>>::_M_invoke<0ul>(std::_Index_tuple<0ul>) /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.1/../../../../include/c++/12.2.1/bits/std_thread.h:258:13 (pdns_server+0x260b31)
    PowerDNS#14 std:thread:_Invoker<std::tuple<MultiThreadDistributor<DNSPacket, DNSPacket, PacketHandler>::MultiThreadDistributor(int)::'lambda'()>>::operator()() /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.1/../../../../include/c++/12.2.1/bits/std_thread.h:265:11 (pdns_server+0x260b31)
    PowerDNS#15 std:thread:_State_impl<std:thread:_Invoker<std::tuple<MultiThreadDistributor<DNSPacket, DNSPacket, PacketHandler>::MultiThreadDistributor(int)::'lambda'()>>>::_M_run() /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.1/../../../../include/c++/12.2.1/bits/std_thread.h:210:13 (pdns_server+0x260b31)
    PowerDNS#16 execute_native_thread_routine /usr/src/debug/gcc/gcc/libstdc++-v3/src/c++11/thread.cc:82:18 (libstdc++.so.6+0xd72c2) (BuildId: 6fe66a2d539a78c993bd2d377e00fad389220963)

  Thread T33 'pdns/distributo' (tid=102833, running) created by thread T17 at:
    #0 pthread_create <null> (pdns_server+0x1904e6) (BuildId: 384adc19a67695435bd5e89d0a77f562561f4593)
    #1 __gthread_create /usr/src/debug/gcc/gcc-build/x86_64-pc-linux-gnu/libstdc++-v3/include/x86_64-pc-linux-gnu/bits/gthr-default.h:663:35 (libstdc++.so.6+0xd73a9) (BuildId: 6fe66a2d539a78c993bd2d377e00fad389220963)
    #2 std:thread:_M_start_thread(std::unique_ptr<std:thread:_State, std::default_delete<std:thread:_State>>, void (*)()) /usr/src/debug/gcc/gcc/libstdc++-v3/src/c++11/thread.cc:147:37 (libstdc++.so.6+0xd73a9)
    #3 Distributor<DNSPacket, DNSPacket, PacketHandler>::Create(int) /work/pdns/pdns/./distributor.hh:134:18 (pdns_server+0x256d23) (BuildId: 384adc19a67695435bd5e89d0a77f562561f4593)
    #4 qthread(unsigned int) /work/pdns/pdns/auth-main.cc:536:25 (pdns_server+0x256d23)
    #5 void std::__invoke_impl<void, void (*)(unsigned int), unsigned int>(std::__invoke_other, void (*&&)(unsigned int), unsigned int&&) /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.1/../../../../include/c++/12.2.1/bits/invoke.h:61:14 (pdns_server+0x2635f0) (BuildId: 384adc19a67695435bd5e89d0a77f562561f4593)
    #6 std::__invoke_result<void (*)(unsigned int), unsigned int>::type std::__invoke<void (*)(unsigned int), unsigned int>(void (*&&)(unsigned int), unsigned int&&) /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.1/../../../../include/c++/12.2.1/bits/invoke.h:96:14 (pdns_server+0x2635f0)
    #7 void std:thread:_Invoker<std::tuple<void (*)(unsigned int), unsigned int>>::_M_invoke<0ul, 1ul>(std::_Index_tuple<0ul, 1ul>) /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.1/../../../../include/c++/12.2.1/bits/std_thread.h:258:13 (pdns_server+0x2635f0)
    #8 std:thread:_Invoker<std::tuple<void (*)(unsigned int), unsigned int>>::operator()() /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.1/../../../../include/c++/12.2.1/bits/std_thread.h:265:11 (pdns_server+0x2635f0)
    #9 std:thread:_State_impl<std:thread:_Invoker<std::tuple<void (*)(unsigned int), unsigned int>>>::_M_run() /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.1/../../../../include/c++/12.2.1/bits/std_thread.h:210:13 (pdns_server+0x2635f0)
    #10 execute_native_thread_routine /usr/src/debug/gcc/gcc/libstdc++-v3/src/c++11/thread.cc:82:18 (libstdc++.so.6+0xd72c2) (BuildId: 6fe66a2d539a78c993bd2d377e00fad389220963)

  Thread T39 'pdns/distributo' (tid=102837, running) created by thread T19 at:
    #0 pthread_create <null> (pdns_server+0x1904e6) (BuildId: 384adc19a67695435bd5e89d0a77f562561f4593)
    #1 __gthread_create /usr/src/debug/gcc/gcc-build/x86_64-pc-linux-gnu/libstdc++-v3/include/x86_64-pc-linux-gnu/bits/gthr-default.h:663:35 (libstdc++.so.6+0xd73a9) (BuildId: 6fe66a2d539a78c993bd2d377e00fad389220963)
    #2 std:thread:_M_start_thread(std::unique_ptr<std:thread:_State, std::default_delete<std:thread:_State>>, void (*)()) /usr/src/debug/gcc/gcc/libstdc++-v3/src/c++11/thread.cc:147:37 (libstdc++.so.6+0xd73a9)
    #3 Distributor<DNSPacket, DNSPacket, PacketHandler>::Create(int) /work/pdns/pdns/./distributor.hh:134:18 (pdns_server+0x256d23) (BuildId: 384adc19a67695435bd5e89d0a77f562561f4593)
    #4 qthread(unsigned int) /work/pdns/pdns/auth-main.cc:536:25 (pdns_server+0x256d23)
    #5 void std::__invoke_impl<void, void (*)(unsigned int), unsigned int>(std::__invoke_other, void (*&&)(unsigned int), unsigned int&&) /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.1/../../../../include/c++/12.2.1/bits/invoke.h:61:14 (pdns_server+0x2635f0) (BuildId: 384adc19a67695435bd5e89d0a77f562561f4593)
    #6 std::__invoke_result<void (*)(unsigned int), unsigned int>::type std::__invoke<void (*)(unsigned int), unsigned int>(void (*&&)(unsigned int), unsigned int&&) /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.1/../../../../include/c++/12.2.1/bits/invoke.h:96:14 (pdns_server+0x2635f0)
    #7 void std:thread:_Invoker<std::tuple<void (*)(unsigned int), unsigned int>>::_M_invoke<0ul, 1ul>(std::_Index_tuple<0ul, 1ul>) /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.1/../../../../include/c++/12.2.1/bits/std_thread.h:258:13 (pdns_server+0x2635f0)
    #8 std:thread:_Invoker<std::tuple<void (*)(unsigned int), unsigned int>>::operator()() /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.1/../../../../include/c++/12.2.1/bits/std_thread.h:265:11 (pdns_server+0x2635f0)
    #9 std:thread:_State_impl<std:thread:_Invoker<std::tuple<void (*)(unsigned int), unsigned int>>>::_M_run() /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.1/../../../../include/c++/12.2.1/bits/std_thread.h:210:13 (pdns_server+0x2635f0)
    #10 execute_native_thread_routine /usr/src/debug/gcc/gcc/libstdc++-v3/src/c++11/thread.cc:82:18 (libstdc++.so.6+0xd72c2) (BuildId: 6fe66a2d539a78c993bd2d377e00fad389220963)

SUMMARY: ThreadSanitizer: data race (/work/pdns-rgacogne/pdns/pdns_server+0x211b7c) (BuildId: 384adc19a67695435bd5e89d0a77f562561f4593) in operator delete(void*)
```

To prevent this issue, this commit clones the content of SVCB/HTTPS
records before modifying the copy. the drawback is that we need to
do this operation every single time we process them.

2 years agoformat 12546/head
Peter van Dijk [Fri, 17 Mar 2023 13:51:45 +0000 (14:51 +0100)] 
format

2 years agocleanup
Peter van Dijk [Fri, 17 Mar 2023 13:51:21 +0000 (14:51 +0100)] 
cleanup

2 years agostring_view
Peter van Dijk [Fri, 17 Mar 2023 13:46:38 +0000 (14:46 +0100)] 
string_view

2 years agoApply suggestions from code review
Peter van Dijk [Fri, 17 Mar 2023 13:33:26 +0000 (14:33 +0100)] 
Apply suggestions from code review

Co-authored-by: Remi Gacogne <github@coredump.fr>
2 years agoUpdate ext/lmdb-safe/lmdb-safe.cc
Peter van Dijk [Fri, 17 Mar 2023 13:29:03 +0000 (14:29 +0100)] 
Update ext/lmdb-safe/lmdb-safe.cc

Co-authored-by: Remi Gacogne <github@coredump.fr>
2 years agoUpdate ext/lmdb-safe/lmdb-safe.cc
Peter van Dijk [Fri, 17 Mar 2023 13:28:46 +0000 (14:28 +0100)] 
Update ext/lmdb-safe/lmdb-safe.cc

Co-authored-by: Remi Gacogne <github@coredump.fr>
2 years agoUpdate ext/lmdb-safe/lmdb-safe.cc
Peter van Dijk [Fri, 17 Mar 2023 13:28:26 +0000 (14:28 +0100)] 
Update ext/lmdb-safe/lmdb-safe.cc

Co-authored-by: Remi Gacogne <github@coredump.fr>
2 years agoMerge pull request #12660 from omoerbeek/rec-regr-threads-pc
Otto Moerbeek [Fri, 17 Mar 2023 12:31:00 +0000 (13:31 +0100)] 
Merge pull request #12660 from omoerbeek/rec-regr-threads-pc

rec: Start using multiple threads in regression tests and enable packetcache

2 years agocleanup
Peter van Dijk [Fri, 17 Mar 2023 12:23:50 +0000 (13:23 +0100)] 
cleanup

2 years agoavoid char signedness trap
Peter van Dijk [Fri, 17 Mar 2023 12:23:46 +0000 (13:23 +0100)] 
avoid char signedness trap

2 years agoformat
Peter van Dijk [Fri, 17 Mar 2023 11:18:10 +0000 (12:18 +0100)] 
format

2 years agouse &
Peter van Dijk [Fri, 17 Mar 2023 10:59:27 +0000 (11:59 +0100)] 
use &

2 years agoavoid one unaligned uint16_t access
Peter van Dijk [Fri, 17 Mar 2023 10:57:26 +0000 (11:57 +0100)] 
avoid one unaligned uint16_t access

2 years agoremove unused (and unsafe) methods
Peter van Dijk [Fri, 17 Mar 2023 10:55:59 +0000 (11:55 +0100)] 
remove unused (and unsafe) methods

2 years agopush declarations down
Peter van Dijk [Fri, 17 Mar 2023 10:55:44 +0000 (11:55 +0100)] 
push declarations down

2 years agoPrevent data race by initing NOD protobuf tag values not in the NOD threads but in... 12660/head
Otto Moerbeek [Fri, 17 Mar 2023 10:35:55 +0000 (11:35 +0100)] 
Prevent data race by initing NOD protobuf tag values not in the NOD threads but in the main thread

2 years agocleanup
Peter van Dijk [Fri, 17 Mar 2023 10:33:56 +0000 (11:33 +0100)] 
cleanup

2 years agoenforce val size
Peter van Dijk [Fri, 17 Mar 2023 10:33:28 +0000 (11:33 +0100)] 
enforce val size

2 years agobe explicit about sizeof(T)
Peter van Dijk [Fri, 17 Mar 2023 10:23:43 +0000 (11:23 +0100)] 
be explicit about sizeof(T)

2 years agoremove redundant include
Peter van Dijk [Fri, 17 Mar 2023 10:16:27 +0000 (11:16 +0100)] 
remove redundant include

2 years agoUpdate ext/lmdb-safe/lmdb-safe.hh
Peter van Dijk [Fri, 17 Mar 2023 10:21:46 +0000 (11:21 +0100)] 
Update ext/lmdb-safe/lmdb-safe.hh

Co-authored-by: Remi Gacogne <github@coredump.fr>