]> git.ipfire.org Git - thirdparty/bind9.git/log
thirdparty/bind9.git
6 years agoRevert "Make hazard pointers max_threads configurable at runtime." wpk/experiments
Witold Kręcicki [Fri, 13 Dec 2019 13:36:36 +0000 (14:36 +0100)] 
Revert "Make hazard pointers max_threads configurable at runtime."

This reverts commit e83951144b40588e46c3d9584b208d6dcb538782.

6 years agoMake hazard pointers max_threads configurable at runtime.
Witold Kręcicki [Thu, 12 Dec 2019 22:41:57 +0000 (23:41 +0100)] 
Make hazard pointers max_threads configurable at runtime.

hp implementation requires an object for each thread accessing
a hazard pointer. previous implementation had a hardcoded
HP_MAX_THREAD value of 128, which failed on machines with lots of
CPU cores (named uses 3n threads). We make isc__hp_max_threads
configurable at startup, with the value set to 4*named_g_cpus.
It's also important for this value not to be too big as we do
linear searches on a list.

6 years agonetmgr: set sock->listening in isc__nm_async_tcplisten always, even in case of errors...
Witold Kręcicki [Thu, 12 Dec 2019 21:55:57 +0000 (22:55 +0100)] 
netmgr: set sock->listening in isc__nm_async_tcplisten always, even in case of errors, to avoid a deadlock. In case of a failure it will be cleared anyway

6 years agonetmgr: issue stop_udp_child synchronously only if we're in this sockets thread
Witold Kręcicki [Thu, 12 Dec 2019 21:55:18 +0000 (22:55 +0100)] 
netmgr: issue stop_udp_child synchronously only if we're in this sockets thread

6 years agoMerge branch '1497-threadsanitizer-data-race-lib-isc-unix-socket-c-1839-2-in-destroy...
Ondřej Surý [Thu, 12 Dec 2019 14:14:45 +0000 (14:14 +0000)] 
Merge branch '1497-threadsanitizer-data-race-lib-isc-unix-socket-c-1839-2-in-destroy' into 'master'

Add missing isc_refcount_destroy and lock the socket ISC_LISTS in destroy()

Closes #1497

See merge request isc-projects/bind9!2767

6 years agoAdditionally lock accessing the ISC_LISTs in free_socket()
Ondřej Surý [Thu, 12 Dec 2019 12:08:34 +0000 (13:08 +0100)] 
Additionally lock accessing the ISC_LISTs in free_socket()

6 years agoAdd missing isc_refcount_destroy and lock the socket ISC_LISTS in destroy()
Ondřej Surý [Thu, 12 Dec 2019 11:59:39 +0000 (12:59 +0100)] 
Add missing isc_refcount_destroy and lock the socket ISC_LISTS in destroy()

6 years agoMerge branch '1486-threadsanitizer-lock-order-inversion-potential-deadlock-dns_resolv...
Mark Andrews [Thu, 12 Dec 2019 09:04:32 +0000 (09:04 +0000)] 
Merge branch '1486-threadsanitizer-lock-order-inversion-potential-deadlock-dns_resolver_createfetch-vs' into 'master'

Resolve "ThreadSanitizer: lock-order-inversion (potential deadlock) - dns_resolver_createfetch vs dns_resolver_shutdown"

Closes #1471 and #1486

See merge request isc-projects/bind9!2760

6 years agomake resolver->zspill atomic to prevent potential deadlock
Mark Andrews [Wed, 11 Dec 2019 23:33:23 +0000 (10:33 +1100)] 
make resolver->zspill atomic to prevent potential deadlock

6 years agoMerge branch '1494-lock-order-inversion-potential-deadlock-nm_thread-vs-nm_destroy...
Mark Andrews [Thu, 12 Dec 2019 08:26:24 +0000 (08:26 +0000)] 
Merge branch '1494-lock-order-inversion-potential-deadlock-nm_thread-vs-nm_destroy' into 'master'

Resolve "lock-order-inversion (potential deadlock) - nm_thread vs nm_destroy"

Closes #1494

See merge request isc-projects/bind9!2763

6 years agoaddress lock order inversion
Mark Andrews [Thu, 12 Dec 2019 06:43:03 +0000 (17:43 +1100)] 
address lock order inversion

6 years agoMerge branch '1423-threadsanitizer-data-race-time-c-170-in-isc_time_nowplusinterval...
Ondřej Surý [Thu, 12 Dec 2019 06:15:20 +0000 (06:15 +0000)] 
Merge branch '1423-threadsanitizer-data-race-time-c-170-in-isc_time_nowplusinterval' into 'master'

