Commit Graph

38280 Commits

Author SHA1 Message Date
Tom Krizek
8c8ff7faea Fix pytest junitxml output processing for make check
Not every element tagged `skipped` in the JUnitXML tree has to contain
the `type` attribute. An example of that is a test that results in
xpass.

This has been verified with pytest version 7.4.2 and prior.

(cherry picked from commit ba25ecd2d2)
2023-11-02 10:02:51 +01:00
Michał Kępień
9199555db9 Merge branch 'michal/add-a-release-signing-job-to-gitlab-ci-9.18' into 'bind-9.18'
[9.18] Add a release signing job to GitLab CI

See merge request isc-projects/bind9!8457
2023-11-02 06:36:22 +00:00
Michał Kępień
dd217e1acf Add a release signing job to GitLab CI
Add a GitLab CI job that is only run for tags and makes signing BIND 9
releases more convenient by utilizing a signing VM that is registered as
a GitLab CI runner.  This pulls the signing process into the release
pipelines in GitLab CI, resulting in job artifacts containing the
signatures for BIND 9 releases, which in turns simplifies the subsequent
release publication steps.

(cherry picked from commit a3a91a1557)
2023-11-02 07:23:38 +01:00
Michał Kępień
8f1dd1751e Merge branch '4404-improve-stability-of-the-jemalloc-workaround' into 'bind-9.18'
Improve stability of the jemalloc workaround

See merge request isc-projects/bind9!8453
2023-11-01 17:04:36 +00:00
Michał Kępień
e974f98eb4 Improve stability of the jemalloc workaround
When jemalloc is linked into BIND 9 binaries (rather than preloaded or
used as the system allocator), depending on the decisions made by the
linker, the malloc() symbol may be resolved to a non-jemalloc
implementation at runtime.  Such a scenario foils the workaround added
in commit 2da371d005 as it relies on the
jemalloc implementation of malloc() to be executed.

Handle the above scenario properly by calling mallocx() explicitly
instead of relying on the runtime resolution of the malloc() symbol.
Use trivial wrapper functions to avoid the need to copy multiple #ifdef
lines from lib/isc/mem.c to lib/isc/trampoline.c.  Using a simpler
alternative, e.g. calling isc_mem_create() & isc_mem_destroy(), was
already considered before and rejected, as described in the log message
for commit 2da371d005.

ADJUST_ZERO_ALLOCATION_SIZE() is only used in isc__mem_free_noctx() to
concisely avoid compilation warnings about its 'size' parameter not
being used when building against jemalloc < 4.0.0 (as sdallocx() is then
redefined to dallocx(), which has a different signature).
2023-11-01 18:04:07 +01:00
Tom Krizek
3488ada94b Merge branch 'tkrizek/perf-tests-shotgun-9.18' into 'bind-9.18'
[9.18] Add DNS Shotgun performance tests to nightly pipelines

See merge request isc-projects/bind9!8452
2023-11-01 14:18:14 +00:00
Tom Krizek
a303fa25ac Update release checklist
Add a step to verify results of shotgun:* jobs.

(cherry picked from commit 322dfbf6a9)
2023-11-01 14:41:40 +01:00
Tom Krizek
61f1305b4b ci: trigger a DNS Shotgun performance test
Run comparative performance tests against the latest released version of
the same branch. This is done for different protocols with an
appropriate load the server is expected to be able to handle.

Currently, the results need to be inspected manually, since a success of
the job doesn't indicate there is no issue. Instead, the job provides an
URL to an overview with latency, memory and CPU charts which display the
test results with the current code against the reference version. There
should be no major unexplained and reproducible differences in the
charts.

(cherry picked from commit c7fcb1ca60)
2023-11-01 14:39:31 +01:00
Tom Krizek
1ff49ab199 util: script to get DNS Shotgun pipeline results
The shotgun performance tests are executed in a different repository, in
a couple of different pipelines. To hide away the complexity, this
script takes the pipeline ID of the triggered pipeline and then takes
care of the rest - waits for the pipeline to finish, locates the child
pipeline and the relevant results. The output from this script is a
convenient link to the charts with the results once they're available.

