Commit graph

387 commits

Author SHA1 Message Date
Ondřej Surý
cd348cf255
Replace the shared work pool with per-loop, per-lane worker threads
Offloaded work used two different mechanisms: a per-loop isc_helper
thread for CPU-bound crypto (DNSSEC validation, message signature
checks) and the process-global libuv thread pool for blocking I/O (zone
load and dump, inbound transfer apply). Neither could cancel a queued
task, and the two disagreed about exclusive mode — the helper paused
with its loop under isc_loopmgr_pause() but the libuv pool did not, so
blocking offloaded work kept running while a loop held the exclusive
lock.

Unify both behind isc_work: each loop gets its own worker thread per
lane — FAST for short, bounded tasks and SLOW for long, blocking ones —
fed by a private queue. Separate lanes keep a short crypto task off the
path of a multi-second zone dump once both run on per-loop workers;
every lane parks with isc_loopmgr_pause() so exclusive mode now quiesces
offloaded work too; and a still-queued task can be canceled before it
starts (isc_work_cancel). isc_helper is removed and its callers select a
lane.

(cherry picked from commit a5f13b3410)
2026-06-17 21:15:17 +02:00
Evan Hunt
849aaacaae Add "warn_unused_result" to attributes.h
A new ISC_ATTR_WARN_UNUSED_RESULT macro now defines
__attribute__((warn_unused_result)) and is used for
dns_rdata_fromstruct().

(cherry picked from commit 07c8c1d242)
2026-06-04 09:49:41 -07:00
Nicki Křížek
3d785a3fee Update BIND version to 9.20.25-dev 2026-06-03 17:09:56 +02:00
Nicki Křížek
b58c9546e3 Define DEVELOPER_MODE in developer-mode builds
So that build-time consumers (e.g. feature-test) can detect developer
mode through a single dedicated symbol rather than proxying through
implementation-detail defines like ISC_MEM_TRACKLINES.

