]> git.ipfire.org Git - thirdparty/bind9.git/log
thirdparty/bind9.git
6 years agoRemove bin/tests/system/clean.sh
Michał Kępień [Fri, 6 Dec 2019 13:11:01 +0000 (14:11 +0100)] 
Remove bin/tests/system/clean.sh

Since the role of the bin/tests/system/clean.sh script has now been
reduced to calling a given system test's clean.sh script, remove the
former altogether and replace its only use with a direct invocation of
the latter.

6 years agoRemove the -r switch from system test scripts
Michał Kępień [Fri, 6 Dec 2019 13:11:01 +0000 (14:11 +0100)] 
Remove the -r switch from system test scripts

Since files containing system test output are no longer stored in test
subdirectories, bin/tests/system/clean.sh no longer needs to take care
of removing the test.output file for a given test as testsummary.sh
already takes care of that and even if a test suite terminates
abnormally and another one is started, tee invoked without the -a
command line switch overwrites the destination file if it exists, so
leftover test.output.* files from previous test suite runs are not a
concern.  Remove the -r command line switch and the code associated with
it from the relevant scripts.

6 years agoStore system test output in bin/tests/system/
Michał Kępień [Fri, 6 Dec 2019 13:11:01 +0000 (14:11 +0100)] 
Store system test output in bin/tests/system/

Some clean.sh scripts contain overly broad file deletion wildcards which
cause the test.output file (used by the system test framework for
collecting output) in a given system test's directory to be erroneously
removed immediately after the test is started (due to setup.sh scripts
calling clean.sh at the beginning).  This prevents the test's output
from being placed in bin/tests/system/systests.output at the end of a
test suite run and thus can lead to test failures being ignored.  Fix by
storing each test's output in a test.output.<test-name> file in
bin/tests/system/, which prevents clean.sh scripts from removing it (as
they should only ever affect files contained in a given system test's
directory).

6 years agoMerge branch '1460-duration-ttlval-print-bug' into 'master'
Matthijs Mekking [Fri, 6 Dec 2019 13:03:14 +0000 (13:03 +0000)] 
Merge branch '1460-duration-ttlval-print-bug' into 'master'

Resolve "checkconf test failure on Solaris"

Closes #1460

See merge request isc-projects/bind9!2718

6 years agoAdd semantic patch to find void f() { ... return ((void)g())); ... }
Ondřej Surý [Fri, 6 Dec 2019 12:29:04 +0000 (13:29 +0100)] 
Add semantic patch to find void f() { ... return ((void)g())); ... }

When a function returns void, it can be used as an argument to return in
function returning also void, e.g.:

void in(void) {
  return;
}

void out(void) {
  return (in());
}

while this is legal, it should be rewritten as:

void out(void) {
  in();
  return;
}

The semantic patch just find the occurrences, and they need to be fixed
by hand.

6 years agoFix duration printing on Solaris
Matthijs Mekking [Fri, 6 Dec 2019 12:12:06 +0000 (13:12 +0100)] 
Fix duration printing on Solaris

6 years agoReplace two leftover ttlval with duration
Matthijs Mekking [Fri, 6 Dec 2019 11:28:40 +0000 (12:28 +0100)] 
Replace two leftover ttlval with duration

Since the introduction of durations, all ttlval configuration types
are replaced with durations.  Duration is an ISO 8601 duration, a
TTL-style value, or a number.  These two references were missed and
are now also replaced.

6 years agoMerge branch 'trust-anchors-minor-fixes' into 'master'
Matthijs Mekking [Fri, 6 Dec 2019 08:12:55 +0000 (08:12 +0000)] 
Merge branch 'trust-anchors-minor-fixes' into 'master'

Minor fixes in trust anchor code

See merge request isc-projects/bind9!2676

6 years agoMinor fixes in trust anchor code
Matthijs Mekking [Mon, 2 Dec 2019 08:29:02 +0000 (09:29 +0100)] 
Minor fixes in trust anchor code

This commit makes some minor changes to the trust anchor code:

1. Replace the undescriptive n1, n2 and n3 identifiers with slightly
   better rdata1, rdata2, and rdata3.
2. Fix an occurrence where in the error log message a static number
   32 was printed, rather than the rdata3 length.
3. Add a default case to the switch statement checking DS digest
   algorithms to catch unknown algorithms.

6 years agoMerge branch '1455-job-failed-453300' into 'master'
Mark Andrews [Thu, 5 Dec 2019 22:05:24 +0000 (22:05 +0000)] 
Merge branch '1455-job-failed-453300' into 'master'

Resolve "Job Failed #453300"

Closes #1455

See merge request isc-projects/bind9!2706

6 years agoloop waiting for the redirect zone to load
Mark Andrews [Wed, 4 Dec 2019 23:42:33 +0000 (10:42 +1100)] 
loop waiting for the redirect zone to load

