Commit Graph
29833 Commits
Author SHA1 Message Date
Michał Kępień 38a4bedfcd 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).

(cherry picked from commit b0916bba41)
2019-12-06 14:47:08 +01:00
Michał Kępień 8ed6c8fd59 Merge branch '1452-detect-missing-system-test-results-v9_14' into 'v9_14'
[v9_14] Detect missing system test results

See merge request isc-projects/bind9!2720
2019-12-06 13:46:31 +00:00
Michał Kępień 19cd59923c Detect missing system test results
At the end of each system test suite run, the system test framework
collects all existing test.output files from system test subdirectories
and produces bin/tests/system/systests.output from those files.
However, it does not check whether a test.output file was found for
every executed test.  Thus, if the test.output file is accidentally
deleted by the system test itself (e.g. due to an overly broad file
removal wildcard present in clean.sh), its output will not be included
in bin/tests/system/systests.output.  Since the result of each system
test suite run is determined by bin/tests/system/testsummary.sh, which
only operates on the contents of bin/tests/system/systests.output, this
can lead to test failures being ignored.  Fix by ensuring the number of
test results found in bin/tests/system/systests.output is equal to the
number of tests run and triggering a system test suite failure in case
of a discrepancy between these two values.

(cherry picked from commit 3c3085be3c)
2019-12-06 14:19:55 +01:00
Mark Andrews 1b0845a182 Merge branch '1455-job-failed-453300-v9_14' into 'v9_14'
loop waiting for the redirect zone to load

See merge request isc-projects/bind9!2713
2019-12-06 00:19:40 +00:00
Mark Andrews a47736abb0 loop waiting for the redirect zone to load
(cherry picked from commit e4b1d0b686)
2019-12-06 10:57:16 +11:00
Mark Andrews c480706290 Merge branch '1434-explicitly-set-python-to-a-empty-string-with-without-python-v9_14' into 'v9_14'
Resolve "explicitly set PYTHON to a empty string with --without-python"

See merge request isc-projects/bind9!2696
2019-12-03 13:32:47 +00:00
Mark Andrews eab8463f42 add AC_ARG_VAR([PYTHON], [path to python executable])
(cherry picked from commit eed2aabc40)
2019-12-03 23:51:09 +11:00
Mark Andrews 4c257570d6 add CHANGES
(cherry picked from commit 8cd3cf90b2)
2019-12-03 23:51:09 +11:00
Mark Andrews a53231a274 unset PYTHON on --without-python to prevent python still being used
(cherry picked from commit d8fc544569)
2019-12-03 23:51:09 +11:00
Mark Andrews 62f0b06637 Merge branch '1419-threadsanitizer-data-race-rbtdb-c-7568-in-issecure-v9_14' into 'v9_14'
r/w of rbtdb->current_version requires that rbtdb->lock be held

See merge request isc-projects/bind9!2692
2019-12-03 12:16:00 +00:00
Mark AndrewsandOndřej Surý e9704327c4 r/w of rbtdb->current_version requires that rbtdb->lock be held
(cherry picked from commit cd2469d3cd)
2019-12-03 09:09:52 +00:00
Mark Andrews 08a60bdd92 Merge branch '1416-threadsanitizer-data-race-resolver-c-3384-in-findname-v9_14' into 'v9_14'
Assign fctx->client when fctx is created rather when the join happens.

See merge request isc-projects/bind9!2694
2019-12-03 06:20:50 +00:00
Mark Andrews d0796289dc 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.

(cherry picked from commit 9ca6ad6311)
2019-12-03 17:00:02 +11:00
Mark Andrews 90712110e3 Merge branch '1412-threadsanitizer-data-race-resolver-c-7030-in-fctx_decreference-2-v9_14' into 'v9_14'
Make fctx->attributes atomic.

See merge request isc-projects/bind9!2690
2019-12-03 01:34:36 +00:00
Mark Andrews 7e66602cd6 back port atomic and / or support 2019-12-03 11:38:06 +11:00
Mark Andrews c712f40676 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.

