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

39997 Commits

Author SHA1 Message Date
Ondřej Surý
81f48e11e4
Use read number of items instead of raw array size in load_names
The load_names benchmark expected the input CSV with domains would fill
the whole item array and it would crash when the number of lines would
be less than that.

Fix the expectations by using the real number or lines read to calculate
the array start and end position for each benchmark thread.
2023-10-09 21:04:21 +02:00
Michał Kępień
1bd979167e Merge branch 'michal/move-linux-stress-tests-to-autoscaled-instances' into 'main'
Move Linux "stress" tests to autoscaled instances

See merge request isc-projects/bind9!8359
2023-10-06 11:09:41 +00:00
Michał Kępień
12ea994680
Move Linux "stress" tests to autoscaled instances
The autoscaling GitLab CI runners currently used for most GitLab CI jobs
spin up AWS EC2 instances that are at least as powerful as the dedicated
instances used for running "stress" tests.  Move all Linux-based
"stress" tests to autoscaling GitLab CI runners to enable deprovisioning
Linux AWS instances reserved for running "stress" tests.  Leave FreeBSD
"stress" tests intact as there is currently no support for autoscaling
BSD instances.
2023-10-06 13:07:55 +02:00
Michal Nowak
7339920948 Merge branch 'mnowak/monitor-stuck-system-tests' into 'main'
Report hung system tests

See merge request isc-projects/bind9!8245
2023-10-05 16:24:37 +00:00
Michal Nowak
35792b1700
Report hung system tests
At times, a problem might occur where a test is not responding,
especially in the CI, determining the specific test responsible can be
difficult. Fortunately, when running tests with the pytest runner,
pytest sets the PYTEST_CURRENT_TEST environment variable to the current
test nodeid and stage. Afterward, the variable can be examined to
identify the test that has stopped responding.

The monitoring script needs to be started in the background. Still, the
shell executor used for BSD and FIPS testing can't handle the background
process cleanly, and the script step will wait for the background
process for the entire duration of the background process (currently
3000 seconds). Therefore, run the monitoring script only when the Docker
executor is used where this is not a problem.
2023-10-05 14:57:26 +02:00
Mark Andrews
a6b5cf4c54 Merge branch '4253-detect-duplicate-controls' into 'main'
Detect duplicate "controls" configuration

Closes #4253