6 years agoMerge branch '1427-intermittent-failure-in-fetchlimit-system-test' into 'master'
Ondřej Surý [Thu, 5 Dec 2019 15:55:24 +0000 (15:55 +0000)] 
Merge branch '1427-intermittent-failure-in-fetchlimit-system-test' into 'master'

Test for the hard fetchlimit instead of soft fetchlimit

Closes #1427

See merge request isc-projects/bind9!2705

6 years agoTest for the hard fetchlimit instead of soft fetchlimit
Ondřej Surý [Wed, 4 Dec 2019 23:02:43 +0000 (00:02 +0100)] 
Test for the hard fetchlimit instead of soft fetchlimit

Previously, the fetchlimit tested the recursive-clients soft limit
that's defined as 90% of the hard limit (the actual configured value).
This worked previously because the reaping of the oldest recursive
client was put on the same event queue as the current TCP client, thus
the cleaning has happened before the new TCP client established a new
connection.

With the change in BIND 9.14 that added a multiple event queues the
cleaning of the oldests clients is no longer synchronous and could
happen stochastically making the soft limit testing fail often.  The
situation became even worse with the new networking manager, thus we
change the system test to fail only if the hard limit bound is not
honored.

Changing the accounting of the already reaped TCP clients so the soft
limit testing is possible again is out of the scope for this change.

6 years agoMerge branch '1407-intermittent-failure-in-the-mkeys-system-test' into 'master'
Ondřej Surý [Thu, 5 Dec 2019 14:24:29 +0000 (14:24 +0000)] 
Merge branch '1407-intermittent-failure-in-the-mkeys-system-test' into 'master'

Improve the error handling in mkeys test and use retry_quiet()

Closes #1407

See merge request isc-projects/bind9!2704

6 years agoWait for 'all zones loaded' message instead of zoneless 'loaded serial' message
Ondřej Surý [Thu, 5 Dec 2019 13:11:21 +0000 (14:11 +0100)] 
Wait for 'all zones loaded' message instead of zoneless 'loaded serial' message

6 years agoSave all rndc diagnostic output
Ondřej Surý [Wed, 4 Dec 2019 14:56:30 +0000 (15:56 +0100)] 
Save all rndc diagnostic output

6 years agoMake mkeys system test shellcheck clean and run under set -e
Ondřej Surý [Wed, 4 Dec 2019 14:27:13 +0000 (15:27 +0100)] 
Make mkeys system test shellcheck clean and run under set -e

6 years agoImprove the error handling in mkeys test and use retry_quiet()
Ondřej Surý [Wed, 4 Dec 2019 14:06:24 +0000 (15:06 +0100)] 
Improve the error handling in mkeys test and use retry_quiet()

6 years agoMerge branch 'dnssec-keys-rename-to-trust-anchors' into 'master'
Matthijs Mekking [Thu, 5 Dec 2019 13:57:11 +0000 (13:57 +0000)] 
Merge branch 'dnssec-keys-rename-to-trust-anchors' into 'master'

Rename 'dnssec-keys' to 'trust-anchors'

See merge request isc-projects/bind9!2702

6 years agoRename 'dnssec-keys' to 'trust-anchors'
Matthijs Mekking [Wed, 4 Dec 2019 10:06:40 +0000 (11:06 +0100)] 
Rename 'dnssec-keys' to 'trust-anchors'

6 years agoMerge branch '1410-intermittent-failure-in-the-resolver-test' into 'master'
Diego dos Santos Fronza [Wed, 4 Dec 2019 22:58:21 +0000 (22:58 +0000)] 
Merge branch '1410-intermittent-failure-in-the-resolver-test' into 'master'

Resolve "Intermittent failure in the resolver test"

Closes #1410

See merge request isc-projects/bind9!2671

6 years agoImproved prefetch disabled test code
Diego Fronza [Tue, 3 Dec 2019 13:45:39 +0000 (10:45 -0300)] 
Improved prefetch disabled test code

Using retry_quiet to test that prefetch is disabled instead of a
standard loop with sleep 1 between each iteration.

6 years agoFix resolver tests: prefetch 40/41
Diego Fronza [Mon, 2 Dec 2019 22:19:56 +0000 (19:19 -0300)] 
Fix resolver tests: prefetch 40/41

These two tests were failing basically because in order for prefetching to
happen, the TTL for a given DNS record must be greater than or equal to
the prefetch config value + 9.

The previous TTL for both records was 10, while prefetch value in
configuration was 3, thus making only records with TTL >= 12 elligible
for prefetching.

TTL value for both records was adjusted to the value 13, and prefetch
value was set to 4 (inc by 1), so records with TTL (4 + 9) >= 13 are
elligible for prefetching.

Adjusting prefetch value to 4 gives the test 1 second more to avoid time
problems when sharing resources on a heavy loaded PC.

Also prefetch value in settings is now read by the script and used
by it to corrrectly calculate the amount of time needed to delay before
sending a request to trigger prefetch, adding a bit of flexibility to
fine tune the test in the future.