9.20 has no meson build; add the define alongside the other developer
defines on the existing STD_CPPFLAGS line in configure.ac.  Originally
landed on main in commit d9aeee7901 ("Define DEVELOPER_MODE in
developer-mode builds").

Assisted-by: Claude:claude-opus-4-7
2026-05-28 14:54:37 +02:00
Andoni Duarte Pintado
956eefddcd Update BIND version to 9.20.24-dev 2026-05-07 10:26:19 +02:00
Michal Nowak
2e59948e25 Update BIND version to 9.20.23-dev 2026-03-31 10:16:58 +02:00
Michał Kępień
6c20cf9840 Update BIND version to 9.20.22-dev 2026-03-12 21:11:29 +01:00
Michał Kępień
0241c8883a
Update BIND version to 9.20.21-dev 2026-02-26 12:00:26 +01:00
Andoni Duarte Pintado
f4171694f5 Update BIND version to 9.20.20-dev 2026-02-04 09:37:13 +01:00
Nicki Křížek
a78d19c597 Bump the minimum required python version to 3.10
Drop support of EoL python versions for running system tests. The
maintenance cost of supporting end of life ecosystem, especially Python
3.6 on EL8 and the related outdated packages (pytest, dnspython, ...),
has become unreasonable.

(cherry picked from commit ac8e2905b8)
2026-01-21 16:28:52 +01:00
Nicki Křížek
9557b381cb Update BIND version to 9.20.19-dev 2026-01-08 10:38:59 +01:00
Andoni Duarte Pintado
ed2c623886 Update BIND version to 9.20.18-dev 2025-12-04 09:55:28 +01:00
Michal Nowak
4b2f971653
Update BIND version to 9.20.17-dev 2025-11-05 19:41:23 +01:00
Michał Kępień
f38cbbd56c
Detect xmllint at build time
Detect whether and where the xmllint utility is available at build time,
so that it can be used in system tests.  If the tool is not found,
specific checks employing it will be skipped.

(cherry picked from commit 85773d4d21)
2025-10-25 08:01:46 +02:00
Michał Kępień
0ca76b6716
Detect jq at build time
Detect whether and where the jq utility is available at build time, so
that it can be used in system tests.  If the tool is not found, specific
checks employing it will be skipped.

(cherry picked from commit 273b4bbfd7)
2025-10-25 08:01:46 +02:00
Michał Kępień
48956122d5 Update BIND version to 9.20.16-dev 2025-10-13 15:39:42 +02:00
Michał Kępień
b688d49af8 Update BIND version to 9.20.15-dev 2025-10-02 17:51:22 +02:00
Nicki Křížek
48e460e8d3 Add .sh extension to shell scripts
Use .sh(.in) file extension consistently for shell scripts
to allow more reliable detection of shell scripts based on their file
extension.

(cherry picked from commit 2d690499dd)
2025-09-18 15:40:26 +02:00
Andoni Duarte Pintado
407edb1fc8 Update BIND version to 9.20.14-dev 2025-09-08 11:40:54 +02:00
Andoni Duarte Pintado
37365f42b9 Update BIND version to 9.20.13-dev 2025-08-14 12:27:25 +02:00
Michał Kępień
51797ecf0f Update BIND version to 9.20.12-dev 2025-07-04 22:10:03 +02:00
Michal Nowak
6c06154f74 Update BIND version to 9.20.11-dev 2025-06-11 09:23:42 +02:00
Aydın Mercan
41ff6969f6 implement the systemd notification protocol manually, drop libsystemd
libsystemd, despite being useful, adds a huge surface area for just
using the sd_notify API. libsystemd's surface has been exploited in the
past [1].

Implement the systemd notification protocol by hand since it is just
sending newline-delimited datagrams to a UNIX socket. The code shouldn't
need more attention in the future since the notification protocol is
covered under systemd's stability promise [2].

We don't need to support VSOCK-backed service notifications since they
are only intended for virtual machine inits.

[1]: https://www.openwall.com/lists/oss-security/2024/03/29/4
[2]: https://systemd.io/PORTABILITY_AND_STABILITY/

(cherry picked from commit 3eb253e81f)
2025-06-03 15:04:42 +00:00
Michał Kępień
07297e0e60 Update BIND version to 9.20.10-dev 2025-05-12 20:24:39 +02:00
Nicki Křížek
03c333e523 Update BIND version to 9.20.9-dev 2025-04-10 15:26:22 +02:00
Andoni Duarte Pintado
444ea2c559 Update BIND version to 9.20.8-dev 2025-03-12 12:08:57 +01:00
Andoni Duarte Pintado
33988a1600 Update BIND version to 9.20.7-dev 2025-02-13 15:55:19 +01:00
Andoni Duarte Pintado
d343349b83 Update BIND version to 9.20.6-dev 2025-01-21 17:52:22 +01:00
Mark Andrews
d6026a7255 Move resconf_test.c to tests/dns and cleanup
(cherry picked from commit b711b5b10d)
2024-12-12 22:50:22 +00:00
Petr Špaček
cd033ac41f Fix m4 macro in configure.ac
Release automation went wrong, it seems. And I just glanced over the
line, saw 4 -> 5 change at the end and did not notice the change at the
beginning of the line...
2024-12-04 16:38:14 +01:00
Petr Špaček
0b44cfd53a Update BIND version to 9.20.5-dev 2024-12-04 16:06:17 +01:00
Michal Nowak
22f3037d06 Update BIND version to 9.20.4-dev 2024-10-08 10:34:31 +02:00
Nicki Křížek
314ba3898d Update BIND version to 9.20.3-dev 2024-09-09 19:21:41 +02:00
Ondřej Surý
5255843f9b Follow the number of CPU set by taskset/cpuset
Administrators may wish to constrain the set of cores that BIND 9 runs
on via the 'taskset', 'cpuset' or 'numactl' programs (or equivalent on
other O/S), for example to achieve higher (or more stable) performance
by more closely associating threads with individual NIC rx queues. If
the admin has used taskset, it follows that BIND ought to
automatically use the given number of CPUs rather than the system wide
count.

Co-Authored-By: Ray Bellis <ray@isc.org>
(cherry picked from commit 5a2df8caf5)
2024-09-03 13:52:10 +00:00
Ondřej Surý
619d21b57c Stop using malloc_usable_size and malloc_size
Although the nanual page of malloc_usable_size says:

    Although the excess bytes can be over‐written by the application
    without ill effects, this is not good programming practice: the
    number of excess bytes in an allocation depends on the underlying
    implementation.

it looks like the premise is broken with _FORTIFY_SOURCE=3 on newer
systems and it might return a value that causes program to stop with
"buffer overflow" detected from the _FORTIFY_SOURCE.  As we do have own
implementation that tracks the allocation size that we can use to track
the allocation size, we can stop relying on this introspection function.

Also the newer manual page for malloc_usable_size changed the NOTES to:

    The value returned by malloc_usable_size() may be greater than the
    requested size of the allocation because of various internal
    implementation details, none of which the programmer should rely on.
    This function is intended to only be used for diagnostics and
    statistics; writing to the excess memory without first calling
    realloc(3) to resize the allocation is not supported.  The returned
    value is only valid at the time of the call.

Remove usage of both malloc_usable_size() and malloc_size() to be on the
safe size and only use the internal size tracking mechanism when
jemalloc is not available.

(cherry picked from commit d61712d14e)
2024-08-26 18:27:01 +00:00
Ondřej Surý
1a657766c3 Use seteuid()/setegid() instead of setreseuid()/setresgid()
It looks like that all supported systems now have support for
_POSIX_SAVED_IDS, so it's safe to use setegid() and setegid() because
those will not change saved used/group IDs.

(cherry picked from commit ab517fc6e4)
2024-08-20 17:36:27 +00:00
Nicki Křížek
f6656c801c Update BIND version to 9.20.2-dev 2024-08-19 18:10:05 +02:00
Aram Sargsyan
62f68ff71d Add -Wno-psabi to CFLAGS for x86 (32-bit) builds
GCC 11.1+ emits a note during compilation when there are 64-bit
atomic fields in a structure, because it fixed a compiler bug
by changing the alignment of such fields, which caused ABI change.

Add -Wno-psabi to CFLAGS for such builds in order to silence the
warning. That shouldn't be a problem since we don't expose our
structures to the outside.

(cherry picked from commit 867066aa53)
2024-08-15 12:52:39 +00:00
Ondřej Surý
80738e98bd Fix PTHREAD_MUTEX_ADAPTIVE_NP and PTHREAD_MUTEX_ERRORCHECK_NP usage
The PTHREAD_MUTEX_ADAPTIVE_NP and PTHREAD_MUTEX_ERRORCHECK_NP are
usually not defines, but enum values, so simple preprocessor check
doesn't work.

Check for PTHREAD_MUTEX_ADAPTIVE_NP from the autoconf AS_COMPILE_IFELSE
block and define HAVE_PTHREAD_MUTEX_ADAPTIVE_NP.  This should enable
adaptive mutex on Linux and FreeBSD.

As PTHREAD_MUTEX_ERRORCHECK actually comes from POSIX and Linux glibc
does define it when compatibility macros are being set, we can just use
PTHREAD_MUTEX_ERRORCHECK instead of PTHREAD_MUTEX_ERRORCHECK_NP.

(cherry picked from commit cc4f99bc6d)
2024-08-05 09:13:07 +00:00
Ondřej Surý
34847e7e32 Remove defunct --with-locktype configure option
The --with-locktype configure option was no-op, so it was removed.

(cherry picked from commit c33bf0de8d)
2024-08-05 09:13:07 +00:00
Nicki Křížek
e9780d55bf
Update docs and processes to use the new changelog
(cherry picked from commit bcc99213a5)
2024-07-29 14:44:59 +02:00
Nicki Křížek
71d137939d
Update BIND version to 9.20.1-dev 2024-07-23 17:49:28 +02:00
Tom Krizek
2a09f632ab
Use a dedicated file for each autoconf variable
To avoid any escaping issues or messing with a language-specific format
when the variable has to be parsed, create a dedicated file for each
variable that is obtained from autoconf.
2024-05-09 17:08:10 +02:00
Tom Krizek
ab27f504ca
Move environment variables from conf.sh to pytest
Remove conf.sh.in and move the environment variables into isctest/vars
python package. This enabled the removal of an ugly pytest hack which
loaded and parsed these variables from the environment.
2024-05-09 17:08:08 +02:00
Michal Nowak
fd880c29f2 Update BIND version to 9.19.25-dev 2024-05-03 15:51:53 +02:00
Petr Špaček
b0b4ea3975 Update BIND version to 9.19.24-dev 2024-04-04 19:35:03 +02:00
Ondřej Surý
304b5ec1ad Deprecate fixed value for the rrset-order option
Mark the "fixed" value for the "rrset-order" option deprecated, so we
can remove it in the future.
2024-04-02 15:21:00 +00:00
Michał Kępień
df0229e7ee
Update BIND version to 9.19.23-dev 2024-03-13 09:51:24 +01:00
Evan Hunt
5709f7bad9 rename qpdb to qpcache
move qpdb.c to qpcache.c and rename the "qp" database implementation
to "qpcache", in order to make it more clearly distinguishable from
"qpzone".
2024-03-08 15:36:56 -08:00
Evan Hunt
ab084d8c4f remove qp-zonedb.c and associated code
now that "qpzone" databases are available for use in zones, we no
longer need to retain the zone semantics in the "qp" database.

all zone-specific code has been removed from QPDB, and "configure
--with-zonedb" once again takes two values, rbt and qp.

some database API methods that are never used with a cache have
been removed from qpdb.c and qp-cachedb.c; these include newversion,
closeversion, subtractrdataset, and nodefullname.
2024-03-08 15:36:56 -08:00