Ensure all zone_settimer() calls are done on locked zone

Closes #1423

See merge request isc-projects/bind9!2738

6 years agoEnsure all zone_settimer() calls are done on locked zone
Ondřej Surý [Tue, 10 Dec 2019 09:02:09 +0000 (10:02 +0100)] 
Ensure all zone_settimer() calls are done on locked zone

6 years agoMerge branch 'michal/prepare-release-notes-for-bind-9.15.7' into 'master'
Evan Hunt [Wed, 11 Dec 2019 22:15:04 +0000 (22:15 +0000)] 
Merge branch 'michal/prepare-release-notes-for-bind-9.15.7' into 'master'

Prepare release notes for BIND 9.15.7

See merge request isc-projects/bind9!2753

6 years agoPrepare release notes for BIND 9.15.7
Michał Kępień [Wed, 11 Dec 2019 12:41:14 +0000 (13:41 +0100)] 
Prepare release notes for BIND 9.15.7

  - Add a GitLab merge request number to the "trust-anchors" release
    note and slightly rephrase its second half.

  - Replace tabs with spaces in doc/arm/notes-9.15.7.xml to retain
    consistency with other XML files containing release notes.

  - Move the "Security Fixes" section for BIND 9.15.6 higher up, for
    consistency with release notes for other versions.

6 years agoMerge branch '1119-enable-thread-sanitizer-in-the-gitlab-ci' into 'master'
Ondřej Surý [Wed, 11 Dec 2019 17:03:58 +0000 (17:03 +0000)] 
Merge branch '1119-enable-thread-sanitizer-in-the-gitlab-ci' into 'master'

Enable ThreadSanitizer enabled build and unit tests

See merge request isc-projects/bind9!2367

6 years agoEnable ThreadSanitizer enabled build, system and unit tests
Ondřej Surý [Mon, 8 Jul 2019 15:25:46 +0000 (17:25 +0200)] 
Enable ThreadSanitizer enabled build, system and unit tests

6 years agoMerge branch 'mnowak/fedora31' into 'master'
Michal Nowak [Wed, 11 Dec 2019 15:25:17 +0000 (15:25 +0000)] 
Merge branch 'mnowak/fedora31' into 'master'

Update GitLab CI to Fedora 31

See merge request isc-projects/bind9!2662

6 years agoUpdate GitLab CI to Fedora 31
Michal Nowak [Wed, 11 Dec 2019 15:25:17 +0000 (15:25 +0000)] 
Update GitLab CI to Fedora 31

Since Fedora 31 is the current Fedora release, replace Fedora 30 GitLab
CI jobs with their up-to-date counterparts.

6 years agoMerge branch 'michal/update-release-checklist' into 'master'
Michał Kępień [Wed, 11 Dec 2019 14:47:55 +0000 (14:47 +0000)] 
Merge branch 'michal/update-release-checklist' into 'master'

Update release checklist

See merge request isc-projects/bind9!2751

6 years agoUpdate release checklist
Michał Kępień [Wed, 11 Dec 2019 14:45:22 +0000 (15:45 +0100)] 
Update release checklist

Apply tweaks necessary to make the release checklist consistent with the
security incident handling checklist.

6 years agoMerge branch 'michal/fix-release-notes-for-bind-9.15.6' into 'master'
Michał Kępień [Wed, 11 Dec 2019 12:12:13 +0000 (12:12 +0000)] 
Merge branch 'michal/fix-release-notes-for-bind-9.15.6' into 'master'

Fix release notes for BIND 9.15.6

See merge request isc-projects/bind9!2607

6 years agoFix release notes for BIND 9.15.6
Michał Kępień [Wed, 11 Dec 2019 12:11:22 +0000 (13:11 +0100)] 
Fix release notes for BIND 9.15.6

  - Add a missing release note for TCP high-water.  That feature was not
    yet merged when the initial version of !2524 was prepared and its
    release note was missed when that merge request was later rebased.

  - Rephrase the release note for CVE-2019-6477 so that it uses the same
    text as its corresponding notes in all other releases.

  - Unify whitespace in doc/arm/notes-9.15.6.xml.

6 years agoMerge branch 'michal/create-release-tarballs-in-gitlab-ci' into 'master'
Michał Kępień [Wed, 11 Dec 2019 11:04:45 +0000 (11:04 +0000)] 
Merge branch 'michal/create-release-tarballs-in-gitlab-ci' into 'master'

Create release tarballs in GitLab CI

See merge request isc-projects/bind9!2745

6 years agoDrop Jenkins mentions from release issue template
Michał Kępień [Wed, 11 Dec 2019 11:04:29 +0000 (12:04 +0100)] 
Drop Jenkins mentions from release issue template