6 years agoFix resolver test: prefetch disabled
Diego Fronza [Fri, 29 Nov 2019 14:53:09 +0000 (11:53 -0300)] 
Fix resolver test: prefetch disabled

The previous test had two problems:
1. It wasn't written specifically for testing what it was supposed to:
prefetch disabled.
2. It could fail in some circunstances if the computer's load is too
high, due to sleeps not taking parallel tests and cpu load into account.

The new test is testing prefetch disabled as follows:
1. It asks for a txt record for a given domain and takes note of the
record's TTL (which is 10).
2. It sleeps for (TTL - 5) = 5 seconds, having a window of 5 seconds to
issue new queries before the record expires from cache.
3. Three(3) queries are executed in a row, with a interval of 1 second
between them, and for each query we verify that the TTL in response is
less than the previous one, thus ensuring that prefetch is disabled (if
it were enabled this record would have been refreshed already and TTL
would be >= the first TTL).

Having a window of 5 seconds to perform 3 queries with a interval of 1
second between them gives the test a reasonable amount of time
to not suffer from a machine with heavy load.

6 years agoMerge branch '1444-deprecate-isc_thread_key-API' into 'master'
Ondřej Surý [Wed, 4 Dec 2019 22:07:54 +0000 (22:07 +0000)] 
Merge branch '1444-deprecate-isc_thread_key-API' into 'master'

Use native compiler Thread Local Storage instead of isc_thread_key API

Closes #1444

See merge request isc-projects/bind9!2680

6 years agoAdd CHANGES
Ondřej Surý [Wed, 4 Dec 2019 21:10:22 +0000 (22:10 +0100)] 
Add CHANGES

6 years agoUpdate PLATFORMS.md to explicitly list Thread Local Storage as requirement for BIND 9
Ondřej Surý [Wed, 4 Dec 2019 05:30:16 +0000 (06:30 +0100)] 
Update PLATFORMS.md to explicitly list Thread Local Storage as requirement for BIND 9

6 years agoRemove isc_thread_key API in favor of ISC_THREAD_LOCAL variables
Ondřej Surý [Mon, 2 Dec 2019 10:42:50 +0000 (11:42 +0100)] 
Remove isc_thread_key API in favor of ISC_THREAD_LOCAL variables

For BIND 9.16+, TLS aware compiler is required, and using
ISC_THREAD_LOCAL is preferred way of using Thread Local Storage.  The
isc_thread_key API is no longer used anywhere and hence was removed from
BIND 9.

6 years agoRefactor the irs_context API to use ISC_THREAD_LOCAL
Ondřej Surý [Mon, 2 Dec 2019 10:42:50 +0000 (11:42 +0100)] 
Refactor the irs_context API to use ISC_THREAD_LOCAL

Previously, the irs_context API used isc_thread_key API for TLS, which is
fairly complicated and requires initialization of memory contexts, etc.
This part of code was refactored to use a ISC_THREAD_LOCAL pointer which
greatly simplifies the whole code related to storing TLS variables.

6 years agoRefactor the dns_geoip API to use ISC_THREAD_LOCAL
Ondřej Surý [Mon, 2 Dec 2019 10:42:50 +0000 (11:42 +0100)] 
Refactor the dns_geoip API to use ISC_THREAD_LOCAL

Previously, the dns_geoip API used isc_thread_key API for TLS, which is
fairly complicated and requires initialization of memory contexts, etc.
This part of code was refactored to use a ISC_THREAD_LOCAL pointer which
greatly simplifies the whole code related to storing TLS variables, and
creating the local memory context was moved to named and stored in the
named_g_geoip global context.

6 years agoRefactor the dns_dt API to use ISC_THREAD_LOCAL
Ondřej Surý [Mon, 2 Dec 2019 10:42:50 +0000 (11:42 +0100)] 
Refactor the dns_dt API to use ISC_THREAD_LOCAL

Previously, the dns_dt API used isc_thread_key API for TLS, which is
fairly complicated and requires initialization of memory contexts, etc.
This part of code was refactored to use a ISC_THREAD_LOCAL pointer which
greatly simplifies the whole code related to storing TLS variables.

6 years agoRefactor the dns_name API to use ISC_THREAD_LOCAL
Ondřej Surý [Mon, 2 Dec 2019 10:42:50 +0000 (11:42 +0100)] 
Refactor the dns_name API to use ISC_THREAD_LOCAL

Previously, the dns_name API used isc_thread_key API for TLS, which is
fairly complicated and requires initialization of memory contexts, etc.
This part of code was refactored to use a ISC_THREAD_LOCAL pointer which
greatly simplifies the whole code related to storing TLS variables.

6 years agoAdd and use ISC_THREAD_LOCAL macro
Ondřej Surý [Mon, 2 Dec 2019 10:42:50 +0000 (11:42 +0100)] 
Add and use ISC_THREAD_LOCAL macro

