2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-09-05 09:05:40 +00:00
Commit Graph

30284 Commits

Author SHA1 Message Date
Ondřej Surý
7101eae6f4 Merge branch 'ondrej/fix-timer-test' into 'master'
Fix the crash in the timer test

See merge request isc-projects/bind9!2557
2019-11-13 14:29:49 +00:00
Evan Hunt
bd9f5c3c19 fix netmgr setup/teardown issues; setup and teardown only once in timer_test
- the netmgr was not correctly being specified when creating the task
  manager, and was cleaned up in the wrong order when shutting down.
- on freebsd, timer_test appears to be prone to failure if the
  netmgr is set up and torn down before and after ever test case, but
  less so if it's only set up once at the beginning and once at the
  end.
2019-11-13 14:47:47 +01:00
Ondřej Surý
aca0f88750 Remove the assertions from subthreads and use global errcnt to record errors 2019-11-13 14:47:47 +01:00
Ondřej Surý
2c3589e22a Lock the lasttime variable that's concurrently accessed between threads 2019-11-13 14:47:47 +01:00
Ondřej Surý
b9cb4c94fa Directly embed ../timer.c in timer_test.c for better assertion testing 2019-11-13 14:47:47 +01:00
Ondřej Surý
8de64964a3 Refactor the way we use memory context from isctest.c
This commit renames isctest {mctx,lctx} to test_{mctx,lctx} and cleans
up their usage in the individual unit tests.  This allows embedding
library .c files directly into the unit tests.
2019-11-13 14:47:47 +01:00
Witold Krecicki
229b7d85e8 Merge branch 'wpk/fix-accidental-task-unpause' into 'master'
Fix implicit task unpause when going from 'running' to 'idle'.

See merge request isc-projects/bind9!2571
2019-11-13 13:45:09 +00:00
Witold Kręcicki
5ce4b04b50 If a task is running and we call isc_task_pause it can
be implicitly unpaused when we switch from 'running' to
'idle' state. Fix it by not switching to 'idle' when paused.
2019-11-13 12:32:17 +00:00
Michał Kępień
3d92f5e95a Merge branch 'fix-url-in-readme' into 'master'
updated a broken link for newer release notes.

See merge request isc-projects/bind9!2567
2019-11-13 11:59:11 +00:00
Vicky Risk
c830a9116d Update broken release notes link 2019-11-13 12:56:05 +01:00
Michał Kępień
b4a015ebcd Merge branch 'michal/fix-libuv.dll-handling' into 'master'
Fix libuv.dll handling

See merge request isc-projects/bind9!2556
2019-11-12 11:24:41 +00:00
Michał Kępień
d8768bd143 Fix libuv.dll handling
Make sure libuv.dll gets copied to the proper directory in the Release
build configuration and that the BIND installer on Windows installs
libuv.dll.
2019-11-12 09:14:59 +00:00
Ondřej Surý
fadd39dc83 Merge branch 'ondrej/cleanup-PATH_MAX-and-NAME_MAX-ifdefs' into 'master'
Cleanup the {PATH,NAME}_MAX stray #ifdefs

See merge request isc-projects/bind9!2565
2019-11-12 09:13:25 +00:00
Ondřej Surý
bd80969b11 Cleanup the {PATH,NAME}_MAX stray #ifdefs 2019-11-12 09:36:08 +01:00
Ondřej Surý
e879490f10 Merge branch 'hurd' into 'master'
hurd: Fix build

See merge request isc-projects/bind9!2558
2019-11-12 08:09:03 +00:00
Samuel Thibault
d10fbdec84 hurd: Fix build
Move PATH_MAX, NAME_MAX, IOV_MAX default definitions to the common
<isc/platform.h>.
2019-11-10 20:14:17 +00:00
Michał Kępień
9e2da86ab9 Merge branch '1134-add-missing-dnssec-keygen-dependency-on-libisccfg' into 'master'
Add missing dnssec-keygen dependency on libisccfg

Closes #1134

See merge request isc-projects/bind9!2555
2019-11-08 12:42:50 +00:00
Michał Kępień
47e14c4d17 Add missing dnssec-keygen dependency on libisccfg
Commit 09ac224c5c made dnssec-keygen
depend on libisccfg but the Visual Studio solution file was not updated
to reflect that change.  Make sure the dnssec-keygen Visual Studio
project depends on the libisccfg project to prevent compilation issues
during parallel builds.
2019-11-08 12:56:09 +01:00
Michał Kępień
7df491e819 Merge branch 'michal/split-release-notes-into-per-version-sections' into 'master'
Split release notes into per-version sections

