Commit graph

42310 commits

Author SHA1 Message Date
Artem Boldariev
96e8ea1245 DoH: Track the amount of in flight outgoing data
Previously we would limit the amount of incoming data to process based
solely on the presence of not completed send requests. That worked,
however, it was found to severely degrade performance in certain
cases, as was revealed during extended testing.

Now we switch to keeping track of how much data is in flight (or ready
to be in flight) and limit the amount of processed incoming data when
the amount of in flight data surpasses the given threshold, similarly
to like we do in other transports.

(cherry picked from commit 05e8a50818)
2025-02-19 20:34:29 +02:00
Andoni Duarte Pintado
5f6080a959 Merge tag 'v9.20.6' into bind-9.20 2025-02-19 17:43:41 +01:00
Evan Hunt
0682684028 [9.20] fix: dev: Delete dead nodes when committing a new version
In the qpzone implementation of `dns_db_closeversion()`, if there are changed nodes that have no remaining data, delete them.

Closes #5169

Backport of MR !10089

Merge branch 'backport-5169-qpzone-delete-dead-nodes-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!10124
2025-02-18 23:28:41 +00:00
Evan Hunt
e35e701c2c when committing a new qpzone version, delete dead nodes
if all data has been deleted from a node in the qpzone
database, delete the node too.

(cherry picked from commit e58ce19cf2)
2025-02-18 22:55:20 +00:00
Petr Špaček
2ddfb57b45 [9.20] new: usr: Add HTTPS record query to host command line tool
The host command was extended to also query for the HTTPS RR type by default.

Backport of MR !8642

Merge branch 'backport-feature/main/host-rr-https-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!10123
2025-02-18 15:04:48 +00:00
Petr Menšík
92ec19add9 Do HTTPS record query from host in addition
Unless explicitly specified type from host command, do fourth query for
type HTTPS RR. It is expected it will become more common and some
systems already query that record for every name.

(cherry picked from commit 82069a5700)
2025-02-18 14:58:14 +00:00
Artem Boldariev
fd623c6ecc [9.20] fix: dev: Fix wrong logging severity in do_nsfetch()
Backport of !10017.

Merge branch '5145-artem-fix-wrong-logging-severity-in-do_nsfetch-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!10118
2025-02-18 09:23:05 +00:00
Artem Boldariev
7b0a5596d6 Fix wrong logging severity in do_nsfetch()
ISC_LOG_WARNING was used while ISC_LOG_DEBUG(3) was implied.

(cherry picked from commit fd3beaba2e)
2025-02-18 10:30:18 +02:00
Evan Hunt
11cc40ebf6 [9.20] fix: dev: Fix dns_qp_insert() checks in qpzone
Remove code in the QP zone database to handle failures of `dns_qp_insert()` which can't actually happen.

Closes #5171

Backport of MR !10088

Merge branch 'backport-5171-qpzone-insert-checks-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!10114
2025-02-18 08:02:05 +00:00
Evan Hunt
a21168a221 fix dns_qp_insert() checks in qpzone
in some places there were checks for failures of dns_qp_insert()
after dns_qp_getname(). such failures could only happen if another
thread inserted a node between the two calls, and that can't happen
because the calls are serialized with dns_qpmulti_write(). we can
simplify the code and just add an INSIST.

(cherry picked from commit fffa150df3)
2025-02-18 05:55:02 +00:00
Michal Nowak
5aa7a451cc [9.20] chg: test: Rewrite keyfromlabel system test to pytest
Backport of MR !9188

Merge branch 'backport-mnowak/pytest_rewrite_keyfromlabel-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!10112
2025-02-17 20:17:59 +00:00
Michal Nowak
5d615b4797 Rewrite keyfromlabel system test to pytest
(cherry picked from commit 409f394d6e)
2025-02-17 20:17:45 +00:00
Michal Nowak
8713e2f61c [9.20] chg: test: Rewrite keepalive system test to pytest
Backport of MR !9202