The new ISC_THREAD_LOCAL macro unifies usage of platform dependent
Thread Local Storage definition thread_local vs __thread vs
__declspec(thread) to a single macro.

The commit also unifies the required level of support for TLS as for
some parts of the code it was mandatory and for some parts of the code
it wasn't.

6 years agoMerge branch '1434-explicitly-set-python-to-a-empty-string-with-without-python' into...
Mark Andrews [Tue, 3 Dec 2019 12:48:42 +0000 (12:48 +0000)] 
Merge branch '1434-explicitly-set-python-to-a-empty-string-with-without-python' into 'master'

Resolve "explicitly set PYTHON to a empty string with --without-python"

Closes #1434

See merge request isc-projects/bind9!2672

6 years agoadd AC_ARG_VAR([PYTHON], [path to python executable])
Mark Andrews [Mon, 2 Dec 2019 21:38:50 +0000 (08:38 +1100)] 
add AC_ARG_VAR([PYTHON], [path to python executable])

6 years agoadd CHANGES
Mark Andrews [Sun, 1 Dec 2019 23:25:51 +0000 (10:25 +1100)] 
add CHANGES

6 years agounset PYTHON on --without-python to prevent python still being used
Mark Andrews [Sun, 1 Dec 2019 23:17:44 +0000 (10:17 +1100)] 
unset PYTHON on --without-python to prevent python still being used

6 years agoMerge branch '1419-threadsanitizer-data-race-rbtdb-c-7568-in-issecure' into 'master'
Mark Andrews [Tue, 3 Dec 2019 01:14:27 +0000 (01:14 +0000)] 
Merge branch '1419-threadsanitizer-data-race-rbtdb-c-7568-in-issecure' into 'master'

Resolve "ThreadSanitizer: data race rbtdb.c:7568 in issecure"

Closes #1419

See merge request isc-projects/bind9!2656

6 years agor/w of rbtdb->current_version requires that rbtdb->lock be held
Mark Andrews [Thu, 28 Nov 2019 06:58:40 +0000 (17:58 +1100)] 
r/w of rbtdb->current_version requires that rbtdb->lock be held

6 years agoMerge branch '1412-threadsanitizer-data-race-resolver-c-7030-in-fctx_decreference...
Mark Andrews [Mon, 2 Dec 2019 23:46:16 +0000 (23:46 +0000)] 
Merge branch '1412-threadsanitizer-data-race-resolver-c-7030-in-fctx_decreference-2' into 'master'

Resolve "ThreadSanitizer: data race resolver.c:7030 in fctx_decreference"

Closes #1412

See merge request isc-projects/bind9!2673

6 years agoMake fctx->attributes atomic.
Mark Andrews [Mon, 2 Dec 2019 04:11:50 +0000 (15:11 +1100)] 
Make fctx->attributes atomic.

FCTX_ATTR_SHUTTINGDOWN needs to be set and tested while holding the node
lock but the rest of the attributes don't as they are task locked. Making
fctx->attributes atomic allows both behaviours without races.

6 years agoMerge branch 'michal/address-asan-memory-leak-reports' into 'master'
Michał Kępień [Mon, 2 Dec 2019 15:07:45 +0000 (15:07 +0000)] 
Merge branch 'michal/address-asan-memory-leak-reports' into 'master'

Address ASAN memory leak reports

See merge request isc-projects/bind9!2679

6 years agoDo not define ASAN_OPTIONS at build time
Michał Kępień [Mon, 2 Dec 2019 15:03:23 +0000 (16:03 +0100)] 
Do not define ASAN_OPTIONS at build time

Disabling ASAN memory leak detection for a build job is pointless
because ASAN is only used in test jobs.  (Also, memory leak detection
should not be disabled globally - explicit suppressions should be used
in case of issues with external code.)

6 years agoMove xmlInitThreads()/xmlCleanupThreads() calls
Michał Kępień [Mon, 2 Dec 2019 15:03:23 +0000 (16:03 +0100)] 
Move xmlInitThreads()/xmlCleanupThreads() calls

xmlInitThreads() and xmlCleanupThreads() are called from within
named_statschannels_configure() and named_statschannels_shutdown(),
respectively.  Both of these functions are executed by worker threads,
not the main named thread.  This causes ASAN to report memory leaks like
the following one upon shutdown (as long as named is asked to produce
any XML output over its configured statistics channels during its
lifetime):

    Direct leak of 968 byte(s) in 1 object(s) allocated from:
        #0 0x7f677c249cd8 in __interceptor_calloc /build/gcc/src/gcc/libsanitizer/asan/asan_malloc_linux.cc:153
        #1 0x7f677bc1838f in xmlGetGlobalState (/usr/lib/libxml2.so.2+0xa838f)