Update the release issue template to account for the fact that Jenkins
is no longer needed for creating BIND release tarballs.

6 years agoAdd a job creating a release tarball to GitLab CI
Michał Kępień [Wed, 11 Dec 2019 11:04:29 +0000 (12:04 +0100)] 
Add a job creating a release tarball to GitLab CI

Add a GitLab CI job (which is run only if all other jobs in a pipeline
succeed) that builds a BIND release tarball, i.e. fetches the source
tarball from the tarball building job, creates Windows zips, puts
certain parts of BIND documentation into the appropriate places, and
packs it all up into a single tarball whose contents can be subsequently
signed and published.

6 years agoAdd a Windows debug system test job to GitLab CI
Michał Kępień [Wed, 11 Dec 2019 11:04:29 +0000 (12:04 +0100)] 
Add a Windows debug system test job to GitLab CI

Add a system test job for binaries created by Visual Studio in the
"Debug" build configuration to GitLab CI so that they can be tested
along their "Release" counterparts when necessary.

6 years agoAdd a Windows debug build job to GitLab CI
Michał Kępień [Wed, 11 Dec 2019 11:04:29 +0000 (12:04 +0100)] 
Add a Windows debug build job to GitLab CI

Add a Visual Studio build job using the "Debug" build configuration to
GitLab CI without enabling it for every pipeline as it takes about twice
as long to complete as its "Release" counterpart.

6 years agoCreate and test BIND source tarballs in GitLab CI
Michał Kępień [Wed, 11 Dec 2019 11:04:29 +0000 (12:04 +0100)] 
Create and test BIND source tarballs in GitLab CI

Add a set of jobs to GitLab CI that create a BIND source tarball and
then build and test its contents.  Run those extra jobs only when a tag
is pushed to the Git repository as they are only meant to be sanity
checks of BIND source tarball contents.

6 years agoInclude prepare-softhsm2.sh in source tarballs
Michał Kępień [Wed, 11 Dec 2019 11:04:29 +0000 (12:04 +0100)] 
Include prepare-softhsm2.sh in source tarballs

The util/prepare-softhsm2.sh script is useful for initializing a working
SoftHSM environment which can be used by unit tests and system tests.
However, since it is a test-specific script, it does not really belong
in the util/ subdirectory which is mostly pruned during the BIND source
tarball creation process.  Move the prepare-softhsm2.sh script to
bin/tests/ so that its location is more appropriate for its purpose and
also so that it does not get removed during the BIND source tarball
creation process, allowing it to be used for setting up test
environments for tarball-based builds.

6 years agoList paths which should be excluded from tarballs
Michał Kępień [Wed, 11 Dec 2019 11:04:29 +0000 (12:04 +0100)] 
List paths which should be excluded from tarballs

Convert the logic (currently present in the form of "rm -rf" calls in
util/kit.sh) for removing files and directories which are tracked by Git
but redundant in release tarballs into a set of .gitattributes rules
which allow the same effect to be achieved using "git archive".

6 years agoMerge branch 'michal/fix-the-forward-system-test-on-windows' into 'master'
Michał Kępień [Wed, 11 Dec 2019 09:37:35 +0000 (09:37 +0000)] 
Merge branch 'michal/fix-the-forward-system-test-on-windows' into 'master'

Fix the "forward" system test on Windows

See merge request isc-projects/bind9!2750

6 years agoFix the "forward" system test on Windows
Michał Kępień [Wed, 11 Dec 2019 08:42:09 +0000 (09:42 +0100)] 
Fix the "forward" system test on Windows

Make sure carriage return characters are stripped from sed input to
enable the "forward" system test to pass on Windows.

6 years agoMerge branch '1479-_wait_for_rcode-adds-extraneous-query' into 'master'
Mark Andrews [Wed, 11 Dec 2019 00:25:07 +0000 (00:25 +0000)] 
Merge branch '1479-_wait_for_rcode-adds-extraneous-query' into 'master'

Resolve "_wait_for_rcode adds extraneous query"

Closes #1479

See merge request isc-projects/bind9!2747

6 years agoconsume all arguments we have processed in shift
Mark Andrews [Tue, 10 Dec 2019 23:23:20 +0000 (10:23 +1100)] 
consume all arguments we have processed in shift

6 years agoMerge branch '1411-threadsanitizer-data-race-resolver-c-2153-in-fctx_query' into...
Mark Andrews [Tue, 10 Dec 2019 23:53:13 +0000 (23:53 +0000)] 
Merge branch '1411-threadsanitizer-data-race-resolver-c-2153-in-fctx_query' into 'master'