See merge request isc-projects/bind9!2524
2019-11-08 11:16:02 +00:00
Michał Kępień
8729c56cd8 Rebuild output files 2019-11-08 12:06:31 +01:00
Michał Kępień
dfc312ac56 Update URLs used in release notes
Some URLs used in release notes became outdated.  Make sure they point
to currently available resources.
2019-11-08 12:05:54 +01:00
Michał Kępień
2f37ab1dac Split release notes into per-version sections
Intertwining release notes from different BIND releases in a single XML
file has caused confusion in the past due to different (and often
arbitrary) approaches to keeping/removing release notes from older
releases on different BIND branches.  Divide doc/arm/notes.xml into
per-version sections to simplify determining the set of changes
introduced by a given release and to make adding/reviewing release notes
less error-prone.
2019-11-08 12:05:52 +01:00
Ondřej Surý
86b10eff81 Merge branch '1256-fix-the-jitter-test-2' into 'master'
Wait a little bit longer for autosign, bail out on not enough categories

See merge request isc-projects/bind9!2554
2019-11-08 07:43:50 +00:00
Ondřej Surý
f1cbdc5498 Wait a little bit longer for autosign, bail out on not enough categories 2019-11-08 07:43:33 +01:00
Ondřej Surý
d6f68fc4f0 Adjust the jitter range to +-3*stddev 2019-11-08 07:05:02 +01:00
Ondřej Surý
46eaa854d2 Merge branch '1256-fix-the-jitter-test' into 'master'
Check if the RRSIG jitter falls <mean-2.5*stddev;mean+2.5*stddev>

Closes #1309

See merge request isc-projects/bind9!2553
2019-11-08 06:01:47 +00:00
Ondřej Surý
02050bc506 Revert "temporarily disable jitter tests in the 'autosign' system test"
This reverts commit e17b7ee05a.
2019-11-08 07:00:08 +01:00
Ondřej Surý
0480a95ddf Check if the RRSIG jitter falls into mean+-2.5*stddev range 2019-11-08 06:59:40 +01:00
Witold Krecicki
25800c892f Merge branch '29-libuv-network-manager' into 'master'
libuv-based network manager

Closes #29

See merge request isc-projects/bind9!2528
2019-11-07 21:32:28 +00:00
Evan Hunt
129fb63db6 CHANGES, README, release note 2019-11-07 12:42:14 -08:00
Evan Hunt
24510a1fda adjust system tests to deal with possible timing issues
With the netmgr in use, named may start answering queries before zones
are loaded. This can cause transient failures in system tests after
servers are restarted or reconfigured. This commit adds retry loops
and sleep statements where needed to address this problem.

Also incidentally silenced a clang warning.
2019-11-07 12:42:14 -08:00
Evan Hunt
b9a5508e52 remove ISC_QUEUE as it is no longer used 2019-11-07 11:55:37 -08:00
Evan Hunt
53f0b6c34d convert ns_client and related objects to use netmgr
- ns__client_request() is now called by netmgr with an isc_nmhandle_t
  parameter. The handle can then be permanently associated with an
  ns_client object.
- The task manager is paused so that isc_task events that may be
  triggred during client processing will not fire until after the netmgr is
  finished with it. Before any asynchronous event, the client MUST
  call isc_nmhandle_ref(client->handle), to prevent the client from
  being reset and reused while waiting for an event to process. When
  the asynchronous event is complete, isc_nmhandle_unref(client->handle)
  must be called to ensure the handle can be reused later.
- reference counting of client objects is now handled in the nmhandle
  object.  when the handle references drop to zero, the client's "reset"
  callback is used to free temporary resources and reiniialize it,
  whereupon the handle (and associated client) is placed in the
  "inactive handles" queue.  when the sysstem is shutdown and the
  handles are cleaned up, the client's "put" callback is called to free
  all remaining resources.
- because client allocation is no longer handled in the same way,
  the '-T clienttest' option has now been removed and is no longer
  used by any system tests.