The data mentioned in the above report is a libxml2 state structure
stored as thread-specific data.  Such chunks of memory are automatically
released (by a destructor passed to pthread_key_create() by libxml2)
whenever a thread that allocated a given chunk exits.  However, if
xmlCleanupThreads() is called by a given thread before it exits, the
destructor will not be invoked (due to xmlCleanupThreads() calling
pthread_key_delete()) and ASAN will report a memory leak.  Thus,
xmlInitThreads() and xmlCleanupThreads() must not be called from worker
threads.  Since xmlInitThreads() must be called on Windows in order for
libxml2 to work at all, move xmlInitThreads() and xmlCleanupThreads()
calls to the main named thread (which does not produce any XML output
itself) in order to prevent the memory leak from being reported by ASAN.

6 years agoMerge branch '1445-fix-geoip2-memory-leak-upon-reconfiguration' into 'master'
Michał Kępień [Mon, 2 Dec 2019 14:54:42 +0000 (14:54 +0000)] 
Merge branch '1445-fix-geoip2-memory-leak-upon-reconfiguration' into 'master'

Fix GeoIP2 memory leak upon reconfiguration

Closes #1445

See merge request isc-projects/bind9!2678

6 years agoAdd CHANGES entry
Michał Kępień [Mon, 2 Dec 2019 14:15:06 +0000 (15:15 +0100)] 
Add CHANGES entry

5329. [bug] Reconfiguring named caused memory to be leaked when any
GeoIP2 database was in use. [GL #1445]

6 years agoFix GeoIP2 memory leak upon reconfiguration
Michał Kępień [Mon, 2 Dec 2019 14:15:06 +0000 (15:15 +0100)] 
Fix GeoIP2 memory leak upon reconfiguration

Loaded GeoIP2 databases are only released when named is shut down, but
not during server reconfiguration.  This causes memory to be leaked
every time "rndc reconfig" or "rndc reload" is used, as long as any
GeoIP2 database is in use.  Fix by releasing any loaded GeoIP2 databases
before reloading them.  Do not call dns_geoip_shutdown() until server
shutdown as that function releases the memory context used for caching
GeoIP2 lookup results.

6 years agoMerge branch '1416-threadsanitizer-data-race-resolver-c-3384-in-findname' into 'master'
Ondřej Surý [Mon, 2 Dec 2019 08:49:15 +0000 (08:49 +0000)] 
Merge branch '1416-threadsanitizer-data-race-resolver-c-3384-in-findname' into 'master'

Resolve "ThreadSanitizer: data race resolver.c:3384 in findname"

Closes #1416

See merge request isc-projects/bind9!2668

6 years agoAssign fctx->client when fctx is created rather when the join happens.
Mark Andrews [Thu, 28 Nov 2019 22:59:03 +0000 (09:59 +1100)] 
Assign fctx->client when fctx is created rather when the join happens.

This prevents races on fctx->client whenever a new fetch joins a existing
fetch (by calling fctx_join) as it is now invariant for the active life of
fctx.

6 years agoMerge branch '1293-change-the-return-value-for-dns_name_dup-to-void-and-cleanup-the...
Ondřej Surý [Fri, 29 Nov 2019 13:40:54 +0000 (13:40 +0000)] 
Merge branch '1293-change-the-return-value-for-dns_name_dup-to-void-and-cleanup-the-code' into 'master'

Change the return value for dns_name_dup() to void and cleanup the code

Closes #1293

See merge request isc-projects/bind9!2518

6 years agoDisable no longer useful semantic patches
Ondřej Surý [Fri, 29 Nov 2019 13:03:29 +0000 (14:03 +0100)] 
Disable no longer useful semantic patches

Some semantic patches are meant to be run just once, as they work on
functions with changed prototypes. We keep them for reference, but
disabled them from the CI to save time.

6 years agoRefactor dns_name_dup() usage using the semantic patch
Ondřej Surý [Fri, 1 Nov 2019 13:31:13 +0000 (08:31 -0500)] 
Refactor dns_name_dup() usage using the semantic patch

6 years agococci: Add semantic patch to refactor dns_name_dup() usage
Ondřej Surý [Fri, 1 Nov 2019 13:30:32 +0000 (08:30 -0500)] 
cocci: Add semantic patch to refactor dns_name_dup() usage

6 years agolibdns: dns_name_dup() can't fail, change return type to void
Ondřej Surý [Fri, 1 Nov 2019 13:24:35 +0000 (08:24 -0500)] 
libdns: dns_name_dup() can't fail, change return type to void

6 years agoMerge branch '1430-fix-logging-long-named-command-lines' into 'master'
Michał Kępień [Fri, 29 Nov 2019 08:07:47 +0000 (08:07 +0000)] 
Merge branch '1430-fix-logging-long-named-command-lines' into 'master'

Fix logging long named command lines

Closes #1430

See merge request isc-projects/bind9!2667

6 years agoFix logging long named command lines
Michał Kępień [Fri, 29 Nov 2019 08:06:41 +0000 (09:06 +0100)] 
Fix logging long named command lines

The saved_command_line buffer in bin/named/main.c is 8192 bytes long.
The size of libisc's internal logging buffer (defined by the value of
the LOG_BUFFER_SIZE constant in lib/isc/log.c) is also 8192 bytes.
Since the buffer containing the ellipsis is passed as the last argument
to isc_log_write() and the buffer containing the potentially trimmed
named command line (saved_command_line) is passed as the second argument
in the same isc_log_write() call, it may happen that saved_command_line
will exhaust all available space in libisc's internal logging buffer, in
which case the ellipsis will be elided from the output.