Resolve "ThreadSanitizer: data race resolver.c:2153 in fctx_query"

Closes #1411

See merge request isc-projects/bind9!2675

6 years agoNote bucket lock requirements and move REQUIRE inside locked section.
Mark Andrews [Thu, 5 Dec 2019 04:25:21 +0000 (15:25 +1100)] 
Note bucket lock requirements and move REQUIRE inside locked section.

6 years agolock access to fctx->nqueries
Mark Andrews [Mon, 2 Dec 2019 05:58:57 +0000 (16:58 +1100)] 
lock access to fctx->nqueries

6 years agoMerge branch '1473-threadsanitizer-data-race-home-ondrej-projects-bind9-lib-isc-netmg...
Ondřej Surý [Tue, 10 Dec 2019 13:00:17 +0000 (13:00 +0000)] 
Merge branch '1473-threadsanitizer-data-race-home-ondrej-projects-bind9-lib-isc-netmgr-netmgr-c-1027-in' into 'master'

Resolve "ThreadSanitizer: data race /home/ondrej/Projects/bind9/lib/isc/netmgr/netmgr.c:1027 in nmhandle_free"

Closes #1473

See merge request isc-projects/bind9!2739

6 years agoAdd isc_refcount_destroy() call to nm_handle_free()
Ondřej Surý [Tue, 10 Dec 2019 10:09:56 +0000 (11:09 +0100)] 
Add isc_refcount_destroy() call to nm_handle_free()

6 years agoAdd isc_refcount_destroy() call to nm_destroy()
Ondřej Surý [Tue, 10 Dec 2019 09:47:08 +0000 (10:47 +0100)] 
Add isc_refcount_destroy() call to nm_destroy()

6 years agoCorrect the DbC check order in isc__nm_async_tcpchildstop()
Ondřej Surý [Tue, 10 Dec 2019 09:46:49 +0000 (10:46 +0100)] 
Correct the DbC check order in isc__nm_async_tcpchildstop()

6 years agoMerge branch '1441-threadsanitizer-lock-order-inversion-potential-deadlock-usr-lib...
Mark Andrews [Tue, 10 Dec 2019 12:35:20 +0000 (12:35 +0000)] 
Merge branch '1441-threadsanitizer-lock-order-inversion-potential-deadlock-usr-lib-x86_64-linux-gnu-libtsan-so-0' into 'master'

Resolve "ThreadSanitizer: lock-order-inversion (potential deadlock) (/usr/lib/x86_64-linux-gnu/libtsan.so.0+0x2cf99) in pthread_rwlock_rdlock"

Closes #1441

See merge request isc-projects/bind9!2734

6 years agoaddress deadlock introduced in cd2469d3cdbc211ecf8a82c76c1a0a1c4a545fec
Mark Andrews [Tue, 10 Dec 2019 02:16:58 +0000 (13:16 +1100)] 
address deadlock introduced in cd2469d3cdbc211ecf8a82c76c1a0a1c4a545fec

6 years agoMerge branch '1465-fix-idna-system-test' into 'master'
Michał Kępień [Tue, 10 Dec 2019 10:57:02 +0000 (10:57 +0000)] 
Merge branch '1465-fix-idna-system-test' into 'master'

Fix the "idna" system test

See merge request isc-projects/bind9!2740

6 years agoOnly use LC_ALL=C where intended
Michał Kępień [Tue, 10 Dec 2019 09:31:33 +0000 (10:31 +0100)] 
Only use LC_ALL=C where intended

The LC_ALL=C assignments in the "idna" system test, which were only
meant to affect a certain subset of checks, in fact persist throughout
all the subsequent checks in that system test.  That affects the test's
behavior and is misleading.

When the "VARIABLE=value command ..." syntax is used in a shell script,
in order for the variable assignment to only apply to "command", the
latter must be an external binary; otherwise, the VARIABLE=value
assignment persists for all subsequent commands in a script:

    $ cat foo.sh
    #!/bin/sh

    foo() {
        /bin/sh bar.sh
    }

    BAR="baz0"
    BAR="baz1" /bin/sh bar.sh
    echo "foo: BAR=${BAR}"
    BAR="baz2" foo
    echo "foo: BAR=${BAR}"

    $ cat bar.sh
    #!/bin/sh

    echo "bar: BAR=${BAR}"

    $ /bin/sh foo.sh
    bar: BAR=baz1
    foo: BAR=baz0
    bar: BAR=baz2
    foo: BAR=baz2
    $

Fix by saving the value of LC_ALL before the relevant set of checks in
the "idna" system test, restoring it afterwards, and dropping the
"LC_ALL=C command ..." syntax.

