Commit graph

37491 commits

Author SHA1 Message Date
Mark Andrews
92cab3fb5e Add ISC_FORMAT_PRINTF to report's declaration
dns_dnssec_updatekeys's 'report' could be called with invalid arguments
which the compiler should be be able to detect.

(cherry picked from commit 7a0a2fc3e4)
2023-03-14 16:26:56 +11:00
Arаm Sаrgsyаn
4a41a1af40 Merge branch '3924-dnstap-test-timing-issue-v9_18' into 'v9_18'
[9.18] Resolve "missing messages in `dnstap` system test after query failure"

See merge request isc-projects/bind9!7677
2023-03-13 13:23:37 +00:00
Aram Sargsyan
f86495f1ad Improve dnstap system test reliability
The dnstap system test fails intermittently, and it appears to be
a timing issue - adding a short delay after running 'fstrm_capture',
and before running 'dnstap -reopen' improves the situation from
50% failures (5 out of 10 times) to 0% failures (0 out of 20 times),
tested locally.

The reason is that 'fstrm_capture' is executed in the background,
and due to OS scheduling and other factors, the listener socket
may not be ready when the following command runs and tells 'named'
to (re)open it.

(cherry picked from commit fa686fcea5)
2023-03-13 11:57:00 +00:00
Michal Nowak
bdc14c4e3b Merge branch 'mnowak/stress-test-drop-parallel-build-v9_18' into 'v9_18'
[9.18] Drop parallel build from stress tests

See merge request isc-projects/bind9!7671
2023-03-09 17:36:26 +00:00
Michal Nowak
780f28ce58
Drop parallel build from stress tests
BUILD_PARALLEL_JOBS environmental variable is set to 6, which does not
align well with 4 and 8 CPU core systems dedicated to CI "stress" tests.
When multiple parallel jobs run on the host, they compete for resources
with an undesirable result: 6 compiler processes of one job may starve
named, resulting in lower-than-expected throughput and minutes-long
query response latency spikes.

Better drop the build parallelism of BIND-under-test. About 1-2 minutes
are added to the 60-65 minutes long job duration.

(cherry picked from commit 3fd7e7c81f)
2023-03-09 18:32:17 +01:00
Arаm Sаrgsyаn
cf03a997e4 Merge branch '3923-doth-system-test-timing-issue-v9_18' into 'v9_18'
[9.18] Resolve "timing issue with incoming XoT check in `doth` system test"

See merge request isc-projects/bind9!7667
2023-03-09 11:30:00 +00:00
Aram Sargsyan
0b80d442ac Retry multiple times in doth test when checking if the zone file exists
Dumping of the freshly transferred zone file can take some time.

Retry 5 times before failing.

The log excerpt below shows such a case, when dumping lasted more than
two seconds.

    06-Mar-2023 09:32:09.973 zone example6/IN: Transfer started.
    06-Mar-2023 09:32:10.301 zone example6/IN: zone transfer finished: success
    06-Mar-2023 09:32:10.301 zone_dump: zone example6/IN: enter
    06-Mar-2023 09:32:11.789 client @0x7fe9ab435d68 10.53.0.10#44113 (example6): AXFR request
    06-Mar-2023 09:32:11.801 client @0x7fe9ab435d68 10.53.0.10#44113 (example6): transfer of 'example6/IN': AXFR ended: 5 messages, 2676 records, 55815 bytes, 0.011 secs (5074090 bytes/sec) (serial 1397051952)
    06-Mar-2023 09:32:12.409 zone_gotwritehandle: zone example6/IN: enter
    06-Mar-2023 09:32:12.421 dump_done: zone example6/IN: enter
    06-Mar-2023 09:32:12.421 zone_journal_compact: zone example6/IN: target journal size 53044

(cherry picked from commit 5d5d4b523b)
2023-03-09 10:40:43 +00:00
Aram Sargsyan
5ed65ce81f Fix the placement of printing dig output comments in doth system test
There can be comments in dig output for a zone transfer only in case
of an error, so we should print those errors not when wait_for_tls_xfer
succeeds, but when it fails.

Also, there is no point in printing those comments when a failure was
indeed expected.

(cherry picked from commit 9672b6be57)
2023-03-09 10:40:37 +00:00
Aram Sargsyan
d2d55acf6e Fail early in doth system test when the expected failure doesn't happen
If wait_for_tls_xfer succeeds, while a failure was being expected,
set ret=1 to fail without further checking if the zone file exists.

(cherry picked from commit 2fdf01573c)
2023-03-09 10:40:31 +00:00
Michal Nowak
1668d92e63 Merge branch 'mnowak/stress-test-build-with-default-CFLAGS-v9_18' into 'v9_18'
[9.18] Build BIND in stress test jobs with common CFLAGS