Make saved_command_line 4096 bytes long as that value is arguably also
large enough for any reasonable use case and at the same time it ensures
ellipsis will always be printed for excessively long named command
lines.

6 years agoMerge branch '1310-improve-portability-of-the-runtime-system-test' into 'master'
Michał Kępień [Fri, 29 Nov 2019 07:48:08 +0000 (07:48 +0000)] 
Merge branch '1310-improve-portability-of-the-runtime-system-test' into 'master'

Improve portability of the "runtime" system test

Closes #1310

See merge request isc-projects/bind9!2666

6 years agoImprove portability of the "runtime" system test
Michał Kępień [Fri, 29 Nov 2019 07:47:33 +0000 (08:47 +0100)] 
Improve portability of the "runtime" system test

The "runtime" system test currently fails on Windows because it waits
for named to log a message indicating successful startup ("running"),
but that never happens since named on Windows fails to open the
configuration file as its path includes control characters.

Instead of putting control characters in directory names, put them in
the value of the -D command line switch passed to named, which is used
for identifying an instance of named in a process listing and whose
value is completely ignored by named, but still logged.

While a similar check using special characters appears to be working
fine on Windows for the time being, modify it in the same way to avoid
potential future problems on other platforms and make the test cleaner.

6 years agoMerge branch '1431-summary-sanitizer-grep-is-dangerous' into 'master'
Ondřej Surý [Fri, 29 Nov 2019 07:02:30 +0000 (07:02 +0000)] 
Merge branch '1431-summary-sanitizer-grep-is-dangerous' into 'master'

Resolve ""SUMMARY: .*Sanitizer" grep is dangerous"

Closes #1431

See merge request isc-projects/bind9!2669

6 years agoreplace grep -r with 'find -type f | xargs'
Mark Andrews [Thu, 28 Nov 2019 23:58:28 +0000 (10:58 +1100)] 
replace grep -r with 'find -type f | xargs'

6 years agoMerge branch 'ondrej/keep-sanitizer-tainted-system-tests-files' into 'master'
Ondřej Surý [Thu, 28 Nov 2019 21:39:28 +0000 (21:39 +0000)] 
Merge branch 'ondrej/keep-sanitizer-tainted-system-tests-files' into 'master'

Don't clean the system test temporary files if sanitizer reports were found inside

See merge request isc-projects/bind9!2657

6 years agoDon't clean the system test temporary files if sanitizer reports were found inside
Ondřej Surý [Tue, 26 Nov 2019 17:03:33 +0000 (18:03 +0100)] 
Don't clean the system test temporary files if sanitizer reports were found inside

6 years agoMerge branch '1417-threadsanitizer-data-race-rbtdb-c-1535-in-add32' into 'master'
Mark Andrews [Thu, 28 Nov 2019 20:10:33 +0000 (20:10 +0000)] 
Merge branch '1417-threadsanitizer-data-race-rbtdb-c-1535-in-add32' into 'master'

Resolve "ThreadSanitizer: data race rbtdb.c:1535 in add32"

Closes #1417

See merge request isc-projects/bind9!2655

6 years agoadd CHANGES
Mark Andrews [Wed, 27 Nov 2019 23:28:31 +0000 (10:28 +1100)] 
add CHANGES

6 years agordataset_setownercase and rdataset_getownercase need to obtain a node lock
Mark Andrews [Wed, 27 Nov 2019 23:24:12 +0000 (10:24 +1100)] 
rdataset_setownercase and rdataset_getownercase need to obtain a node lock

6 years agoMerge branch 'ondrej/stop-retrying-system-tests' into 'master'
Ondřej Surý [Thu, 28 Nov 2019 12:22:59 +0000 (12:22 +0000)] 
Merge branch 'ondrej/stop-retrying-system-tests' into 'master'

Stop retrying the system tests; we should fix the tests instead

See merge request isc-projects/bind9!2649

6 years agoMerge branch 'wpk/clock-realtime-fast' into 'master'
Ondřej Surý [Thu, 28 Nov 2019 12:07:37 +0000 (12:07 +0000)] 
Merge branch 'wpk/clock-realtime-fast' into 'master'

Use clock_realtime_fast where available

See merge request isc-projects/bind9!2661

6 years agoStop retrying the system tests; we should fix the tests instead
Ondřej Surý [Tue, 26 Nov 2019 12:00:32 +0000 (13:00 +0100)] 
Stop retrying the system tests; we should fix the tests instead