6 years agoMerge branch 'ondrej/run-full-pipeline-on-schedule' into 'master'
Ondřej Surý [Tue, 10 Dec 2019 09:30:26 +0000 (09:30 +0000)] 
Merge branch 'ondrej/run-full-pipeline-on-schedule' into 'master'

Run all jobs on scheduled builds (including OpenBSD and Windows)

See merge request isc-projects/bind9!2736

6 years agoRun all jobs on scheduled builds (including OpenBSD and Windows)
Ondřej Surý [Tue, 10 Dec 2019 08:23:37 +0000 (09:23 +0100)] 
Run all jobs on scheduled builds (including OpenBSD and Windows)

6 years agoMerge branch '1469-lock-order-inversion-tcp-listening' into 'master'
Witold Krecicki [Tue, 10 Dec 2019 09:21:03 +0000 (09:21 +0000)] 
Merge branch '1469-lock-order-inversion-tcp-listening' into 'master'

Fix a potential lock-order-inversion in tcp listening code

Closes #1469

See merge request isc-projects/bind9!2737

6 years agoFix a potential lock-order-inversion in tcp listening code
Witold Kręcicki [Tue, 10 Dec 2019 09:05:15 +0000 (10:05 +0100)] 
Fix a potential lock-order-inversion in tcp listening code

6 years agoMerge branch 'wpk/tcp-multithreaded' into 'master'
Witold Krecicki [Mon, 9 Dec 2019 21:20:40 +0000 (21:20 +0000)] 
Merge branch 'wpk/tcp-multithreaded' into 'master'

netmgr: make tcp listening multithreaded.

See merge request isc-projects/bind9!2659

6 years agoCHANGES entry
Witold Kręcicki [Mon, 9 Dec 2019 12:18:05 +0000 (13:18 +0100)] 
CHANGES entry

6 years agoshorten some names
Evan Hunt [Mon, 9 Dec 2019 20:24:46 +0000 (12:24 -0800)] 
shorten some names

reduce line breaks and general unwieldiness by changing some
function, type, and parameter names.

6 years agostyle nits
Evan Hunt [Mon, 9 Dec 2019 18:49:37 +0000 (10:49 -0800)] 
style nits

6 years agounittest: Allow for 32 (not 16) mock nmhandles in ns tests
Witold Kręcicki [Mon, 9 Dec 2019 13:39:38 +0000 (14:39 +0100)] 
unittest: Allow for 32 (not 16) mock nmhandles in ns tests

6 years agoRemove read callback before detaching from inner socket in tcpdns
Witold Kręcicki [Sun, 8 Dec 2019 22:09:16 +0000 (23:09 +0100)] 
Remove read callback before detaching from inner socket in tcpdns

6 years agoFix a race in socket destruction - we need to remove handle from socket in async...
Witold Kręcicki [Sun, 8 Dec 2019 21:44:08 +0000 (22:44 +0100)] 
Fix a race in socket destruction - we need to remove handle from socket in async close callback or we might race between destruction in the callback and in the original nmhandle_unref

6 years agoalways return true in ns_interfacemgr_listeningon if interfacemgr is shutting down
Witold Kręcicki [Sat, 7 Dec 2019 22:44:16 +0000 (23:44 +0100)] 
always return true in ns_interfacemgr_listeningon if interfacemgr is shutting down
to avoid deadlocks on shutdown.

6 years agonetmgr: Add more DbC checks for asynchronous calls.
Witold Kręcicki [Sat, 7 Dec 2019 22:43:52 +0000 (23:43 +0100)] 
netmgr: Add more DbC checks for asynchronous calls.

6 years agopause and unpause netmgr in isc_nm_destroy to flush all events from worker queues
Witold Kręcicki [Sun, 8 Dec 2019 20:14:08 +0000 (21:14 +0100)] 
pause and unpause netmgr in isc_nm_destroy to flush all events from worker queues

6 years agoStyle fixes
Evan Hunt [Sat, 7 Dec 2019 00:48:11 +0000 (01:48 +0100)] 
Style fixes

6 years agoFix a race in tcpdns close with uv_close on timer
Witold Kręcicki [Fri, 6 Dec 2019 21:25:52 +0000 (22:25 +0100)] 
Fix a race in tcpdns close with uv_close on timer

stop timers before closing

netmgr: tcpdns_close needs to be asynchronous, it manipulates sock->timer

6 years agonetmgr: fix a race in socket destruction, happening if we close the socket
Witold Kręcicki [Fri, 6 Dec 2019 19:45:00 +0000 (20:45 +0100)] 
netmgr: fix a race in socket destruction, happening if we close the socket
externally and, at the same time, a timeout timer callback was called.