See merge request isc-projects/bind9!7665
2023-03-09 10:03:22 +00:00
Michal Nowak
d04776aae5
Build BIND in stress test jobs with common CFLAGS
By omission, BIND was not built with common CFLAGS in the stress test
jobs. Building with common CFLAGS and -Og should help GDB produce a
backtrace with more information.

(cherry picked from commit d33bdd36b4)
2023-03-09 10:58:39 +01:00
Matthijs Mekking
ab79a09d73 Merge branch '3925-serve-stale-system-test-failure-vv9_18' into 'v9_18'
[9.18] Lower chance of intermittent serve-stale system test failure

See merge request isc-projects/bind9!7664
2023-03-09 08:56:03 +00:00
Matthijs Mekking
4ce9114b34 Update serve-stale system test
The serve-stale system test was intermittently failing due to a timing
issue:

    I:serve-stale:check stale data.example TXT was refreshed...
    I:serve-stale:failed

The RRset is refreshed, however, it first checks for an expected log
line, prior checking that the stale data.example TXT was refreshed
(using dig). This log line is there to ensure the record is actually
refreshed before we start querying again. Alternatively we could just
retry_quiet 10 <wait for dig output matches expectations>. It would
lower the chances for intermittent test failures, since there is no
longer a "check for log line, sleep one second if check fails, check
for log line, ...", prior to the check.

(cherry picked from commit 0bf36da305)
2023-03-09 08:14:17 +01:00
Tom Krizek
ac9a4a73be Merge branch 'tkrizek/set-up-version-and-release-notes-for-bind-9.18.14' into 'v9_18'
Set up version and release notes for BIND 9.18.14

See merge request isc-projects/bind9!7651
2023-03-07 16:36:28 +00:00
Tom Krizek
316c6929a4
Set up release notes for BIND 9.18.14 2023-03-07 14:52:01 +01:00
Tom Krizek
8016e471d8
Update BIND version to 9.18.14-dev 2023-03-07 14:49:39 +01:00
Tom Krizek
3e46baa6ff Merge branch '3917-named-should-log-uv-version-when-starting-up-v9_18' into 'v9_18'
[9.18] Resolve "Named should log UV version when starting up"

See merge request isc-projects/bind9!7644
2023-03-03 09:07:46 +00:00
Mark Andrews
cdbebb0a69
Now logs UV versions when starting up
Named now logs both compile time and run time UV versions when
starting up.  This is useful information to have when debugging
network issues involving named.

(cherry picked from commit 5fd2cd8018)
2023-03-03 09:31:54 +01:00
Arаm Sаrgsyаn
c70914d788 Merge branch '3907-data-race-in-rbtdb-v9_18' into 'v9_18'
[9.18] Resolve "ThreadSanitizer: data race lib/dns/rbtdb.c:1365 in newversion"

See merge request isc-projects/bind9!7640
2023-03-02 20:22:15 +00:00
Aram Sargsyan
9c48b6619a Check if catz is active in dns__catz_update_cb()
A reconfiguration can deactivate the catalog zone, while the
offloaded update process was preparing to run.

(cherry picked from commit 6980e3b354)
2023-03-02 18:57:16 +00:00
Aram Sargsyan
2e348627a1 Check if catz is active in dns__catz_timer_cb()
A reconfiguration can deactivate the catalog zone, while the
update process was deferred using a timer.

(cherry picked from commit 67c77aba38)
2023-03-02 18:57:16 +00:00
Aram Sargsyan
fb15a6d6f6 Use catzs->lock in dns_catz_prereconfig()
There can be an update running in another thread, so use a lock,
like it's done in dns_catz_postreconfig().

