2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-29 05:28:00 +00:00

43778 Commits

Author SHA1 Message Date
Nicki Křížek
02d9fbfe26 chg: test: Improve system test stability
Tweak various system test which have been unstable in the past weeks.

Closes #5406

Merge branch 'nicki/improve-system-test-stability' into 'main'

See merge request isc-projects/bind9!10690
2025-07-07 14:04:10 +02:00
Nicki Křížek
b98660e93e Remove unstable check from digdelv test
The code which checks for both IPv4 and IPv6 mixed usage is inherently
unstable, since the address family is chosen randomly for each
connection.

Closes #5406
2025-07-07 13:29:15 +02:00
Nicki Křížek
4c487c811d Use pytest.mark.flaky as the flaky marker
It's possible to use pytest.mark.flaky, which achieves the exact same
thing as our custom-defined isctest.mark.flaky -- attempts to rerun the
test on failure, but only is flaky package is available.
2025-07-07 13:29:15 +02:00
Nicki Křížek
126a59cef2 Mark secondary.kasp test case as flaky on freebsd13
The test_kasp_case[secondary.kasp] can sometimes fail on freebsd13. It
appears the test gets stuck on some operation which should be very
quick, but for some reason takes at least a few seconds, causing the
cb_ixfr_is_signed() function to time out.

In one of the cases I investigated, it wasn't a query/response that
caused a timeout, but rather some operation in between. The test
attempts to read from a keyfile/statefile, but I see no reason why that
should block.