6 years agonetmgr:
Witold Kręcicki [Tue, 3 Dec 2019 18:48:10 +0000 (19:48 +0100)] 
netmgr:
 - make tcp listening IPC pipe name saner
 - put the pipe in /tmp on unices
 - add pid to the pipe name to avoid conflicts between processes
 - fsync directory in which the pipe resides to make sure that the
   child threads will see it and be able to open it

6 years agostyle, comments
Evan Hunt [Tue, 3 Dec 2019 08:07:59 +0000 (00:07 -0800)] 
style, comments

6 years ago- Add separate priority event queue for events that must be processed
Witold Kręcicki [Mon, 2 Dec 2019 12:54:44 +0000 (13:54 +0100)] 
- Add separate priority event queue for events that must be processed
  even when worker is paused (e.g. interface reconfiguration). This is
  needed to prevent deadlocks when reconfiguring interfaces - as network
  manager is paused then, but we still need to stop/start listening.

- Proper handling of TCP listen errors in netmgr - bind to the socket first,
  then return the error code.

6 years agoAdd uv_handle_{get,set}_data functions that's absent in pre-1.19 libuv to make code...
Witold Kręcicki [Mon, 2 Dec 2019 10:19:55 +0000 (11:19 +0100)] 
Add uv_handle_{get,set}_data functions that's absent in pre-1.19 libuv to make code clearer.
This might be removed when we stop supporting older libuv versions.

6 years agonetmgr: make tcp listening multithreaded.
Witold Kręcicki [Thu, 28 Nov 2019 09:21:34 +0000 (10:21 +0100)] 
netmgr: make tcp listening multithreaded.

When listening for TCP connections we create a socket, bind it
and then pass it over IPC to all threads - which then listen on
in and accept connections. This sounds broken, but it's the
official way of dealing with multithreaded TCP listeners in libuv,
and works on all platforms supported by libuv.

6 years agoMerge branch '1443-threadsanitizer-data-race-lib-dns-rbtdb-c-1960-in-decrement_refere...
Ondřej Surý [Mon, 9 Dec 2019 18:48:35 +0000 (18:48 +0000)] 
Merge branch '1443-threadsanitizer-data-race-lib-dns-rbtdb-c-1960-in-decrement_reference-2' into 'master'

Resolve "ThreadSanitizer: data race lib/dns/rbtdb.c:1960 in decrement_reference"

Closes #1443

See merge request isc-projects/bind9!2703

6 years agoAdd is_leaf and send_to_prune_tree.
Mark Andrews [Thu, 5 Dec 2019 23:08:52 +0000 (10:08 +1100)] 
Add is_leaf and send_to_prune_tree.

Add is_leaf and send_to_prune_tree to make the logic easier
to understand in cleanup_dead_nodes and decrement_reference.

6 years agoTesting node->down requires the tree lock to be held.
Mark Andrews [Wed, 4 Dec 2019 10:41:04 +0000 (21:41 +1100)] 
Testing node->down requires the tree lock to be held.

In decrement_reference only test node->down if the tree lock
is held.  As node->down is not always tested in
decrement_reference we need to test that it is non NULL in
cleanup_dead_nodes prior to removing the node from the rbt
tree.  Additionally it is not always possible to aquire the
node lock and reactivate a node when adding parent nodes.
Reactivate such nodes in cleanup_dead_nodes if required.

6 years agoMerge branch '1453-the-zero-system-test-timeouts-intermittently' into 'master'
Ondřej Surý [Mon, 9 Dec 2019 17:41:25 +0000 (17:41 +0000)] 
Merge branch '1453-the-zero-system-test-timeouts-intermittently' into 'master'

Bail-out early if dig fails to finish successfully or takes too long

Closes #1453

See merge request isc-projects/bind9!2712

6 years agoMerge branch '1458-intermittent-failure-in-the-forward-system-test' into 'master'
Ondřej Surý [Mon, 9 Dec 2019 17:15:53 +0000 (17:15 +0000)] 
Merge branch '1458-intermittent-failure-in-the-forward-system-test' into 'master'

Resolve "Intermittent failure in the forward system test"

Closes #1458

See merge request isc-projects/bind9!2716

6 years agoBail-out early if dig fails to finish successfully or takes too long
Ondřej Surý [Thu, 5 Dec 2019 17:09:21 +0000 (18:09 +0100)] 
Bail-out early if dig fails to finish successfully or takes too long

Before, the zero system test could get stuck almost infinitely, because
the first test sends > 300 queries with 5 seconds timeout on each in
each pass.  If named crashed early, it would took the test more than 4
hours to properly timeout.

