Miod Vallat [Wed, 19 Feb 2025 08:54:43 +0000 (09:54 +0100)]
lmdb: be sure to abort pending transactions in the correct order.
If the LMDBBackend destructor is invoked while there are still pending
transactions, these need to be aborted, but in the reverse order of
their creation (i.e. abort the innermost transaction first).
The default destructor would abort them in a class field
declaration-dependent order, which may not match the actual cinematic.
We now remember which transaction is the innermost one, so that we can
abort them in the expected order.
This gets rid of "double free or corruption (top)" aborts with glibc,
and Address Sanitizer errors.
Otto Moerbeek [Tue, 18 Feb 2025 13:20:16 +0000 (14:20 +0100)]
Fix dependencies for docs, using a Sphinx extension to generate a dep file, as suggested by @eli-schwart in https://github.com/PowerDNS/pdns/pull/15169#discussion_r1959138532
Actually, the depfile (sphinx.d) is removed by ninja after generating
it as shown by a trace. I do not know why, but touching an .rst
file has the correct behaviour. So I suspect it is an optimization.
Otto Moerbeek [Mon, 17 Feb 2025 15:28:43 +0000 (16:28 +0100)]
Add all '*.rst' files in docs as a dependency.
The Meson docs are not a fan of this method, but maintaining that
list by hand is too much work and error prone. This does mean that
adding existing .rst file to the docs will not be picked up by the
dependency checking until you re-setup your build dir.
5. missing_lock: Accessing g_lowercaseOutgoing without holding lock LockGuarded<std::shared_ptr<std::unordered_map<DNSName, SyncRes::AuthDomain, std::hash<DNSName>, std::equal_to<DNSName>, std::allocator<std::pair<DNSName const, SyncRes::AuthDomain> > > > >.d_mutex. Elsewhere, g_lowercaseOutgoing is written to with LockGuarded.d_mutex held 1 out of 1 times.
Miod Vallat [Fri, 14 Feb 2025 10:50:40 +0000 (11:50 +0100)]
If deleteZone fails due to a backend exception, show it...
...rather than any further backend exception caused by
abortTransaction(), which will be much less helpful.
Using the sqlite backend on a full filesystem, pdnsutil delete-zone now
correctly reports "database or disk is full" instead of "cannot rollback
- no transaction is active" which no human can make sense of in this
situation.
Remi Gacogne [Thu, 13 Feb 2025 16:14:08 +0000 (17:14 +0100)]
dnsdist: Handle response dnstap messages arriving before the query ones
Since we now use more than one TCP connection, it is entirely possible
for the response message to arrive before the query one, and our tests
should just deal with that.
Remi Gacogne [Thu, 13 Feb 2025 12:17:02 +0000 (13:17 +0100)]
dnsdist: Disable Lua configuration directives in YAML mode
This commit restricts the Lua directives available to a Lua script
loaded alongside with a YAML configuration, disabling all Lua
configuration directives. This prevents a mess when settings are
set to different values in YAML and Lua, and make it clear that the
when a YAML configuration is used, any Lua file should only be used
to provide functions to the YAML configuration.
This behaviour can be reverted via the `enableLuaConfiguration`
directive if really needed.
Remi Gacogne [Thu, 13 Feb 2025 10:51:49 +0000 (11:51 +0100)]
dnsdist: Bump the required version of `meson` to 1.3
Since we now use the `follow_symlinks` option of `install_data()`.
We could probably make it work with older versions but a quick look
at what distributions provide suggests that 1.2.1 or 1.3.0 is
practically the same amount of pain.
Miod Vallat [Wed, 12 Feb 2025 11:45:27 +0000 (12:45 +0100)]
Disable read ahead in LMDB.
This contributes to not degrading performance too much when the system
memory is almost completely used, by preventing page thrashing due to
the read ahead behaviour of the system.
dependabot[bot] [Wed, 12 Feb 2025 09:16:14 +0000 (09:16 +0000)]
build(deps): bump cryptography in /regression-tests.recursor-dnssec
Bumps [cryptography](https://github.com/pyca/cryptography) from 43.0.1 to 44.0.1.
- [Changelog](https://github.com/pyca/cryptography/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pyca/cryptography/compare/43.0.1...44.0.1)
Otto Moerbeek [Wed, 12 Feb 2025 07:57:10 +0000 (08:57 +0100)]
Switch to clang-format-19 by default and allow //comment with no leading space
Still some formatting differences, but they look legit. It seems
older versions of clang-format did not process preprocessor
conditionals correctly in all cases.