6 years agoUse clock_realtime_fast where available
Witold Kręcicki [Thu, 28 Nov 2019 11:00:27 +0000 (12:00 +0100)] 
Use clock_realtime_fast where available

6 years agoMerge branch 'ondrej/use_ATOMIC_VAR_INIT_to_initialize_tid_base_in_isc_hp_API' into...
Ondřej Surý [Thu, 28 Nov 2019 11:30:37 +0000 (11:30 +0000)] 
Merge branch 'ondrej/use_ATOMIC_VAR_INIT_to_initialize_tid_base_in_isc_hp_API' into 'master'

Use ATOMIC_VAR_INIT to initialize tid_v_base to 0

See merge request isc-projects/bind9!2660

6 years agoMerge branch 'ondrej/lib_isc_counter_improvements' into 'master'
Ondřej Surý [Thu, 28 Nov 2019 11:07:42 +0000 (11:07 +0000)] 
Merge branch 'ondrej/lib_isc_counter_improvements' into 'master'

Improve the atomics usage in isc_counter API

See merge request isc-projects/bind9!2658

6 years agoUse ATOMIC_VAR_INIT to initialize tid_v_base to 0
Ondřej Surý [Thu, 28 Nov 2019 10:31:02 +0000 (11:31 +0100)] 
Use ATOMIC_VAR_INIT to initialize tid_v_base to 0

6 years agoImprove the atomics usage in isc_counter API
Ondřej Surý [Thu, 28 Nov 2019 09:36:26 +0000 (10:36 +0100)] 
Improve the atomics usage in isc_counter API

6 years agoMerge branch '1401-intermittent-failures-in-the-catz-system-test' into 'master'
Ondřej Surý [Thu, 28 Nov 2019 08:37:29 +0000 (08:37 +0000)] 
Merge branch '1401-intermittent-failures-in-the-catz-system-test' into 'master'

Resolve "Intermittent failures in the catz system test"

Closes #1401

See merge request isc-projects/bind9!2633

6 years agoUse retry() and nextpart*() to simplify catz test
Ondřej Surý [Tue, 26 Nov 2019 10:56:49 +0000 (11:56 +0100)] 
Use retry() and nextpart*() to simplify catz test

6 years agoFix timing issues in catz test
Witold Kręcicki [Thu, 14 Nov 2019 11:57:18 +0000 (12:57 +0100)] 
Fix timing issues in catz test

Make the log checks more precise and use the retry() function for
repeating the checks.

6 years agoMerge branch '1376-supported-platforms' into 'master'
Evan Hunt [Thu, 28 Nov 2019 05:42:28 +0000 (05:42 +0000)] 
Merge branch '1376-supported-platforms' into 'master'

update "supported platforms" in release notes

Closes #1376

See merge request isc-projects/bind9!2654

6 years agoupdate "supported platforms" in release notes
Evan Hunt [Wed, 27 Nov 2019 21:06:13 +0000 (13:06 -0800)] 
update "supported platforms" in release notes

also added more information about library dependencies in PLATFORMS.md,
and cleaned up the grammar.

6 years agoMerge branch 'mnowak/runtime-forward-port-softhsm2-setup' into 'master'
Ondřej Surý [Wed, 27 Nov 2019 17:19:10 +0000 (17:19 +0000)] 
Merge branch 'mnowak/runtime-forward-port-softhsm2-setup' into 'master'

Fix the UID switch test to work with PKCS#11 build

See merge request isc-projects/bind9!2652

6 years agoFix the UID switch test to work with PKCS#11 build
Michal Nowak [Wed, 27 Nov 2019 17:19:10 +0000 (17:19 +0000)] 
Fix the UID switch test to work with PKCS#11 build

Forward port of 32fe9a0051fc76be4657fc2742e71d2be6193011 by Ondřej Surý.

6 years agoMerge branch '1402-multiple-issues-in-the-runtime-system-test' into 'master'
Ondřej Surý [Wed, 27 Nov 2019 12:02:55 +0000 (12:02 +0000)] 
Merge branch '1402-multiple-issues-in-the-runtime-system-test' into 'master'

Resolve "Multiple issues in the runtime system test"

Closes #1402

See merge request isc-projects/bind9!2636

6 years agoFix multiple issues in named setuid check
Ondřej Surý [Tue, 26 Nov 2019 15:55:08 +0000 (16:55 +0100)] 
Fix multiple issues in named setuid check

6 years agofixed a test failure, some other shell cleanup
Evan Hunt [Mon, 25 Nov 2019 18:27:40 +0000 (10:27 -0800)] 
fixed a test failure, some other shell cleanup

6 years agoInstead of sleeping for a fixed time, wait for named to log specific message in a...
Ondřej Surý [Sat, 16 Nov 2019 07:14:04 +0000 (15:14 +0800)] 
Instead of sleeping for a fixed time, wait for named to log specific message in a loop