Merge branch 'backport-mnowak/pytest_rewrite_keepalive-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!10110
2025-02-17 19:56:29 +00:00
Michal Nowak
6354130bc7
Rewrite keepalive system test to pytest
(cherry picked from commit b804a70fac)
2025-02-17 20:24:36 +01:00
Michal Nowak
10bb9727c6 Add Dig interface
(cherry picked from commit 7347abd01f)
2025-02-17 19:19:04 +00:00
Mark Andrews
ba5fe2dd12 [9.20] fix: usr: Fix deferred validation of unsigned DS and DNSKEY records
When processing a query with the "checking disabled" bit set (CD=1), `named` stores the unvalidated result in the cache, marked "pending". When the same query is sent with CD=0, the cached data is validated, and either accepted as an answer, or ejected from the cache as invalid. This deferred validation was not attempted for DS and DNSKEY records if they had no cached signatures, causing spurious validation failures. We now complete the deferred validation in this scenario.

Also, if deferred validation fails, we now re-query the data to find out whether the zone has been corrected since the invalid data was cached.

Closes #5066

Backport of MR !10104

Merge branch 'backport-5066-fix-strip-dnssec-rrsigs-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!10105
2025-02-17 00:41:34 +00:00
Mark Andrews
89122c3fde Re-fetch pending records that failed validation
If a deferred validation on data that was originally queried with
CD=1 fails, we now repeat the query, since the zone data may have
changed in the meantime.

(cherry picked from commit 04b1484ed8)
2025-02-17 11:04:19 +11:00
Mark Andrews
de8893733f Complete the deferred validation if there are no RRSIGs
When a query is made with CD=1, we store the result in the
cache marked pending so that it can be validated later, at
which time it will either be accepted as an answer or removed
from the cache as invalid.  Deferred validation was not
attempted when there were no cached RRSIGs for DNSKEY and
DS.  We now complete the deferred validation in this scenario.

(cherry picked from commit 8b900d1808)
2025-02-17 11:04:17 +11:00
Mark Andrews
77417f8fc6 Add stripped DS RRSIG senario
(cherry picked from commit 66f293a952)
2025-02-17 11:00:40 +11:00
Mark Andrews
18c1295fdc Add stripped DNSKEY RRSIG senario
(cherry picked from commit a71b617566)
2025-02-17 11:00:39 +11:00
Mark Andrews
a68f5dd74b [9.20] fix: usr: "CNAME and other data check" not applied to all types
An incorrect optimization caused "CNAME and other data" errors not to be detected if certain types were at the same node as a CNAME.  This has been fixed.

Closes #5150

Backport of MR !10033

Merge branch 'backport-5150-cname-and-other-data-check-not-applied-to-all-types-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!10100
2025-02-14 03:14:48 +00:00
Mark Andrews
1661e7a407 Move SVCB and HTTPS to be in type code order
(cherry picked from commit 559fac329a)
2025-02-14 13:41:11 +11:00
Mark Andrews
3adf4f7d72 Test cname-and-other-data against various types
(cherry picked from commit dfc367f52c)
2025-02-14 13:41:11 +11:00
Mark Andrews
ae3e67717c Fix "CNAME and other data" detection
prio_type was being used in the wrong place to optimize cname_and_other.
We have to first exclude and accepted types and we also have to
determine that the record exists before we can check if we are at
a point where a later CNAME cannot appear.

(cherry picked from commit 5e49a9e4ae)
2025-02-14 13:41:11 +11:00
Michal Nowak
5fb68149a0 [9.20] chg: test: Rewrite nzd2nzf system test to pytest
Backport of MR !9160

Merge branch 'backport-mnowak/pytest_rewrite_nzd2nzf-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!10098
2025-02-13 19:23:04 +00:00
Michal Nowak
47d64f944f Rename assert_custom_named_is_alive to named_alive
(cherry picked from commit 38e751d9ac)
2025-02-13 18:47:42 +00:00
Michal Nowak
0d75e15d4d Rewrite nzd2nzf system test to pytest
(cherry picked from commit 7c499d1689)
2025-02-13 18:47:42 +00:00
Michal Nowak
de9e94889e [9.20] chg: test: Rewrite names system test to pytest
Backport of MR !8759