(cherry picked from commit 3973724d67)
2023-03-02 18:57:16 +00:00
Aram Sargsyan
b230fbb591 Add a CHANGES note for [GL #3907]
(cherry picked from commit cb0d6393a7)
2023-03-02 18:57:16 +00:00
Aram Sargsyan
d6001423af catz: protect db_registered and db callback (un)registration with a lock
Doing this to avoid a race between the 'dns__catz_update_cb()' and
'dns_catz_dbupdate_callback()' functions.

(cherry picked from commit a87859f1fa)
2023-03-02 18:57:16 +00:00
Aram Sargsyan
574682b8c7 catz: use two pairs of dns_db_t and dns_dbversion_t in a catalog zone
As it is done in the RPZ module, use 'db' and 'dbversion' for the
database we are going to update to, and 'updb' and 'updbversion' for
the database we are working on.

Doing this should avoid a race between the 'dns__catz_update_cb()' and
'dns_catz_dbupdate_callback()' functions.

(cherry picked from commit d2ecff3c4a)
2023-03-02 18:57:16 +00:00
Aram Sargsyan
363061a1fc Update the CHANGES note for [GL #3777]
Remove the part which is no longer true after reverting the commit
in question.

The CHANGES entry was never part of a released BIND 9 version.

(cherry picked from commit e1627e1289)
2023-03-02 18:57:16 +00:00
Aram Sargsyan
6834ea968e Revert "Process db callbacks in zone_loaddone() after zone_postload()"
This reverts commit a719647023.

The commit introduced a data race, because dns_db_endload() is called
after unfreezing the zone.

(not cherry picked from commit 593dea871a)
2023-03-02 18:55:06 +00:00
Arаm Sаrgsyаn
8ccdf53fa9 Merge branch 'aram/catz-add-lock-for-dns_catz_zone_t-v9_18' into 'v9_18'
[9.18] Add a lock for dns_catz_zone_t

See merge request isc-projects/bind9!7636
2023-03-01 17:56:33 +00:00
Aram Sargsyan
9fdce9948e Add a lock for dns_catz_zone_t
Use a lock for the catalog zones during dns__catz_zones_merge() to
avoid races between 'catz' and 'parentcatz'.

(cherry picked from commit 2ae3bc6e1d)
2023-03-01 17:05:15 +00:00
Arаm Sаrgsyаn
48981ccc84 Merge branch '3911-reconfig-zone-view-revert-bugfix-v9_18' into 'v9_18'
[9.18] Fix view's zones reverting bug during reconfiguration

See merge request isc-projects/bind9!7634
2023-03-01 16:45:43 +00:00
Aram Sargsyan
4a5156f132 Add CHANGES and release notes for [GL #3911]
(cherry picked from commit e1036253db)
2023-03-01 15:41:10 +00:00
Aram Sargsyan
78f1d256a3 Fix view's zones reverting bug during reconfiguration
During reconfiguration, the configure_view() function reverts the
configured zones to the previous view in case if there is an error.

It uses the 'zones_configured' boolean variable to decide whether
it is required to revert the zones, i.e. the error happened after
all the zones were successfully configured.

The problem is that it does not account for the case when an error
happens during the configuration of one of the zones (not the first),
in which case there are zones that are already configured for the
new view (and they need to be reverted), and there are zones that
are not (starting from the failed one).

Since 'zones_configured' remains 'false', the configured zones are
not reverted.

Replace the 'zones_configured' variable with a pointer to the latest
successfully configured zone configuration element, and when reverting,
revert up to and including that zone.

(cherry picked from commit 84c235a4b0)
2023-03-01 15:40:33 +00:00
Aram Sargsyan
789ce76dd1 Add a catz system test check for [GL #3911]
The trick is to configure a duplicate zone, which comes after the
catalog zone, where the duplicate zone is an existing member zone.

In that scenario, all the zones which come before the "faulty" zone
in the configuration file will fail to be reverted to the previous
version of the view after a reconfiguration error, and in this
particular case that will result in an assertion failure when the
catalog zone update is initiated, because it will be still tied to
the new version of the view, which was dismissed.

(cherry picked from commit 93c4f382f4)
2023-03-01 15:39:39 +00:00
Mark Andrews
2f808b76e5 Merge branch '3894-emit-coverage-summary-for-the-coverage-badge-v9_18' into 'v9_18'
[9.18] Resolve "Emit coverage summary for the coverage badge"

See merge request isc-projects/bind9!7628
2023-03-01 00:57:07 +00:00
Mark Andrews
51f25b52e4 Extract test coverage statistics from the gcov job
In older GitLab versions, the regular expression used for extracting
test coverage statistics from the output of GitLab CI jobs was
configured in the project's settings, using GitLab's web interface.
That changed in recent GitLab versions [1]; the previous configuration
method was removed from the web interface altogether as of GitLab 15.0.
The relevant regular expression is now supposed to be set in the
relevant job's definition in .gitlab-ci.yml.

Set the regular expression used for extracting test coverage
statistics in the definition of the "gcov" GitLab CI job.  Use the
regular expression suggested in GitLab's documentation [2].

[1] https://docs.gitlab.com/ee/update/deprecations.html#test-coverage-project-cicd-setting
[2] https://docs.gitlab.com/ee/ci/pipelines/settings.html#test-coverage-examples

(cherry picked from commit db7af9fcc1)
2023-03-01 10:50:02 +11:00
Arаm Sаrgsyаn
6060c33161 Merge branch 'aram/catz-refactor-renaming-leftovers-finish-v9_18' into 'v9_18'
[9.18] Finish catalog zone 'zone' and 'zones' to 'catz' and 'catzs' renaming

See merge request isc-projects/bind9!7625
2023-02-28 16:21:12 +00:00
Aram Sargsyan
6b7d2df6b8 Finish catalog zone 'zone' and 'zones' to 'catz' and 'catzs' renaming
There are leftovers from the previous refactoring effort, which left
some function declarations and comments in the header file unchanged.

Finish the renaming.

(cherry picked from commit 580ef2e18f)
2023-02-28 14:52:35 +00:00
Arаm Sаrgsyаn
1b8cd6a59d Merge branch '3777-fix-crash-after-failed-ixfr-from-differences-v9_18' into 'v9_18'
[9.18] Resolve "crash after failed ixfr-from-differences on a catalog zone"

See merge request isc-projects/bind9!7620
2023-02-28 14:29:55 +00:00
Aram Sargsyan
09667330d4 Add a CHANGES note for [GL #3777]
(cherry picked from commit 46b1c558ce)
2023-02-28 13:47:18 +00:00
Aram Sargsyan
e9acfbd43a catz: unregister the db update-notify callback before detaching from db
When detaching from the previous version of the database, make sure
that the update-notify callback is unregistered, otherwise there is
an INSIST check which can generate an assertion failure in free_rbtdb(),
which checks that there are no outstanding update listeners in the list.

There is a similar code already in place for RPZ.

(cherry picked from commit cf79692a66)
2023-02-28 13:47:18 +00:00
Aram Sargsyan
00569f62b3 Searching catzs->zones requires a read lock
Lock the catzs->lock mutex before searching in the catzs->zones
hash table.

(cherry picked from commit 0ef0c86632)
2023-02-28 13:47:18 +00:00
Aram Sargsyan
a719647023 Process db callbacks in zone_loaddone() after zone_postload()
The zone_postload() function can fail and unregister the callbacks.

Call dns_db_endload() only after calling zone_postload() to make
sure that the registered update-notify callbacks are not called
when the zone loading has failed during zone_postload().

Also, don't ignore the return value of zone_postload().

(cherry picked from commit ed268b46f1)
2023-02-28 13:47:18 +00:00
Aram Sargsyan
7e4d450c1e Add a system test for [GL #3777]
Add the 'ixfr-from-differences yes;' option to trigger a failed
zone postload operation when a zone is updated but the serial
number is not updated, then issue two successive 'rndc reload'
commands to trigger the bug, which causes an assertion failure.

(cherry picked from commit a73b67456e)
2023-02-28 13:47:18 +00:00
Michal Nowak
ed598a8c7a Merge branch '3269-increase-server-start-timeout-v9_18' into 'v9_18'
[9.18] Increase server start timeout for system tests

See merge request isc-projects/bind9!7619
2023-02-28 13:31:24 +00:00
Artem Boldariev
c392b57e50
Increase server start timeout for system tests
This commit increases server start timeout from 60 to 90 seconds in
order to avoid system test failures on some platforms due to inability
to initialise TLS contexts in time.

(cherry picked from commit 705f0d1ed1)
2023-02-28 14:26:13 +01:00
Mark Andrews
5b1fbe0c1f Merge branch '3902-fetchlimit-system-test-failed-v9_18' into 'v9_18'
[9.18] Resolve "'fetchlimit' system test failed"

See merge request isc-projects/bind9!7616
2023-02-28 12:49:38 +00:00
Mark Andrews
aa8bcc0a5a Fix 'checking drop statistics' test
Wait for the desired log message to appear in ns3/named.stats rather
than the creation of the file.

(cherry picked from commit c7ae975ecf)
2023-02-28 12:26:45 +00:00
Mark Andrews
1c0ef5fabe Fix 'lame server clients are dropped below the hard limit' test
The test was setting a minimum count for recursive clients which
was not always being met (e.g. 91 instead of 100) producing a false
positive.  Lower the lower bound on recursive clients for this
test to 1.

(cherry picked from commit af47090d99)
2023-02-28 12:26:45 +00:00
Michał Kępień
902cd753c1 Merge branch 'michal/add-a-dnsrps-enabled-build-to-regular-ci-pipelines-v9_18' into 'v9_18'
[9.18] Add a DNSRPS-enabled build to regular CI pipelines

See merge request isc-projects/bind9!7621
2023-02-28 12:12:16 +00:00
Michał Kępień
7dfd4ec61b Add a DNSRPS-enabled build to regular CI pipelines
DNSRPS-enabled builds have recently been silently broken a few times due
to that feature not being tested in regular CI pipelines.  Add the
--enable-dnsrps --enable-dnsrps-dl switches to the ./configure
invocation in one of the CI jobs run for all merge requests so that
DNSRPS-related build issues can be detected in advance.

It is important to note that this change by itself does NOT enable
actual testing of the DNSRPS feature as doing that requires a DNSRPS
provider library to be present on the test host.

(cherry picked from commit a4d6f5f6fd)
2023-02-28 12:57:41 +01:00