This commit introduces a "watchdog" on the dig commands running in the
background and failing the test on timeout, failing any test if any dig
command fails to return successfully, and making the tests.sh script
shellcheck clean.

6 years agoWait for named to forward the question before testing the validity
Ondřej Surý [Fri, 6 Dec 2019 10:54:54 +0000 (11:54 +0100)] 
Wait for named to forward the question before testing the validity

6 years agoMake forward system test shellcheck clean
Ondřej Surý [Fri, 6 Dec 2019 10:17:33 +0000 (11:17 +0100)] 
Make forward system test shellcheck clean

6 years agoUse $n to keep diagnostic output of every individual test separate
Ondřej Surý [Fri, 6 Dec 2019 10:07:28 +0000 (11:07 +0100)] 
Use $n to keep diagnostic output of every individual test separate

6 years agoAdd the standard $n to each test
Ondřej Surý [Fri, 6 Dec 2019 10:03:54 +0000 (11:03 +0100)] 
Add the standard $n to each test

6 years agoMerge branch '1425-intermittent-failure-in-the-addzone-system-test' into 'master'
Ondřej Surý [Mon, 9 Dec 2019 16:27:31 +0000 (16:27 +0000)] 
Merge branch '1425-intermittent-failure-in-the-addzone-system-test' into 'master'

Resolve "Intermittent failure in the addzone system test"

Closes #1425

See merge request isc-projects/bind9!2714

6 years agotests: addzone: retry when checking for things, to allow for timing problems
Witold Kręcicki [Mon, 9 Dec 2019 08:25:40 +0000 (09:25 +0100)] 
tests: addzone: retry when checking for things, to allow for timing problems

6 years agoloop waiting for the redirect zone to load
Mark Andrews [Fri, 6 Dec 2019 02:30:14 +0000 (13:30 +1100)] 
loop waiting for the redirect zone to load

6 years agoMerge branch '1466-kasp-test-keyid-0' into 'master'
Matthijs Mekking [Mon, 9 Dec 2019 14:42:08 +0000 (14:42 +0000)] 
Merge branch '1466-kasp-test-keyid-0' into 'master'

Fix get key id from key_idpad

Closes #1466

See merge request isc-projects/bind9!2731

6 years agoFix get key id from key_idpad
Matthijs Mekking [Mon, 9 Dec 2019 13:54:04 +0000 (14:54 +0100)] 
Fix get key id from key_idpad

The kasp system test has a call to sed to retrieve the key identifier
without leading zeros.  The sed call could not handle key id 0.
Update the kasp test to also correctly deal with this case.

6 years agoMerge branch '1457-intermittent-failure-autosign' into 'master'
Matthijs Mekking [Mon, 9 Dec 2019 13:29:36 +0000 (13:29 +0000)] 
Merge branch '1457-intermittent-failure-autosign' into 'master'

Resolve "Intermittent failure in the autosign system test"

Closes #1457

See merge request isc-projects/bind9!2729

6 years agoBetter error handling in autosign system test
Matthijs Mekking [Mon, 9 Dec 2019 10:22:57 +0000 (11:22 +0100)] 
Better error handling in autosign system test

6 years agoFix race in autosign test
Matthijs Mekking [Mon, 9 Dec 2019 07:26:46 +0000 (08:26 +0100)] 
Fix race in autosign test

The autosign test has a test case where a DNSSEC maintaiend zone
has a set of DNSSEC keys without any timing metadata set.  It
tests if named picks up the key for publication and signing if a
delayed dnssec-settime/loadkeys event has occured.

The test failed intermittently despite the fact it sleeps for 5
seconds but the triggered key reconfigure action should happen after
3 seconds.

However, the test output showed that the test query came in before
the key reconfigure action was complete (see excerpts below).

The loadkeys command is received:

15:38:36 received control channel command 'loadkeys delay.example.'

The reconfiguring zone keys action is triggered after 3 seconds:

15:38:39 zone delay.example/IN: reconfiguring zone keys
15:38:39 DNSKEY delay.example/NSEC3RSASHA1/7484 (ZSK) is now published
15:38:39 DNSKEY delay.example/NSEC3RSASHA1/7455 (KSK) is now published
15:38:39 writing to journal

Two seconds later the test query comes in:

15:38:41 client @0x7f1b8c0562b0 10.53.0.1#44177: query
15:38:41 client @0x7f1b8c0562b0 10.53.0.1#44177: endrequest

And 6 more seconds later the reconfigure keys action is complete:

15:38:47 zone delay.example/IN: next key event: 05-Dec-2019 15:48:39