- the unit tests require wrapping the isc_nmhandle_unref() function;
  when LD_WRAP is supported, that is used. otherwise we link a
  libwrap.so interposer library and use that.
2019-11-07 11:55:37 -08:00
Witold Kręcicki
33bf90331b use clock_gettime() instead of gettimeofday() for isc_itme functions 2019-11-07 11:55:37 -08:00
Witold Kręcicki
a85a65f96e add atomic_exchange operations to mutexatomic.h and win32 stdatomic.h 2019-11-07 11:55:37 -08:00
Evan Hunt
59c64fa4bd add isc_task_pause() and isc_task_unpause() functions
This allows a task to be temporary disabled so that objects won't be
processed simultaneously by libuv events and isc_task events. When a
task is paused, currently running events may complete, but no further
event will added to the run queue will be executed until the task is
unpaused.
2019-11-07 11:55:37 -08:00
Evan Hunt
36ee430327 optionally associate a netmgr with a task manager when creating
When a task manager is created, we can now specify an `isc_nm`
object to associate with it; thereafter when the task manager is
placed into exclusive mode, the network manager will be paused.
2019-11-07 11:55:37 -08:00
Witold Kręcicki
f188d00227 disable leak detection in ASAN; libuv has some problems with that 2019-11-07 11:55:37 -08:00
Evan Hunt
48d003edf7 use netmgr in libisc unit tests 2019-11-07 11:55:37 -08:00
Witold Kręcicki
70397f9d92 netmgr: libuv-based network manager
This is a replacement for the existing isc_socket and isc_socketmgr
implementation. It uses libuv for asynchronous network communication;
"networker" objects will be distributed across worker threads reading
incoming packets and sending them for processing.

UDP listener sockets automatically create an array of "child" sockets
so each worker can listen separately.

TCP sockets are shared amongst worker threads.

A TCPDNS socket is a wrapper around a TCP socket, which handles the
the two-byte length field at the beginning of DNS messages over TCP.

(Other wrapper socket types can be implemented in the future to handle
DNS over TLS, DNS over HTTPS, etc.)
2019-11-07 11:55:37 -08:00
Evan Hunt
a8c814cb2f implement fixed-size array stack data structure 2019-11-07 11:55:37 -08:00
Witold Kręcicki
402969bf95 implement fetch-and-add array queue data structure
this is a lockless queue based on hazard pointers.
2019-11-07 11:55:37 -08:00
Evan Hunt
64e1a4a398 temporarily move ISC_QUEUE to list.h
The double-locked queue implementation is still currently in use
in ns_client, but will be replaced by a fetch-and-add array queue.
This commit moves it from queue.h to list.h so that queue.h can be
used for the new data structure, and clean up dependencies between
list.h and types.h. Later, when the ISC_QUEUE is no longer is use,
it will be removed completely.
2019-11-07 11:55:37 -08:00
Witold Kręcicki
aa57fa7090 implement hazard pointer data structure
this is a mechanism to allow safe lock-free data structures.
2019-11-07 11:55:37 -08:00
Witold Kręcicki
ae202e0e7c Preliminary netmgr design documentation 2019-11-07 11:55:37 -08:00
Witold Kręcicki
a5f8374400 add isc_sockaddr_fromsockaddr function
This converts from struct sockaddr to isc_sockaddr_t
2019-11-07 11:55:37 -08:00
Evan Hunt
949103c14f Merge branch '1308-fix-tcp-system-test' into 'master'
Fix "tcp" system test

Closes #1308

See merge request isc-projects/bind9!2549
2019-11-07 19:55:04 +00:00
Evan Hunt
18c9a20f32 make send_command wait for any result, rather than specifically result=OK 2019-11-07 11:32:59 -08:00
Michał Kępień
23ca0ec55b Address ShellCheck warnings
Address all outstanding warnings that ShellCheck reports for
bin/tests/system/tcp/tests.sh.
2019-11-07 11:31:57 -08:00
Michał Kępień
9841635b7f Use "set -e" in the "tcp" system test
Ensure any unexpected failure in the "tcp" system test causes it to be
immediately interrupted with an error to make the aforementioned test
more reliable.  Since the exit code for "expr 0 + 0" is 1, the status
variable needs to be updated using arithmetic expansion.
2019-11-07 11:31:57 -08:00