GitLab also has a mechanism which can wait for another pipeline.
However, it can't be utilized here, since there are variables which
need to be passed in when the pipeline is triggered (like protocol to be
tested, load, runtime etc.). This isn't currently supported by the
GitLab feature.

(cherry picked from commit ff32421a64)
2023-11-01 14:39:31 +01:00
Tom Krizek
4ad89d8e34 ci: move baseline version detection into separate job
Multiple CI jobs may utilize a baseline version, i.e. the version that
the current code should be tested against when doing comparative
testing. To avoid repeating the non-trivial detection of the baseline
version, move it into a separate job which creates an environment file
that subsequent jobs may require via `needs` option. It is then possible
to use the variable(s) defined in the script section of the new job.

(cherry picked from commit ef4e2d2964)
2023-11-01 14:39:29 +01:00
Matthijs Mekking
51f3b118dd Merge branch '4355-serve-stale-unexpected-recursion-9.18' into 'bind-9.18'
[9.18] Don't ignore authoritative local zones when in serve-stale mode

See merge request isc-projects/bind9!8446
2023-10-31 13:32:52 +00:00
Matthijs Mekking
87e21a716e Add release note and CHANGES for #4355
(cherry picked from commit ac19d43a32)
2023-10-31 14:01:21 +01:00
Matthijs Mekking
76c9019403 Don't ignore auth zones when in serve-stale mode
When serve-stale is enabled and recursive resolution fails, the fallback
to lookup stale data always happens in the cache database. Any
authoritative data is ignored, and only information learned through
recursive resolution is examined.

If there is data in the cache that could lead to an answer, and this can
be just the root delegation, the resolver will iterate further, getting
closer to the answer that can be found by recursing down the root, and
eventually puts the final response in the cache.

Change the fallback to serve-stale to use 'query_getdb()', that finds
out the best matching database for the given query.

(cherry picked from commit 2322425016)
2023-10-31 13:52:08 +01:00
Matthijs Mekking
784b096098 Test case for issue #4355
Add a test case where serve-stale is enabled on a server that also
servers a local authoritative zone.

The particular case tests a lame delegation and checks if falling
back to serving stale data does not attempt to retrieve the query
by recursing from the root down.

(cherry picked from commit e196ba6168)
2023-10-31 13:52:01 +01:00
Michal Nowak
15f664171d Merge branch 'mnowak/openbsd-7.4-9.18' into 'bind-9.18'
[9.18] Add OpenBSD 7.4

See merge request isc-projects/bind9!8434
2023-10-30 12:18:34 +00:00
Michal Nowak
0c3bd09595 Add OpenBSD 7.4
(cherry picked from commit f8733fc051)
2023-10-30 12:12:50 +01:00
Mark Andrews
3a7c7693d7 Merge branch '4393-only-declare-engine-when-used' into 'bind-9.18'
Resolve "error: variable 'engine' set but not used on OpenBSD 7.4"

See merge request isc-projects/bind9!8436
2023-10-27 05:56:25 +00:00
Mark Andrews
8b11061b91 Only declare 'engine' if it is used
Move the declaration of 'engine' within the appropriate #if/#endif
block.  Remove the UNUSED(engine) from the #else block.
2023-10-27 10:49:38 +11:00
Arаm Sаrgsyаn
9c50e0fb8d Merge branch 'aram/fix-lock-file-option-and--X-argument-issues-9.18' into 'bind-9.18'
[9.18] Fix assertion failure when using -X none and lock-file in configuration

See merge request isc-projects/bind9!8433
2023-10-26 13:49:30 +00:00
Aram Sargsyan
08de15e5f2 Do not warn about lock-file option change when -X is used
When -X is used the 'lock-file' option change detection condition
is invalid, because it compares the 'lock-file' option's value to
the '-X' argument's value instead of the older 'lock-file' option
value (which was ignored because of '-X').

Don't warn about changing 'lock-file' option if '-X' is used.

(cherry picked from commit 41945b32d7)
2023-10-26 13:12:57 +00:00
Aram Sargsyan
4ed32424c8 Fix an invalid condition check when detecting a lock-file change
It is obvious that the '!cfg_obj_asstring(obj)' check should be
'cfg_obj_asstring(obj)' instead, because it is an AND logic chain
which further uses 'obj' as a string.