This commit fixes the test by checking the "next key event" log has
been seen before executing the test query, making sure that the
reconfigure keys action has been complete.

This commit however does not fix, nor explain why it took such a long
time (8 seconds) to reconfigure the keys.

6 years agoMove wait_for_log to conf.sh.common
Matthijs Mekking [Fri, 6 Dec 2019 16:16:45 +0000 (17:16 +0100)] 
Move wait_for_log to conf.sh.common

6 years agoSave settime output
Matthijs Mekking [Fri, 6 Dec 2019 15:48:49 +0000 (16:48 +0100)] 
Save settime output

6 years agoMerge branch 'misc-fixes-kasp' into 'master'
Matthijs Mekking [Mon, 9 Dec 2019 08:22:56 +0000 (08:22 +0000)] 
Merge branch 'misc-fixes-kasp' into 'master'

Miscellaneous fixes kasp

See merge request isc-projects/bind9!2711

6 years agoChange some dnssec-policy defaults
Matthijs Mekking [Thu, 5 Dec 2019 11:17:19 +0000 (12:17 +0100)] 
Change some dnssec-policy defaults

Suggested by Tony Finch, these seem to be more reasonable defaults.

6 years agoDefault key size 2048
Matthijs Mekking [Thu, 5 Dec 2019 10:16:53 +0000 (11:16 +0100)] 
Default key size 2048

The default size for RSA keys is 2048 bits, for both ZSKs and KSKs.

6 years agoUpdate docs with durations, built-in dnssec-policy
Matthijs Mekking [Thu, 5 Dec 2019 09:47:20 +0000 (10:47 +0100)] 
Update docs with durations, built-in dnssec-policy

Clarify in the ARM that TTL-style options can also now take ISO
8601 durations.

Mention the built-in dnssec policies "default" and "none".  Mention
that "none" is the default.

Add a file documenting the default dnssec-policy configuration options.

Fix dnssec-policy syntax in ARM (dnssec-policy.grammar.xml).

6 years agoMerge branch 'ondrej/remove-too-generic-node_count-macro-from-dns_acl' into 'master'
Ondřej Surý [Mon, 9 Dec 2019 06:49:00 +0000 (06:49 +0000)] 
Merge branch 'ondrej/remove-too-generic-node_count-macro-from-dns_acl' into 'master'

Change the (acl)->node_count macro to dns_acl_node_count(acl) macro to clean the global namespace

See merge request isc-projects/bind9!2725

6 years agoChange the (acl)->node_count macro to dns_acl_node_count(acl) macro to clean the...
Ondřej Surý [Fri, 6 Dec 2019 14:47:39 +0000 (15:47 +0100)] 
Change the (acl)->node_count macro to dns_acl_node_count(acl) macro to clean the global namespace

6 years agoMerge branch '1401-intermittent-failures-in-the-catz-system-test' into 'master'
Mark Andrews [Fri, 6 Dec 2019 14:16:03 +0000 (14:16 +0000)] 
Merge branch '1401-intermittent-failures-in-the-catz-system-test' into 'master'

Debug "Intermittent failures in the catz system test"

See merge request isc-projects/bind9!2715

6 years agoIncrease wait_for_message attempts to 20.
Mark Andrews [Fri, 6 Dec 2019 05:44:27 +0000 (16:44 +1100)] 
Increase wait_for_message attempts to 20.

6 years agosave wait_for_message contents
Mark Andrews [Fri, 6 Dec 2019 03:52:06 +0000 (14:52 +1100)] 
save wait_for_message contents

6 years agoMerge branch '1452-system-test-framework-cleanup-tweaks' into 'master'
Michał Kępień [Fri, 6 Dec 2019 13:32:07 +0000 (13:32 +0000)] 
Merge branch '1452-system-test-framework-cleanup-tweaks' into 'master'

System test framework: cleanup tweaks

Closes #1452

See merge request isc-projects/bind9!2717

6 years agoMerge branch '1452-detect-missing-system-test-results' into 'master'
Michał Kępień [Fri, 6 Dec 2019 13:24:26 +0000 (13:24 +0000)] 
Merge branch '1452-detect-missing-system-test-results' into 'master'

Detect missing system test results

See merge request isc-projects/bind9!2708

6 years agoAutomatically run clean.sh from run.sh
Michał Kępień [Fri, 6 Dec 2019 13:11:01 +0000 (14:11 +0100)] 
Automatically run clean.sh from run.sh

The first step in all existing setup.sh scripts is to call clean.sh.  To
reduce code duplication and ensure all system tests added in the future
behave consistently with existing ones, invoke clean.sh from run.sh
before calling setup.sh.