(cherry picked from commit 912ce87479)
2019-12-03 10:52:02 +11:00
Michał Kępień 0f2a8e259d Merge branch 'michal/address-asan-memory-leak-reports-v9_14' into 'v9_14'
[v9_14] Address ASAN memory leak reports

See merge request isc-projects/bind9!2683
2019-12-02 18:24:42 +00:00
Michał Kępień 1313f06110 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.

(cherry picked from commit b425b5d56e)
2019-12-02 17:09:39 +01:00
Michał Kępień 7a5c7f2ba7 Merge branch '1445-fix-geoip2-memory-leak-upon-reconfiguration-v9_14' into 'v9_14'
[v9_14] Fix GeoIP2 memory leak upon reconfiguration

See merge request isc-projects/bind9!2681
2019-12-02 16:07:29 +00:00
Michał Kępień b109666c94 Add CHANGES entry
5329.	[bug]		Reconfiguring named caused memory to be leaked when any
			GeoIP2 database was in use. [GL #1445]

(cherry picked from commit 628b1837d2)
2019-12-02 15:27:15 +01:00
Michał Kępień 5a0582f3e7 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.

(cherry picked from commit 670afbe84a)
2019-12-02 15:21:38 +01:00
Mark Andrews 29b40677b0 Merge branch '1417-threadsanitizer-data-race-rbtdb-c-1535-in-add32-v9_14' into 'v9_14'
Resolve "ThreadSanitizer: data race rbtdb.c:1535 in add32"

See merge request isc-projects/bind9!2664
2019-11-28 21:55:22 +00:00
Mark Andrews 049b5e0dcc add CHANGES
(cherry picked from commit 68693f8279)
2019-11-29 07:12:44 +11:00
Mark Andrews 1a7b62916c rdataset_setownercase and rdataset_getownercase need to obtain a node lock
(cherry picked from commit 637b2c4e51)
2019-11-29 07:12:44 +11:00
Ondřej Surý 36e5f50ee8 Merge branch 'mnowak/runtime-forward-port-softhsm2-setup-9_14' into 'v9_14'
[9.14] Fix the UID switch test to work with PKCS#11 build

See merge request isc-projects/bind9!2653
2019-11-27 17:14:53 +00:00
Michal NowakandOndřej Surý 271c836a86 Fix the UID switch test to work with PKCS#11 build
Forward port of 32fe9a0051fc76be4657fc2742e71d2be6193011 by Ondřej Surý.

(cherry picked from commit c49c41a1adb9fa8ae75fe656692d9935de1d505f)
2019-11-27 17:14:53 +00:00
Mark Andrews af0e100b84 Merge branch '1350-threadsanitizer-data-race-rbt-c-1312-in-dns_rbt_addnode-v9_14' into 'v9_14'
Resolve "ThreadSanitizer: data race rbt.c:1312 in dns_rbt_addnode"

See merge request isc-projects/bind9!2650
2019-11-27 11:49:00 +00:00
Mark Andrews da0fb0fdc0 add comments 'tree_lock(write) must be held'
(cherry picked from commit 8f6aaa7230)
2019-11-27 21:59:19 +11:00
Mark Andrews e53af115da rbtnode->nsec needs to be read while holding the tree lock
(cherry picked from commit 7cad3b2e91)
2019-11-27 21:59:18 +11:00
Evan Hunt 5f3d61e1ff Merge branch '1399-recursive-limit-stat-v9_14' into 'v9_14'
Resolve "recursive-client limit should have a stat counter"

See merge request isc-projects/bind9!2645
2019-11-26 19:43:26 +00:00
Evan Hunt d445121c26 add a stats counter for clients dropped due to recursive-clients limit
(cherry picked from commit 715afa9c57)
2019-11-26 11:20:12 -08:00
Ondřej Surý 0f7676c8fe Merge branch '1403-when-configuration-loading-fails-named-could-assert-v9_14' into 'v9_14'
Request exclusive access when crashing via fatal()

See merge request isc-projects/bind9!2637
2019-11-26 12:54:11 +00:00
Ondřej Surý e78506c3a8 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.

(cherry picked from commit 952d7fde63)
2019-11-26 12:51:49 +01:00
Ondřej Surý f2d9b062b4 Merge branch 'ondrej/add-retry_quiet-function-to-conf.sh.common-v9_14' into 'v9_14'
Add retry_quiet() function to retry quietly for an event to occur

See merge request isc-projects/bind9!2631
2019-11-26 08:20:37 +00:00
Ondřej Surý 699bcc70ca Add retry_quiet() function to retry quietly for an event to occur
(cherry picked from commit 31264a7e00)
2019-11-26 09:19:52 +01:00
Mark Andrews 2a368efd53 Merge branch '1367-threadsanitizer-data-race-dispatch-c-901-in-free_buffer-v9_14' into 'v9_14'
Resolve "ThreadSanitizer: data race dispatch.c:901 in free_buffer"

See merge request isc-projects/bind9!2627
2019-11-26 02:37:14 +00:00
Mark Andrews d53ce94d36 move maxbuffers test to allocate_udp_buffer
(cherry picked from commit 26a93d77aa)
2019-11-26 11:53:19 +11:00
Mark Andrews 25306ea1ad Lock dispatch manager buffer_lock before accessing buffers;
Only test buffers for UDP dispatches.

(cherry picked from commit 011af4de71)
2019-11-26 11:53:19 +11:00
Mark Andrews fbcf160346 lock disp->mgr before reading disp->mgr->buffers
(cherry picked from commit afc7389ce8)
2019-11-26 11:53:19 +11:00
Mark Andrews 00ff640c36 Merge branch '1397-install-isc-python-module-v9_14' into 'v9_14'
Resolve "Install ISC python module"

See merge request isc-projects/bind9!2625
2019-11-25 23:38:44 +00:00
Mark Andrews 047c8f3318 add CHANGES and note in README.md
(cherry picked from commit 8bbafeb5ef)
2019-11-26 10:02:38 +11:00
Mark Andrews 04f16633c5 check for 'distutils.core setup'
(cherry picked from commit 50e1bf3800)
2019-11-26 10:02:06 +11:00
Evan Hunt 1a8b22c715 Merge branch 'each-notes-v9_14' into 'v9_14'
cleanup release notes text

See merge request isc-projects/bind9!2623
2019-11-25 21:20:18 +00:00
Evan Hunt d47a606707 cleanup release notes text
(cherry picked from commit fa70fc8731)
2019-11-25 13:19:48 -08:00
Mark Andrews 6bf8ecf15e Merge branch '1334-threadsanitizer-data-race-dispatch-c-1339-in-tcp_recv-v9_14' into 'v9_14'
lock dispatch before reporting state

See merge request isc-projects/bind9!2618
2019-11-22 21:52:58 +00:00
Mark Andrews e99156043f lock dispatch before reporting state
(cherry picked from commit 3075445ed6)
2019-11-23 08:25:33 +11:00
Mark Andrews 940f75a4fe Merge branch '1317-alphabetise-delv-s-usage-v9_14' into 'v9_14'
alphabetise delv's usage.

See merge request isc-projects/bind9!2615
2019-11-22 19:56:53 +00:00
Mark Andrews a7da1514d2 fix release line 2019-11-23 00:19:40 +11:00
Mark Andrews 148c0f63fd alphabetise delv's usage.
(cherry picked from commit 78685ed173)
2019-11-23 00:09:29 +11:00
Evan Hunt 4eb815a283 Merge branch 'merge-v9_14_8' into 'v9_14'
merge 9.14.8 to v9_14 branch

See merge request isc-projects/bind9!2605
2019-11-20 21:42:11 +00:00