6 years agoUse pre-prepared long command line for better portability
Ondřej Surý [Sat, 16 Nov 2019 06:22:20 +0000 (07:22 +0100)] 
Use pre-prepared long command line for better portability

6 years agoMake runtime/tests.sh shellcheck and set -e clean
Ondřej Surý [Sat, 16 Nov 2019 05:36:23 +0000 (13:36 +0800)] 
Make runtime/tests.sh shellcheck and set -e clean

This mostly comprises of:

* using $(...) instead of `...`
* changing the directories in subshell and not ignoring `cd` return code
* handling every error gracefully instead of ignoring the return code

6 years agoFurther improve the runtime tests to look for a specific instead of generic error
Ondřej Surý [Sat, 16 Nov 2019 05:30:58 +0000 (13:30 +0800)] 
Further improve the runtime tests to look for a specific instead of generic error

6 years agoThe PATH_MAX on macOS is 1024, we can't override conffile path to test for ellipsis
Ondřej Surý [Sat, 16 Nov 2019 05:16:46 +0000 (13:16 +0800)] 
The PATH_MAX on macOS is 1024, we can't override conffile path to test for ellipsis

6 years agoFix couple of no-op tests to actually test something (configuration files were missing)
Ondřej Surý [Sat, 16 Nov 2019 05:15:56 +0000 (13:15 +0800)] 
Fix couple of no-op tests to actually test something (configuration files were missing)

6 years agoSkip the runtime ellipsis test
Ondřej Surý [Sat, 16 Nov 2019 04:56:12 +0000 (12:56 +0800)] 
Skip the runtime ellipsis test

6 years agoruntime test: make the pidfiles match the names of configuration files
Ondřej Surý [Sat, 16 Nov 2019 04:55:05 +0000 (12:55 +0800)] 
runtime test: make the pidfiles match the names of configuration files

6 years agoruntime test: use helper function that kills named and waits for the finish
Ondřej Surý [Sat, 16 Nov 2019 08:33:47 +0000 (16:33 +0800)] 
runtime test: use helper function that kills named and waits for the finish

6 years agoMerge branch '1350-threadsanitizer-data-race-rbt-c-1312-in-dns_rbt_addnode' into...
Mark Andrews [Wed, 27 Nov 2019 10:47:04 +0000 (10:47 +0000)] 
Merge branch '1350-threadsanitizer-data-race-rbt-c-1312-in-dns_rbt_addnode' into 'master'

Resolve "ThreadSanitizer: data race rbt.c:1312 in dns_rbt_addnode"

Closes #1350

See merge request isc-projects/bind9!2648

6 years agoadd comments 'tree_lock(write) must be held'
Mark Andrews [Wed, 27 Nov 2019 09:00:26 +0000 (20:00 +1100)] 
add comments 'tree_lock(write) must be held'

6 years agorbtnode->nsec needs to be read while holding the tree lock
Mark Andrews [Wed, 27 Nov 2019 08:09:14 +0000 (19:09 +1100)] 
rbtnode->nsec needs to be read while holding the tree lock

6 years agoMerge branch '1399-recursive-limit-stat' into 'master'
Evan Hunt [Tue, 26 Nov 2019 19:15:18 +0000 (19:15 +0000)] 
Merge branch '1399-recursive-limit-stat' into 'master'

Resolve "recursive-client limit should have a stat counter"

Closes #1399

See merge request isc-projects/bind9!2629

6 years agoadd a stats counter for clients dropped due to recursive-clients limit
Evan Hunt [Tue, 26 Nov 2019 05:28:10 +0000 (21:28 -0800)] 
add a stats counter for clients dropped due to recursive-clients limit

6 years agoMerge branch '1336-1404-netmgr-destroy-tsan-fixes' into 'master'
Ondřej Surý [Tue, 26 Nov 2019 17:32:31 +0000 (17:32 +0000)] 
Merge branch '1336-1404-netmgr-destroy-tsan-fixes' into 'master'

Fix minor shutdown issues detected by TSAN

Closes #1404 and #1336

See merge request isc-projects/bind9!2639

6 years ago- Access netmgr worker->finished under worker lock only
Witold Kręcicki [Tue, 26 Nov 2019 14:21:25 +0000 (15:21 +0100)] 
- Access netmgr worker->finished under worker lock only
- Join network worker thread to silence tsan

6 years agoMerge branch '1354-threadsanitizer-data-race-message-c-3283-in-dns_message_sectiontot...
Ondřej Surý [Tue, 26 Nov 2019 13:00:01 +0000 (13:00 +0000)] 
Merge branch '1354-threadsanitizer-data-race-message-c-3283-in-dns_message_sectiontotext' into 'master'

Resolve "ThreadSanitizer: data race message.c:3283 in dns_message_sectiontotext"

Closes #1354

See merge request isc-projects/bind9!2578