Merge branch 'backport-mnowak/pytest_rewrite_names-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!10096
2025-02-13 18:34:58 +00:00
Michal Nowak
b04d28f1ef Rewrite names system test to pytest
dnspython 2.7.0 or newer is needed because of wire().

(cherry picked from commit 5250ad8720)
2025-02-13 17:49:26 +00:00
Michal Nowak
97e7e9ff21 [9.20] chg: test: Generate TSAN unit stress tests
This is a complement to the already present system test "stress" test.

Backport of MR !9474

Merge branch 'backport-mnowak/generate-tsan-unit-stress-tests-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!10094
2025-02-13 17:42:26 +00:00
Michal Nowak
b4aab2cfa3 Generate TSAN unit stress tests
(cherry picked from commit a03c4b4cf9)
2025-02-13 16:43:31 +00:00
Andoni Duarte
881b9e2417 chg: doc: Set up version for BIND 9.20.7
Merge branch 'andoni/set-up-version-for-bind-9.20.7' into 'bind-9.20'

See merge request isc-projects/bind9!10092
2025-02-13 16:10:37 +00:00
Andoni Duarte Pintado
33988a1600 Update BIND version to 9.20.7-dev 2025-02-13 15:55:19 +01:00
Andoni Duarte Pintado
72cbad0469 Update BIND version for release 2025-02-11 18:11:22 +01:00
Andoni Duarte
af83b48a49 new: doc: Prepare documentation for BIND 9.20.6
Merge branch 'andoni/prepare-documentation-for-bind-9.20.6' into 'v9.20.6-release'

See merge request isc-private/bind9!779
2025-02-11 16:51:37 +00:00
Andoni Duarte Pintado
b1b0681189 Tweak and reword release notes 2025-02-11 15:00:39 +01:00
Andoni Duarte Pintado
40ab4800b4 Prepare release notes for BIND 9.20.6 2025-02-07 19:35:59 +01:00
Andoni Duarte Pintado
22bb228a16 Generate changelog for BIND 9.20.6 2025-02-07 19:35:23 +01:00
Michal Nowak
bc3957136d [9.20] fix: ci: Do not evaluate $CI_PROJECT_DIR in generate-stress-test-configs.py
GitLab CI Runner's $builds_dir variable is set to "/builds" by default.
For technical reasons, the FreeBSD Runners, using the "instance"
executor, sets the path differently.

The value of $CI_PROJECT_DIR is based on $builds_dir, so if the
generate-stress-test-configs.py script generates jobs with
$CI_PROJECT_DIR (or variables like $INSTALL_PATH that are based on it)
evaluated, it is calcified to whatever was the value in the particular
environment, disregarding the FreeBSD "instance" executor specifics in
the child pipeline.

Instead of evaluating $CI_PROJECT_DIR in the script, evaluate it in the
runtime environment.

Backport of MR !10075

Merge branch 'backport-mnowak/fix-CI_PROJECT_DIR-variable-evaluation-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!10077
2025-02-05 15:30:30 +00:00
Michal Nowak
aa68ffeabd Do not evaluate $CI_PROJECT_DIR in generate-stress-test-configs.py
GitLab CI Runner's $builds_dir variable is set to "/builds" by default.
For technical reasons, the FreeBSD Runners, using the "instance"
executor, sets the path differently.

The value of $CI_PROJECT_DIR is based on $builds_dir, so if the
generate-stress-test-configs.py script generates jobs with
$CI_PROJECT_DIR (or variables like $INSTALL_PATH that are based on it)
evaluated, it is calcified to whatever was the value in the particular
environment, disregarding the FreeBSD "instance" executor specifics in
the child pipeline.

Instead of evaluating $CI_PROJECT_DIR in the script, evaluate it in the
runtime environment.