Fix the error.

(cherry picked from commit bc891e749f)
2023-10-26 13:12:52 +00:00
Aram Sargsyan
1bff704681 Fix assertion failure when using -X none and lock-file in configuration
When 'lock-file <lockfile>' is used in configuration at the same time
as using '-X none' in 'named' invocation, there is an invalid
logic that would lead to a isc_mem_strdup() call on a NULL value.

Also, contradicting to ARM, 'lock-file none' is overriding the '-X'
argument.

Fix the overall logic, and make sure that the '-X' takes precedence to
'lock-file'.

(cherry picked from commit fc2dd09390)
2023-10-26 13:12:47 +00:00
Ondřej Surý
cdd68a3700 Merge branch '4386-fix-assertion-failure-when-using--X-named-option-9.18' into 'bind-9.18'
[9.18] Fix assertion failure when using -X and lock-file in configuration

See merge request isc-projects/bind9!8430
2023-10-26 12:07:54 +00:00
Ondřej Surý
cdf7c34a58 Add CHANGES and release note for [GL #4386]
(cherry picked from commit 8294a43acf)
2023-10-26 13:59:46 +02:00
Ondřej Surý
d9fc95f842 Fix assertion failure when using -X and lock-file in configuration
When 'lock-file <lockfile1>' was used in configuration at the same time
as using `-X <lockfile2>` in `named` invocation, there was an invalid
logic that would lead to a double isc_mem_strdup() call on the
<lockfile2> value.

Skip the second allocation if `lock-file` is being used in
configuration, so the <lockfile2> is used only single time.

(cherry picked from commit 4f68def5e9)
2023-10-26 13:59:46 +02:00
Tom Krizek
bf330dc3cc Merge branch 'tkrizek/shfmt-9.18' into 'bind-9.18'
[9.18] Enforce shell script codestyle with shfmt

See merge request isc-projects/bind9!8429
2023-10-26 11:59:05 +00:00
Tom Krizek
914654efeb Ignore shell script formatting in git blame
(cherry picked from commit c8fb0b48e0)
2023-10-26 13:07:44 +02:00
Tom Krizek
5bd67594b1 Add editorconfig file for shell style
(cherry picked from commit bebdfa13be)
2023-10-26 13:06:55 +02:00
Tom Krizek
a17230fefb Run shfmt in CI
Ensure our shell script format stays consistent in the future.

(cherry picked from commit b6505ff573)
2023-10-26 13:06:53 +02:00
Tom Krizek
b8b9b4ac2c Reformat shell scripts with shfmt
All changes in this commit were automated using the command:

shfmt -w -i 2 -ci -bn . $(find . -name "*.sh.in")

By default, only *.sh and files without extension are checked, so
*.sh.in files have to be added additionally. (See mvdan/sh#944)

(manually replayed commit 4cb8b13987)
2023-10-26 13:05:00 +02:00
Mark Andrews
fd2e6f90a4 Merge branch '4387-lock-file-is-deleted-on-exit-even-if-lock-acquisition-failed-bind-9.18' into 'bind-9.18'
[9.18] Resolve "lock file is deleted on exit even if lock acquisition failed"

See merge request isc-projects/bind9!8424
2023-10-26 07:47:14 +00:00
Mark Andrews
81b5a94ad8 Add release note for [GL #4387]
(cherry picked from commit c1b8279ebb)
2023-10-26 18:05:26 +11:00
Mark Andrews
46870c74e6 Add CHANGES note for [GL #4387]
(cherry picked from commit a8613372c9)
2023-10-26 18:05:25 +11:00
Mark Andrews
74ab7e4660 Check that the lock file was not removed too early
When named fails to starts due to not being able to obtain
a lock on the lock file that lock file should remain.  Check
that the lock file exists before and after the attempt to
start a second instance of named.

(cherry picked from commit 811c9ee7d1)
2023-10-26 18:05:07 +11:00
Mark Andrews
534cadba3a Only remove the lock file if we managed to lock it
The lock file was being removed when we hadn't successfully locked
it which defeated the purpose of the lockfile.  Adjust cleanup_lockfile
such that it only unlinks the lockfile if we have successfully locked
the lockfile and it is still active (lockfile != NULL).

(cherry picked from commit b9c789b8b3)
2023-10-26 18:05:07 +11:00
Arаm Sаrgsyаn
d18be57900 Merge branch '4381-assert-in-dns__catz_update_cb-on-shutdown-9.18' into 'bind-9.18'
[9.18] Resolve "Assertion failure in dns__catz_update_cb() on shutdown"

See merge request isc-projects/bind9!8413
2023-10-23 11:08:16 +00:00
Aram Sargsyan
4f29e514df Add a CHANGES note for [GL #4381]
(cherry picked from commit 598107f1c2)
2023-10-23 10:53:40 +00:00
Aram Sargsyan
2141bde46b Fix shutdown races in catzs
The dns__catz_update_cb() does not expect that 'catzs->zones'
can become NULL during shutdown.

Add similar checks in the dns__catz_update_cb() and dns_catz_zone_get()
functions to protect from such a case. Also add an INSIST in the
dns_catz_zone_add() function to explicitly state that such a case
is not expected there, because that function is called only during a
reconfiguration.

(cherry picked from commit 4eb4fa288c)
2023-10-23 10:53:40 +00:00
Michal Nowak
59294c4320 Merge branch 'mnowak/drop-ubuntu-bionic' into 'bind-9.18'
Drop Ubuntu 18.04 "bionic"

See merge request isc-projects/bind9!8365
2023-10-23 09:52:13 +00:00
Michal Nowak
6d100c4a32 Drop Ubuntu 18.04 "bionic"
Ubuntu 18.04 LTS (Bionic Beaver) is EOL.

Move gcc:bionic:amd64-specific CFLAGS and EXTRA_CONFIGURE to
gcc:jammy:amd64.
2023-10-23 11:47:01 +02:00
Michal Nowak
a9a2700672 Merge branch '4152-reproducer-stack-exhaustion-9.18' into 'bind-9.18'
[9.18] Add test for CVE-2023-3341

See merge request isc-projects/bind9!8411
2023-10-20 14:56:57 +00:00
Michal Nowak
114551659e Add test for CVE-2023-3341
(cherry picked from commit 7d1834b250)
2023-10-20 16:27:31 +02:00
Mark Andrews
d25813a08a Merge branch '4260-adjust-udp-refresh-timeouts-bind-9.18' into 'bind-9.18'
[9.18] Adjust UDP zone maintenance timeouts

See merge request isc-projects/bind9!8405
2023-10-20 00:45:26 +00:00
Mark Andrews
593647bde5 add CHANGES for [GL #4260]
(cherry picked from commit 1a9791b4d8)
2023-10-20 00:16:01 +00:00
Mark Andrews
306ee4cb28 Adjust UDP timeouts used in zone maintenance
Drop timeout before resending a UDP request from 15 seconds to 5
seconds and add 1 second to the total time to allow for the reply
to the third request to arrive.  This will speed up the time it
takes for named to recover from a lost packet when refreshing a
zone and for it to determine that a primary is down.

(cherry picked from commit 29f399797d)
2023-10-20 00:16:01 +00:00
Mark Andrews
f82844aee1 Merge branch '4378-uv_sleep-wrapper-misses-parentheses-causing-unit-test-hang-bind-9.18' into 'bind-9.18'
[9.18] Resolve "uv_sleep wrapper misses parentheses, causing unit test hang"

See merge request isc-projects/bind9!8404
2023-10-20 00:05:31 +00:00
Mark Andrews
ebfbad29c1 Add parentheses around macro arguement 'msec'
The is needed to ensure that the multiplication is correctly done.
This was reported by Jinmei Tatuya.
2023-10-20 10:30:48 +11:00
Michal Nowak
b0f3a440f1 Merge branch 'mnowak/llvm-17-9.18' into 'bind-9.18'
[9.18] Update clang to version 17

See merge request isc-projects/bind9!8398
2023-10-18 07:42:36 +00:00
Michal Nowak
7c6632e174 Update the source code formatting using clang-format-17 2023-10-18 09:02:57 +02:00
Michal Nowak
1cf082baa6 Update clang to version 17
(cherry picked from commit 625a4ffc7a)
2023-10-18 09:02:18 +02:00