]> git.ipfire.org Git - thirdparty/bind9.git/log
thirdparty/bind9.git
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

6 years agoprovide default yaml indent
Mark Andrews [Mon, 25 Nov 2019 04:28:51 +0000 (15:28 +1100)] 
provide default yaml indent

6 years agodns_master_indent and dns_master_indentstr must not be global
Mark Andrews [Mon, 18 Nov 2019 09:46:58 +0000 (20:46 +1100)] 
dns_master_indent and dns_master_indentstr must not be global

The indentation for dumping the master zone was driven by two
global variables dns_master_indent and dns_master_indentstr.  In
threaded mode, this becomes prone to data access races, so this commit
converts the global variables into a local per-context tuple that
consist of count and string.

6 years agoMerge branch '1360-threadsanitizer-data-race-adb-c-2790-in-dns_adb_detach' into ...
Ondřej Surý [Tue, 26 Nov 2019 12:16:59 +0000 (12:16 +0000)] 
Merge branch '1360-threadsanitizer-data-race-adb-c-2790-in-dns_adb_detach' into 'master'

Resolve "ThreadSanitizer: data race adb.c:2790 in dns_adb_detach"

Closes #1360

See merge request isc-projects/bind9!2595

6 years agoFix missing adb->{e,i}refcnt locking
Ondřej Surý [Tue, 19 Nov 2019 05:49:28 +0000 (13:49 +0800)] 
Fix missing adb->{e,i}refcnt locking

6 years agolib/dns/adb.c: Use atomics for adb quota values and reference counting
Witold Kręcicki [Tue, 22 Jan 2019 09:47:18 +0000 (10:47 +0100)] 
lib/dns/adb.c: Use atomics for adb quota values and reference counting

6 years agoUse integer fast type for mutexatomic shim type
Ondřej Surý [Mon, 30 Sep 2019 11:45:40 +0000 (13:45 +0200)] 
Use integer fast type for mutexatomic shim type

6 years agoMerge branch '1383-kasp-test-fails-with-unexpected-cds-record' into 'master'
Ondřej Surý [Tue, 26 Nov 2019 11:59:32 +0000 (11:59 +0000)] 
Merge branch '1383-kasp-test-fails-with-unexpected-cds-record' into 'master'

kasp: Fix the reading of CDS keys to use stricter awk

Closes #1383

See merge request isc-projects/bind9!2608

6 years agokasp: Employ awk to make CDS checks stricter
Ondřej Surý [Thu, 21 Nov 2019 07:35:43 +0000 (15:35 +0800)] 
kasp: Employ awk to make CDS checks stricter

6 years agoMerge branch '1403-when-configuration-loading-fails-named-could-assert' into 'master'
Ondřej Surý [Tue, 26 Nov 2019 11:51:02 +0000 (11:51 +0000)] 
Merge branch '1403-when-configuration-loading-fails-named-could-assert' into 'master'

Request exclusive access when crashing via fatal()

Closes #1403

See merge request isc-projects/bind9!2635

6 years agoRequest exclusive access when crashing via fatal()
Ondřej Surý [Fri, 22 Nov 2019 10:39:57 +0000 (11:39 +0100)] 
Request exclusive access when crashing via fatal()

When loading the configuration fails, there might be already other tasks
running and calling OpenSSL library functions.  The OpenSSL on_exit
handler is called when exiting the main process and there's a timing
race between the on_exit function that destroys OpenSSL allocated
resources (threads, locks, ...) and other tasks accessing the very same
resources leading to a crash in the system threading library. Therefore,
the fatal() function needs to request exlusive access to the task
manager to finish the already running tasks and exit only when no other
tasks are running.

6 years agoMerge branch 'ondrej/detect-cores-in-system-tests-on-FreeBSD' into 'master'
Ondřej Surý [Tue, 26 Nov 2019 11:44:22 +0000 (11:44 +0000)] 
Merge branch 'ondrej/detect-cores-in-system-tests-on-FreeBSD' into 'master'

Detect cores on FreeBSD

See merge request isc-projects/bind9!2634