See merge request isc-projects/bind9!8313
2023-10-05 01:32:40 +00:00
Mark Andrews
e8a822d0a7 Add CHANGES note for [GL #4253] 2023-10-05 11:32:36 +11:00
Mark Andrews
1bf62b1c88 Check that duplicate control sockets are caught 2023-10-05 11:32:01 +11:00
Mark Andrews
d97dc03b8e Detect duplicate use of control sockets in named.conf
Specifying duplicate control sockets can lead to hard to diagnose
rndc connection failures.
2023-10-05 11:32:01 +11:00
Petr Špaček
a2c771d994 Merge branch 'pspacek/cross-version-tests-junit' into 'main'
Generate and capture JUnit XML output from cross-version-config-tests

See merge request isc-projects/bind9!8354
2023-10-04 12:51:02 +00:00
Petr Špaček
f2a3eb00b9 Generate and capture JUnit XML output from cross-version-config-tests 2023-10-04 14:50:25 +02:00
Petr Špaček
bfc6b43319 Merge branch 'pspacek/fix-no-case-compression-docs' into 'main'
Fix no-case-compress description in the ARM

See merge request isc-projects/bind9!8312
2023-10-03 12:36:41 +00:00
Petr Špaček
6451462a93 Fix no-case-compress description in the ARM
We confused ourselves, it seems.
2023-10-03 14:35:49 +02:00
Arаm Sаrgsyаn
23b52fb6a0 Merge branch '4343-cid-465861-unnecessary-null-check-in-ns__client_setup' into 'main'
Remove unnecessary NULL-checks in ns__client_setup()

Closes #4343

See merge request isc-projects/bind9!8347
2023-09-28 14:49:28 +00:00
Aram Sargsyan
b970556f21 Remove unnecessary NULL-checks in ns__client_setup()
All these pointers are guaranteed to be non-NULL.

Additionally, update a comment to remove obviously outdated
information about the function's requirements.
2023-09-28 13:43:18 +00:00
Arаm Sаrgsyаn
5a9ca612ee Merge branch '4331-resolver.c-assert-uninitialized-link' into 'main'
Don't use an uninitialized link on an error path

Closes #4331

See merge request isc-projects/bind9!8343
2023-09-28 09:32:04 +00:00
Aram Sargsyan
9c545c3513 Add a CHANGES note for [GL #4331] 2023-09-28 08:14:31 +00:00
Aram Sargsyan
fb7bbbd1be Don't use an uninitialized link on an error path
Move the block on the error path, where the link is checked, to a place
where it makes sense, to avoid accessing an unitialized link when
jumping to the 'cleanup_query' label from 4 different places. The link
is initialized only after those jumps happen.

In addition, initilize the link when creating the object, to avoid
similar errors.
2023-09-28 08:14:05 +00:00
Evan Hunt
98cbf4ebfc Merge branch 'each-qp-extensions' into 'main'
extensions to QP trie to support DNS databases

See merge request isc-projects/bind9!8338
2023-09-28 07:41:51 +00:00
Evan Hunt
9736497d8a CHANGES for [GL !8338] 2023-09-28 00:32:47 -07:00
Evan Hunt
03016902dd rename dns_qp_findname_ancestor() to dns_qp_lookup()
I am weary of typing so long a name. (plus, the name has become slightly
misleading now that the DNS_QPFIND_NOEXACT option no longer exists.)
2023-09-28 00:32:44 -07:00
Evan Hunt
6231fd66af rename QP-related types to use standard BIND nomenclature
changed type names in QP trie code to match the usual convention:
 - qp_node_t -> dns_qpnode_t
 - qp_ref_t -> dns_qpref_t
 - qp_shift_t -> dns_qpshift_t
 - qp_weight_t -> dns_qpweight_t
 - qp_chunk_t -> dns_qpchunk_t
 - qp_cell_t -> dns_qpcell_t
2023-09-28 00:32:39 -07:00
Evan Hunt
4e3e61806c get predecessor name in dns_qp_findname_ancestor()
dns_qp_findname_ancestor() now takes an optional 'predecessor'
parameter, which if non-NULL is updated to contain the DNSSEC
predecessor of the name searched for. this is done by constructing
an iterator stack while carrying out the search, so it can be used
to step backward if needed.
2023-09-28 00:32:37 -07:00
Evan Hunt
606232b8d5 remove DNS_QPFIND_NOEXACT
since dns_qp_findname_ancestor() can now return a chain object, it is no
longer necessary to provide a _NOEXACT search option. if we want to look
up the closest ancestor of a name, we can just do a normal search, and
if successful, retrieve the second-to-last node from the QP chain.

this makes ancestor lookups slightly more complicated for the caller,
but allows us to simplify the code in dns_qp_findname_ancestor(), making
it easier to ensure correctness.  this was a fairly rare use case:
outside of unit tests, DNS_QPFIND_NOEXACT was only used in the zone
table, which has now been updated to use the QP chain.  the equivalent
RBT feature is only used by the resolver for cache lookups of 'atparent'
types (i.e, DS records).
2023-09-28 00:30:57 -07:00
Evan Hunt
3bf23fadb0 improvements to the QP iterator
- make iterators reversible: refactor dns_qpiter_next() and add a new
  dns_qpiter_prev() function to support iterating both forwards and
  backwards through a QP trie.
- added a 'name' parameter to dns_qpiter_next() (as well as _prev())
  to make it easier to retrieve the nodename while iterating, without
  having to construct it from pointer value data.
2023-09-28 00:30:51 -07:00
Evan Hunt
7f0242b8c7 tidy the helper functions for retrieving twigs
- the helper functions for accessing twigs beneath a branch
  (branch_twig_pos(), branch_twig_ptr(), etc) were somewhat confusing
  to read, since several of them were implemented by calling other
  helper functions. they now all show what they're really doing.
- branch_twigs_vector() has been renamed to simply branch_twigs().
- revised some unrelated comments in qp_p.h for clarity.
2023-09-28 00:30:47 -07:00
Evan Hunt
7f766ba7c4 add a node chain traversal mechanism
dns_qp_findname_ancestor() now takes an optional 'chain' parameter;
if set, the dns_qpchain object it points to will be updated with an
array of pointers to the populated nodes between the tree root and the
requested name. the number of nodes in the chain can then be accessed
using dns_qpchain_length() and the individual nodes using
dns_qpchain_node().
2023-09-28 00:30:43 -07:00
Evan Hunt
29cf7dceb7 modify dns_qp_findname_ancestor() to return found name
add a 'foundname' parameter to dns_qp_findname_ancestor(),
and use it to set the found name in dns_nametree.

this required adding a dns_qpkey_toname() function; that was
done by moving qp_test_keytoname() from the test library to qp.c.
added some more test cases and fixed bugs with the handling of
relative and empty names.
2023-09-28 07:01:13 +00:00
Evan Hunt
06ac957c4f Merge branch 'each-qp-benchmark' into 'main'
add a QP lookups benchmark

See merge request isc-projects/bind9!8345
2023-09-28 07:00:10 +00:00
Evan Hunt
e68a691904 add a "qplookups" benchmark test
this loads a file containing DNS names and measures the time it takes to:
1) iterate it,
2) look up each name with dns_qp_getname()
3) look up each name with dns_qp_findname_ancestor()
4) look up a modified name based on the name, to check performance
   when the name is not found.
2023-09-27 16:24:04 -07:00
Evan Hunt
d71ebd2086 minor cleanups
- removed some commented-out code
- cleaned up uses of pval and ival that were not needed
2023-09-27 13:05:05 -07:00
Evan Hunt
5259648b3f Merge branch '4338-fix-qpmulti-benchmark' into 'main'
fix the qpmulti benchmark

Closes #4338