(cherry picked from commit dab7d28b09)
2025-02-05 15:04:45 +00:00
Nicki Křížek
38c51c8401 [9.20] new: usr: add a rndc command to toggle jemalloc profiling
The new command is `rndc memprof`. The memory profiling status is also
reported inside `rndc status`. The status also shows whether named can
toggle memory profiling or not and if the server is built with jemalloc.

Closes #4759

Backport of MR !9370

Merge branch 'backport-4759-add-a-trigger-to-dump-jeprof-data-or-memory-statistics-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!10000
2025-02-05 10:14:25 +00:00
Aydın Mercan
dde251b773 add a rndc command to toggle jemalloc profiling
The new command is `rndc memprof`. The memory profiling status is also
reported inside `rndc status`. The status also shows whether named can
toggle memory profiling or not and if the server is built with jemalloc.

(cherry picked from commit b495e9918e)
2025-02-05 10:40:05 +01:00
Ondřej Surý
5c27e9cdda [9.20] fix: dev: Reduce the false sharing the dns_qpcache and dns_qpzone
Instead of having many node_lock_count * sizeof(<member>) arrays, pack all
the members into a qpcache_bucket_t that is cacheline aligned to prevent
false sharing between RWLocks.

Backport of MR !10072

Merge branch 'backport-ondrej/prevent-nodelock-false-sharing-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!10074
2025-02-04 23:17:37 +00:00
Ondřej Surý
db2bce1c6f
Switch the locknum generation for qpznode to random
Instead of using on hash of the name modulo number of the buckets,
assign the locknum randomly with isc_random_uniform().  This makes
the locknum assignment aligned with qpcache and allows the bucket
number to be non-prime in the future.

(cherry picked from commit 732fc338a9)
2025-02-04 23:28:53 +01:00
Ondřej Surý
d4e8a92977
Rely on call_rcu() to destroy the qpzone outside of locks
Reduce the number of qpzone_ref() and qpzone_unref() calls in
qpzone_detachnode() by relying on the call_rcu to delay
the destruction of the lock buckets.

(cherry picked from commit 1fa5219fdf)
2025-02-04 23:28:53 +01:00
Ondřej Surý
c6c03a6b11
Reduce false sharing in dns_qpzone
Instead of having many node_lock_count * sizeof(<member>) arrays, pack
all the members into a qpzone_bucket_t that is cacheline aligned and have
a single array of those.

(cherry picked from commit 6dcc398726)
2025-02-04 23:28:50 +01:00
Ondřej Surý
a9f4e3369a
Reduce false sharing in dns_qpcache
Instead of having many node_lock_count * sizeof(<member>) arrays, pack
all the members into a qpcache_bucket_t struct that is cacheline aligned
and have a single array of those.

Additionaly, make both the head and the tail of isc_queue_t padded, not
just the head, to prevent false sharing of the lock-free structure with
the lock that follows it.

(cherry picked from commit c602d76c1f)
2025-02-04 23:27:28 +01:00
Ondřej Surý
b5cce0f597 [9.20] new: usr: Print the expiration time of the stale records
Print the expiration time of the stale RRsets in the cache dump.

Backport of MR !10057

Merge branch 'backport-ondrej/print-expiration-time-of-stale-records-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!10061
2025-02-04 17:08:20 +00:00
Ondřej Surý
8229d9cdfa
Print the expiration time of the stale records (not ancient)
In #1870, the expiration time of ANCIENT records were printed, but
actually the ancient records are very short lived, and the information
carries a little value.

Instead of printing the expiration of ANCIENT records, print the
expiration time of STALE records.

(cherry picked from commit 355fc48472)
2025-02-04 18:07:59 +01:00
Michal Nowak
9fbc273417 [9.20] chg: test: Rewrite stub system test to pytest
Backport of MR !9190

Merge branch 'backport-mnowak/pytest_rewrite_stub-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!10070
2025-02-04 13:25:41 +00:00