6 years agoDetect cores on FreeBSD
Ondřej Surý [Fri, 22 Nov 2019 10:52:16 +0000 (11:52 +0100)] 
Detect cores on FreeBSD

6 years agoMerge branch '1380-autosign-jitter-test-fails-with-no-nsec3param-found-in-axfr' into...
Ondřej Surý [Tue, 26 Nov 2019 11:41:48 +0000 (11:41 +0000)] 
Merge branch '1380-autosign-jitter-test-fails-with-no-nsec3param-found-in-axfr' into 'master'

Tune the performance of the autosign test

Closes #1385, #1384, and #1380

See merge request isc-projects/bind9!2601

6 years agoReduce the minimal numbers of days in jitter test to 5
Ondřej Surý [Thu, 21 Nov 2019 06:45:41 +0000 (14:45 +0800)] 
Reduce the minimal numbers of days in jitter test to 5

6 years agoTune the performance of CDS/CDNSKEY deletion test
Ondřej Surý [Thu, 21 Nov 2019 06:33:56 +0000 (14:33 +0800)] 
Tune the performance of CDS/CDNSKEY deletion test

6 years agoTune the performance of oldsigs test
Ondřej Surý [Wed, 20 Nov 2019 19:43:35 +0000 (03:43 +0800)] 
Tune the performance of oldsigs test

The oldsigs test was checking only for the validity of the A
a.oldsigs.example. resource record and associated DNSSEC signature while
the zone might not have been fully signed yet leading to validation
failures because of bogus signatures on the validation path.

This commit changes the test to test that all old signatures in the
oldsigs.example. zone were replaced and the zone is fully resigned
before running the main check.

6 years agoTune the performance of the jitter test
Ondřej Surý [Wed, 20 Nov 2019 16:05:58 +0000 (00:05 +0800)] 
Tune the performance of the jitter test

6 years agoMerge branch 'ondrej/add-retry_quiet-function-to-conf.sh.common' into 'master'
Ondřej Surý [Tue, 26 Nov 2019 08:19:07 +0000 (08:19 +0000)] 
Merge branch 'ondrej/add-retry_quiet-function-to-conf.sh.common' into 'master'

Add retry_quiet() function to retry quietly for an event to occur

See merge request isc-projects/bind9!2630

6 years agoAdd retry_quiet() function to retry quietly for an event to occur
Ondřej Surý [Wed, 20 Nov 2019 16:05:58 +0000 (00:05 +0800)] 
Add retry_quiet() function to retry quietly for an event to occur

6 years agoMerge branch '1367-threadsanitizer-data-race-dispatch-c-901-in-free_buffer' into...
Mark Andrews [Tue, 26 Nov 2019 00:48:31 +0000 (00:48 +0000)] 
Merge branch '1367-threadsanitizer-data-race-dispatch-c-901-in-free_buffer' into 'master'

Resolve "ThreadSanitizer: data race dispatch.c:901 in free_buffer"

Closes #1367

See merge request isc-projects/bind9!2613

6 years agomove maxbuffers test to allocate_udp_buffer
Mark Andrews [Mon, 25 Nov 2019 00:38:09 +0000 (11:38 +1100)] 
move maxbuffers test to allocate_udp_buffer

6 years agoLock dispatch manager buffer_lock before accessing buffers;
Mark Andrews [Fri, 22 Nov 2019 01:55:03 +0000 (12:55 +1100)] 
Lock dispatch manager buffer_lock before accessing buffers;
Only test buffers for UDP dispatches.

6 years agolock disp->mgr before reading disp->mgr->buffers
Mark Andrews [Fri, 22 Nov 2019 00:55:47 +0000 (11:55 +1100)] 
lock disp->mgr before reading disp->mgr->buffers

6 years agoMerge branch '1397-install-isc-python-module' into 'master'
Mark Andrews [Mon, 25 Nov 2019 23:00:47 +0000 (23:00 +0000)] 
Merge branch '1397-install-isc-python-module' into 'master'

Resolve "Install ISC python module"

Closes #1397

See merge request isc-projects/bind9!2620