See merge request isc-projects/bind9!8344
2023-09-27 19:35:20 +00:00
Evan Hunt
232f90f005 fixed the qpmulti benchmark
the refactoring of isc_job_run() and isc_async_run() in 9.19.12
intefered with the way the qpmulti benchmark uses uv_idle.
it has now been modified to use isc_job/isc_async instead.
2023-09-27 11:51:03 -07:00
Arаm Sаrgsyаn
f55488aa09 Merge branch '4335-xfrin_xmlrender-cleanup-path-issue' into 'main'
Resolve "CID 465814: Control flow issues (DEADCODE) in statschannel.c"

Closes #4335

See merge request isc-projects/bind9!8334
2023-09-27 11:19:51 +00:00
Aram Sargsyan
f9bcabff24 Fix return value and docs for dns_zone_getxfr()
When the given zone is not associated with a zone manager, the function
currently returns ISC_R_NOTFOUND, which is documented as the return
value for the case in which no incoming zone transfer is found.  Make
the function return ISC_R_FAILURE in such a case instead.

Also update the description of the function as the value it returns is
not meant to indicate whether an ongoing incoming transfer for the given
zone exists.  The boolean variables that the function sets via the
pointers provided as its parameters, combined with either keeping
'*xfrp' set to NULL or updating it to a valid pointer, can be used by
the caller to infer all the necessary information.
2023-09-27 10:03:40 +00:00
Aram Sargsyan
f1f863dd81 Fix error path issue in xfrin_xmlrender()
The TRY0 macro doesn't set the 'result' variable, so the error
log message is never printed. Remove the 'result' variable and
modify the function's control flow to be similar to the the
zone_xmlrender() function, with a separate error returning path.
2023-09-27 10:03:40 +00:00
Ondřej Surý
2a2eba74fc Merge branch 'ondrej/workaround-free_pools' into 'main'
Workaround compiler bug that optimizes setting .free_pools

See merge request isc-projects/bind9!8339
2023-09-26 13:11:44 +00:00
Ondřej Surý
ca912775a5
Workaround compiler bug that optimizes setting .free_pools
The .free_pools bitfield would not be set on some levels of
optimizations - workaround the compiler bug by reordering the setting
the .freepools in the initializer.
2023-09-26 14:59:39 +02:00
Arаm Sаrgsyаn
f494b21ce0 Merge branch '4332-data-race-in-dns_xfrin_getendserial' into 'main'
xfrin.c: use the statslock for more xfrin members

Closes #4332

See merge request isc-projects/bind9!8333
2023-09-26 12:57:33 +00:00
Aram Sargsyan
903a79f6ce Don't use the statslock in the destructor
Using the 'statslock' mutex in the destructor is useless, because
at this point there shouldn't be any other references to the
structure.
2023-09-26 12:23:10 +00:00
Aram Sargsyan
ed2f06ea4d Remove xfr->end
The structure member is populated only moments before its
destruction, and is not used anywhere, except for the
destructor. Use a local variable instead.
2023-09-26 12:23:10 +00:00
Aram Sargsyan
5067b83116 Use the statslock for more xfrin members
The 'end_serial' and some other members of the 'dns_xfrin_t'
structure can be accessed by the statistics channel, causing
a data race with the zone transfer process.

Use the existing 'statslock' mutex for protecting those members.
2023-09-26 12:23:10 +00:00
Mark Andrews
0d85492f6b Merge branch '4316-dynamic-update-refused-shortly-after-zone-was-thawed' into 'main'
Resolve "dynamic update refused shortly after zone was thawed"

Closes #4316

See merge request isc-projects/bind9!8310
2023-09-26 03:13:57 +00:00
Mark Andrews
e33dbd0cbd Document that reloading happens asynchronously 2023-09-26 02:43:51 +00:00
Mark Andrews
5b3238aa85 Wait for the test zone to finish re-loading
'rndc thaw' initiates asynchrous loading of all the zones
similar to 'rndc load'.  Wait for the test zone's load to
complete before testing that it is updatable again.
2023-09-26 02:43:51 +00:00
Mark Andrews
9ca06af4b9 Merge branch 'marka-placeholder' into 'main'
Add placeholder entry for [GL #4336]

See merge request isc-projects/bind9!8335
2023-09-26 00:48:33 +00:00
Mark Andrews
7084313b53 Add placeholder entry for [GL #4336] 2023-09-26 10:22:10 +10:00
Ondřej Surý
65c92d001c Merge branch '4325-reduce-isc_mempool-contention' into 'main'
Change dns_message_create() function to accept memory pools

Closes #4325

See merge request isc-projects/bind9!8330
2023-09-25 05:41:53 +00:00
Ondřej Surý
15cae8d473
Add CHANGES note for [GL #4325] 2023-09-24 18:07:40 +02:00
Ondřej Surý
f5af981831
Change dns_message_create() function to accept memory pools
Instead of creating new memory pools for each new dns_message, change
dns_message_create() method to optionally accept externally created
dns_fixedname_t and dns_rdataset_t memory pools.  This allows us to
preallocate the memory pools in ns_client and dns_resolver units for the
lifetime of dns_resolver_t and ns_clientmgr_t.
2023-09-24 18:07:40 +02:00