In any case, try to increase the timeout for the verification, as that
shouldn't hurt. Also allow the test to be re-run on freebsd13, as it's
likely to be caused by some odd behaviour on that platform -- the issue
doesn't appear anywhere else.
2025-07-07 13:29:15 +02:00
Nicki Křížek
34867e1693 Allow dnstap system test rerun on freebsd13
The check "unix socket message counts" sometimes fails with "dnstap
output file smaller than expected". This only happens on freebsd13 and
can't be reproduced easily. There was an attempt to decrease the
required file size in the past, but apparently, the issue can still
occur.
2025-07-07 13:29:15 +02:00
Nicki Křížek
1e0df480c7 Mark the serve_stale system test as flaky
The serve_stale test has some inherent instabilities affecting many
different checks. While the failure rate isn't too high (about four
failures in past three weeks of nightlies), it gets ignored, because the
test has been unstable for a very long time.
2025-07-07 13:29:15 +02:00
Nicki Křížek
6755d741e4 Remove token deletion check in keyfromlabel test
This removes a leftover check which should've been removed in a prior
change (see #5244). The softhsm2 failures when attempting to delete the
token should be ignored.
2025-07-07 13:29:15 +02:00
Nicki Křížek
87ab198b73 Use proper wait in rndc test
Previously, the one-second sleep was unreliable, as it didn't properly
indicate that the rndc reconfig has been processed. The "test 'rndc
reconfig' with a broken config" check would sometimes fail under TSAN
in CI, because the previous rndc reconfig was still ongoing, and the
subsequent rndc reconfig was ignored.
2025-07-07 13:29:15 +02:00
Nicki Křížek
66f6f4bba9 Allow reruns for test_json and test_xml tests
These tests have been unstable under TSAN in the past, but it appears
that the same failure mode can happen outside of TSAN tests as well.
These tests have produced 12 failures combined in the past three weeks
in nightlies.
2025-07-07 13:29:02 +02:00
Nicki Křížek
ae932eefc5 Increase test reruns for fetchlimit
The fetchlimit test has failed 8 times in the nightly CI over the past
three weeks. That makes the overall failure rate somewhere around 1 %,
which isn't a lot, but is still annoying when lots of testing is going
on.
2025-07-07 13:29:02 +02:00
Mark Andrews
a9575a4154 fix: test: rndc test: second 'rndc reconfig' happens too soon
Rndc test "test 'rndc reconfig' with a broken config" was failing
intermittently.

Wait for 'running' to be logged rather than just using 'sleep 1' before
calling 'rndc reconfig' a second time to get the expected error message
rather than 'reconfig request ignored: already running'.

Closes #5408

Merge branch '5408-rndc-test-second-rndc-reconfig-happens-too-soon' into 'main'

See merge request isc-projects/bind9!10687
2025-07-07 12:21:58 +10:00
Mark Andrews
8b7bbda2f1 rndc test: second 'rndc reconfig' happens too soon
Rndc test "test 'rndc reconfig' with a broken config" was failing
intermittently.

Wait for 'running' to be logged rather than just using 'sleep 1' before
calling 'rndc reconfig' a second time to get the expected error message
rather than 'reconfig request ignored: already running'.
2025-07-07 11:42:10 +10:00
Štěpán Balážik
7dcc654f2c chg: test: Disable DNSSEC validation instead of enabling it with empty TAs in system tests
There are many system tests where we set `dnssec-validation yes;` only
to also set `trust-anchors { };` which effectively disables the
validation.

This MR replaces this convoluted setup with just `dnssec-validation no;`.

Merge branch 'stepan/empty-trust-anchors-in-system-tests' into 'main'

See merge request isc-projects/bind9!10684
2025-07-06 16:54:41 +00:00
Štěpán Balážik
01d1ad7988 Disable DNSSEC validation instead of enabling it with empty TAs in tests
There are many system tests where we set `dnssec-validation yes;` only
to also set `trust-anchors { };` which effectively disables the
validation.

This commit replaces this convoluted setup with just
`dnssec-validation no;`.
2025-07-06 14:18:10 +00:00
Štěpán Balážik
67916aafad new: ci: Run an additional respdiff job for merge requests and schedules
On MRs it uses the merge target as the reference.
In schedules it uses the latest released version for this branch as the reference.

This MR lays the ground work for using respdiff on non-standard configurations (like ECS) in the public repo, see https://gitlab.isc.org/isc-private/bind9/-/merge_requests/807#note_573140.

To reduce the future hassle when maintaining the -S version, most of the work (including an added job, so we know that it actually works) is done here.

Merge branch 'stepan/respdiff-against-merge-target-or-last-release' into 'main'

See merge request isc-projects/bind9!10664
2025-07-06 13:18:53 +00:00
Štěpán Balážik
9a6e8b9190 Run an additional respdiff job for merge requests and schedules
On MRs it uses the merge target as the reference.
In schedules it uses the latest released version for this branch as the
reference.
2025-07-06 13:18:42 +00:00
Mark Andrews
571d318466 fix: dev: Separate out adbname type flags
There are three adbname flags that are used to identify different
types of adbname lookups when hashing rather than using multiple
hash tables.  Separate these to their own structure element as these
need to be able to be read without locking the adbname structure.

Closes #5404

Merge branch '5404-seperate-out-adbname-type-flags' into 'main'

See merge request isc-projects/bind9!10677
2025-07-06 23:09:13 +10:00
Mark Andrews
9158e63218 Separate out adbname flags that are hashed
There are three adbname flags that are used to identify different
types of adbname lookups when hashing rather than using multiple
hash tables.  Separate these to their own structure element as these
need to be able to be read without locking the adbname structure.
2025-07-06 22:33:27 +10:00
Michał Kępień
e5bcbaee99 chg: doc: Set up version for BIND 9.21.11
Merge branch 'michal/set-up-version-for-bind-9.21.11' into 'main'

See merge request isc-projects/bind9!10692
2025-07-04 22:16:23 +02:00
Michał Kępień
90c5583cf4 Update BIND version to 9.21.11-dev 2025-07-04 22:08:41 +02:00
Michał Kępień
205da98524
Update BIND version for release v9.21.10 2025-07-04 11:34:56 +02:00
Michał Kępień
aba823170b new: doc: Prepare documentation for BIND 9.21.10
Merge branch 'michal/prepare-documentation-for-bind-9.21.10' into 'v9.21.10-release'

See merge request isc-private/bind9!816
2025-07-04 11:33:25 +02:00
Michał Kępień
405938597f
Add release note for GL !8989 2025-07-03 22:54:36 +02:00
Michał Kępień
9cdaaa6511
Tweak and reword release notes 2025-07-03 22:54:36 +02:00
Michał Kępień
beb5214586
Prepare release notes for BIND 9.21.10 2025-07-03 22:54:36 +02:00
Michał Kępień
94a463138e
Generate changelog for BIND 9.21.10 2025-07-03 22:54:36 +02:00
Andoni Duarte
7fafa0e48f [CVE-2025-40777] sec: usr: Fix a possible assertion failure when using the 'stale-answer-client-timeout 0' option
In specific circumstances the :iscman:`named` resolver process could
terminate unexpectedly when stale answers were enabled and the
``stale-answer-client-timeout 0`` configuration option was used.
This has been fixed.

See isc-projects/bind9#5372

Merge branch '5372-security-serve-stale-crash-on-insist-unreachable' into 'v9.21.10-release'

See merge request isc-private/bind9!808
2025-07-03 10:52:28 +00:00
Aram Sargsyan
3d8bd8bbf1 Reset DNS_DBFIND_STALETIMEOUT in query_lookup()
If ns__query_start() is called because of a chained query (e.g.
after encountering a CNAME), a previously set DNS_DBFIND_STALETIMEOUT
flag on the query's 'dboptions' field can cause an assertion
failure if the new query's 'stalefirst' value is not true (e.g. if the
target qname is an authoritative zone for the server). Reset the
DNS_DBFIND_STALETIMEOUT flag in the query_lookup() function before
evaluating the 'stalefirst' value, and make sure to assign a fresh
value to the `stalefirst' flag instead of conditionally assigning it
only if the value is 'true'.
2025-07-03 11:03:34 +02:00
Nicki Křížek
3719cf53c0 chg: ci: Allow flaky unit tests to be re-run in CI
Mark unstable unit tests with `flaky` test suite. Execute the stable
separately in CI. Allow the flaky ones to be re-executed once in case
they fail.

Closes #5385

Merge branch '5385-rerun-flaky-unit-tests' into 'main'

See merge request isc-projects/bind9!10665
2025-07-02 13:49:00 +02:00
Nicki Křížek
50a1d49e7d Allow flaky unit tests to be re-run in CI
Mark instable unit tests with `flaky` test suite. Execute the stable
separately in CI. Allow the flaky ones to be re-executed once in case
they fail.
2025-07-02 13:14:28 +02:00
Andoni Duarte
3c84cf04b7 chg: nil: Remove references to configure.ac
The Meson build system does not use `configure.ac`.  Remove all mentions
of this file from documentation and scripts.

See #5379

Merge branch 'andoni/remove-references-to-configureac' into 'main'

See merge request isc-projects/bind9!10672
2025-07-02 08:51:10 +00:00
Michał Kępień
fb38223c27 Update documented build commands for fuzzers
Due to the changing the build system to Meson, replace ./configure
invocations with their Meson counterparts in fuzz/FUZZING.md.
2025-07-02 08:50:34 +00:00
Andoni Duarte Pintado
c4c14f0f23 Check meson pairwise testing switches
dangerfile.py checked for new configure switches in `configure.ac`,
these were annotated with "# [pairwise:..." in a leading line. Meson
reads those from `meson_options.txt` instead.
2025-07-02 08:50:34 +00:00
Andoni Duarte Pintado
367889e080 Remove reference to configure in CONTRIBUTING.md
The Meson build system does not use `configure`, so the comment no
longer applies when submitting patches.
2025-07-02 08:50:34 +00:00
Andoni Duarte Pintado
8538c645ca Remove unused reference to SYSTEMTESTTOP
The SYSTEMTESTTOP variable is no longer used in the tests.
2025-07-02 08:50:34 +00:00
Aydın Mercan
e5a4b46fa3 fix: nil: ignore hardening flags on plain builds
The 'plain' optimization level doesn't add any flags and gives the
control to the packager. Similarly, avoid any hardening flags in this
level.

Necessary flags such as `-fno-delete-null-pointer-checks` and
`-fno-strict-aliasing` are still included.

Merge branch 'aydin/plain-build' into 'main'

See merge request isc-projects/bind9!10673
2025-07-01 23:49:47 +03:00
Aydın Mercan
350e81fde8
fix x86 specific flags
There was a mistake in the host machine check in meson
2025-07-01 22:35:20 +03:00
Aydın Mercan
8814c66855
ignore hardening flags on plain builds
The 'plain' optimization level doesn't add any flags and gives the
control to the packager. Similarly, avoid any hardening flags in this
level.

Necessary flags such as `-fno-delete-null-pointer-checks` and
`-fno-strict-aliasing` are still included.
2025-07-01 22:35:20 +03:00
Ondřej Surý
d45109732b fix: usr: Fix the default interface-interval from 60s to 60m
When the interface-interval parser was changed from uint32 parser to
duration parser, the default value stayed at plain number `60` which
now means 60 seconds instead of 60 minutes.  The documentation also
incorrectly states that the value is in minutes.  That has been fixed.

Closes #5246

Merge branch '5246-fix-default-interface-interval' into 'main'

See merge request isc-projects/bind9!10281
2025-07-01 11:58:54 +02:00
Ondřej Surý
de08c0088d
Fix the default interface-interval docs and default value
When the interface-interval parser was changed from uint32 parser to
duration parser, the default value stayed at plain 60 which now means 60
seconds instead of 60 minutes.  Fix the default value and the
documentation to match the reality.
2025-07-01 11:19:57 +02:00
Colin Vidal
8d4748121f new: test: add startup root DNSKEY refresh system test
Root trust anchors are automatically updated as described in RFC5011.
Add a system test which ensures the root DNSKEYs are always queried by
named during startup.

Because this test uses real internet DNS root servers, it is enabled
only when `CI_ENABLE_LIVE_INTERNET_TESTS` is set.

Merge branch 'colin/updaterootdnskey' into 'main'

See merge request isc-projects/bind9!10615
2025-06-30 14:51:20 +02:00
Colin Vidal
b0a33f77dc add startup root DNSKEY refresh system test
Root trust anchors are automatically updated as described in RFC5011.
Add a system test which ensures the root DNSKEYs are always queried by
named during startup.

Because this test uses real internet DNS root servers, it is enabled
only when `CI_ENABLE_LIVE_INTERNET_TESTS` is set.
2025-06-30 13:56:24 +02:00
Ondřej Surý
38cc19d756 fix: dev: Prevent false sharing for the .inuse member of isc_mem_t
Change the .inuse member of memory context to have a loop-local
variable, so there's no contention even when the same memory
context is shared among multiple threads.

Closes #5354

Merge branch '5354-prevent-false-sharing-in-isc_mem' into 'main'

See merge request isc-projects/bind9!10555
2025-06-30 13:23:38 +02:00
Ondřej Surý
5eec9a2ebb
Change the .inuse member of isc_mem to be per-thread/per-loop
The .inuse member was causing a lot of contention between threads using
the same memory context.  Scather the .inuse and .overmem members of
isc_mem_t structure to be an per-tid array of variables to reduce the
contention as the writes are now independent of each other.

The array uses one tad bit nasty trick, as ISC_TID_UNKNOWN is now -1,
the array has been sized to fit the unknown tid with [-1] index into the
array accomplished with `ctx->stat = &ctx->stat_s[1];`.  It will not win
a beauty contest, but it works seamlessly by just passing `isc_tid()` as
an index into the array.

The caveat here is that gathering the real inuse value requires walking
the whole array for all registered tid values (isc_tid_count()).  The
gather part happens only when statistics are being gathered or when
isc_mem_isovermem() is called.  As the isc_mem_isovermem() call happens
only when new data is being added to cache or ADB, it doesn't happen on
the hottest (read-only) path and according to the measurements, it
doesn't slow down neither the cold cache nor the hot cache latency.
2025-06-30 13:23:17 +02:00
Ondřej Surý
f9528b88ae fix: dev: Various cleanups related to the isc_mem unit
Merge branch 'ondrej/tidy-up-isc-mem-unit' into 'main'

See merge request isc-projects/bind9!10671
2025-06-30 13:22:53 +02:00
Ondřej Surý
f689dc2297
Don't use ssize_t for storing difference between sizes
As POSIX guarantees only that the type ssize_t shall be capable of
storing values at least in the range [-1, {SSIZE_MAX}], it can't be used
to calculate the difference between two memory sizes.  Change the logic
for junk filling to test whether the new size is larger than old size
and then use size_t as the result will be always positive.
2025-06-30 13:22:39 +02:00
Ondřej Surý
560047307d
Remove .hi_called member of isc_mem_t structure
The .hi_called member was dead structure member and it hasn't been used
since the overmem callback has been removed in commit
14bdd21e0a7ad5f115bb2427d4f88fe7a84e9324.
2025-06-30 13:22:39 +02:00
Ondřej Surý
d1427e9fa8
Add and use MALLOCX_ZERO_GET() macro to jemalloc_shim.h
Pull MALLOCX_ZERO_GET() macro to align the usage with the jemalloc
jemalloc/internal/jemalloc_internal_types.h header.
2025-06-30 13:22:39 +02:00
Ondřej Surý
c6828bcf8f
Delete jemalloc arena support from isc_mem
The jemalloc arena in isc_mem was added to solve runaway memory problem
for outgoing TCP connections.  In the end, this was a red herring and
the jemalloc arena code is now unused (via e28266bf).  Remove the
support for jemalloc memory arenas as we can restore this at any time if
we need it ever again, but right now it's just a dead code.
2025-06-30 13:22:39 +02:00
Ondřej Surý
74e5f5c6cf
Fix implicit headers when using isc/overflow.h header
In jemalloc_shim.h, we relied on including <isc/overflow.h> implicitly
instead of explicitly and same was happening inside isc/overflow.h - the
stdbool.h (for bool type) was being included implicitly instead of
explicitly.
2025-06-30 13:22:38 +02:00