2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 06:25:31 +00:00
Commit Graph

32718 Commits

Author SHA1 Message Date
Witold Kręcicki
ae9a6befa8 Don't crash if isc_uv_export returns an error in accept_connection.
isc_uv_export can return an error - e.g. EMFILE (from dup), handle this
nicely.
2020-10-22 11:37:16 -07:00
Ondřej Surý
afca2e3b21 Fix the way udp_send_direct() is used
There were two problems how udp_send_direct() was used:

1. The udp_send_direct() can return ISC_R_CANCELED (or translated error
   from uv_udp_send()), but the isc__nm_async_udpsend() wasn't checking
   the error code and not releasing the uvreq in case of an error.

2. In isc__nm_udp_send(), when the UDP send is already in the right
   netthread, it uses udp_send_direct() to send the UDP packet right
   away.  When that happened the uvreq was not freed, and the error code
   was returned to the caller.  We need to return ISC_R_SUCCESS and
   rather use the callback to report an error in such case.
2020-10-22 11:37:16 -07:00
Michal Nowak
417632ebba Merge branch 'mnowak/test-coverage-visualization' into 'main'
Enable Test Coverage Visualization in merge requests

See merge request isc-projects/bind9!3875
2020-10-22 12:47:15 +00:00
Michal Nowak
2dabf328c4 Enable Test Coverage Visualization for merge requests
This feature allows GitLab to visualize test coverage information in the
file diff view of merge requests.

This commit makes the gcov CI job depend on the following chain of jobs:

    gcc:buster:amd64 → unit:gcc:buster:amd64 → system:gcc:buster:amd64

The reason for running the last two jobs above sequentially rather than
in parallel is that both of them create *.gcda files (containing
coverage data) in the same locations.  While some way of merging these
files from different job artifact archives could probably be designed
with the help of additional tools, the simplest thing to do is not to
run unit test and system test jobs in parallel, carrying *.gcda files
over between jobs as gcov knows how to append coverage data to existing
*.gcda files.

Also note that test coverage will not be visualized if any of the jobs
in the above dependency chain fails (because the gcov job will not be
run).
2020-10-22 14:46:23 +02:00
Michal Nowak
8d5a7cb0dc Merge branch '2060-identify-unused-source-files-via-gcov-ci-job' into 'main'
Resolve "Identify unused source files via gcov CI job"

Closes #2060

See merge request isc-projects/bind9!4261
2020-10-22 11:29:04 +00:00
Michal Nowak
c453b79a7c Add CHANGES entry 2020-10-22 13:12:16 +02:00
Michal Nowak
7ef268bb4b Drop unused bufferlist code 2020-10-22 13:11:16 +02:00
Michal Nowak
1f6f7ccad6 Drop unused portlist code 2020-10-22 13:11:16 +02:00
Michal Nowak
e67737aa75 Drop unused dbtable code 2020-10-22 13:11:16 +02:00
Michal Nowak
e40097559a Merge branch '2218-ensure-use-of-echo_i-where-possible-in-system-tests' into 'main'
Ensure use of "echo_i" where possible

Closes #2218

See merge request isc-projects/bind9!4268
2020-10-22 08:16:41 +00:00
Michal Nowak
1319875c46 Ensure use of "echo_i" where possible
In many instances 'echo "I:' construct was used where echo_i function
should have been.
2020-10-22 09:54:24 +02:00
Michał Kępień
beb3ad5494 Merge branch 'v9_17_6-release' into 'main'
Merge 9.17.6 release branch

See merge request isc-projects/bind9!4287
2020-10-22 07:02:41 +00:00
Michał Kępień
3e007be912 Set up release notes for BIND 9.17.7 2020-10-22 08:58:55 +02:00
Michał Kępień
ca7096fd18 Bump BIND_BASELINE_VERSION for ABI checks 2020-10-22 08:58:55 +02:00
Michał Kępień
fadaf3393d Bump BIND_BASELINE_VERSION for respdiff tests 2020-10-22 08:58:55 +02:00
Michał Kępień
58d8c52b09 Update BIND version to 9.17.6 2020-10-22 08:54:32 +02:00
Michał Kępień
b054318491 Add a CHANGES marker 2020-10-22 08:54:32 +02:00
Michał Kępień
9014ff0cc6 Update library API versions 2020-10-22 08:54:32 +02:00
Michał Kępień
3916f81b1e Merge branch 'michal/prepare-release-notes-for-bind-9.17.6' into 'v9_17_6-release'
Prepare release notes for BIND 9.17.6

See merge request isc-private/bind9!214
2020-10-22 08:54:32 +02:00
Michał Kępień
2291356b08 Prepare release notes for BIND 9.17.6 2020-10-22 08:54:32 +02:00
Michał Kępień
ef3bd208aa Reorder release notes 2020-10-22 08:54:32 +02:00
Michał Kępień
65f88149de Tweak and reword release notes 2020-10-22 08:54:32 +02:00
Michał Kępień
88cb988cc3 Restore release note for GL #2146 2020-10-22 08:54:32 +02:00
Michał Kępień
35fe33b7d9 Tweak and reword recent CHANGES entries 2020-10-22 08:54:32 +02:00
Michał Kępień
43beb080fc Minor documentation formatting tweaks 2020-10-22 08:54:32 +02:00
Diego dos Santos Fronza
e64e3322a6 Merge branch '1736-stub-zone-foiled-by-minimal-responses' into 'main'
Resolve "stub zone foiled by minimal-responses"

Closes #1736

See merge request isc-projects/bind9!4113
2020-10-21 15:06:04 +00:00
Diego Fronza
6026cea10c Add CHANGES entry 2020-10-21 12:03:42 -03:00
Diego Fronza
8f5545fa0b Adjusted additional system test (NS, non-root zone)
After the updates from this branch, BIND now sends glue records for
NS queries even when configured with minimal-responses yes.
2020-10-21 12:03:42 -03:00
Diego Fronza
b0f61f92b3 Added test for the proposed fix
This test is very simple, two nameserver instances are created:
    - ns4: master, with 'minimal-responses yes', authoritative
        for example. zone
    - ns5: slave, stub zone

The first thing verified is the transfer of zone data from master
to slave, which should be saved in ns5/example.db.

After that, a query is issued to ns5 asking for target.example.
TXT, a record present in the master database with the "test" string
as content.

If that query works, it means stub zone successfully request
nameserver addresses from master, ns4.example. A/AAAA

The presence of both A/AAAA records for ns4 is also verified in the
stub zone local file, ns5/example.db.
2020-10-21 12:03:42 -03:00
Diego Fronza
d727eaae6c Always return address records in additional section for NS queries 2020-10-21 12:03:42 -03:00
Diego Fronza
1cee557993 Fix transfer of glue records in stub zones if master has minimal-responses set
Stub zones don't make use of AXFR/IXFR for the transfering of zone
data, instead, a single query is issued to the master asking for
their nameserver records (NS).

That works fine unless master is configured with 'minimal-responses'
set to yes, in which case glue records are not provided by master
in the answer with nameservers authoritative for the zone, leaving
stub zones with incomplete databases.

This commit fix this problem in a simple way, when the answer with
the authoritative nameservers is received from master (stub_callback),
for each nameserver listed (save_nsrrset), a A and AAAA records for
the name is verified in the additional section, and if not present
a query is created to resolve the corresponsing missing glue.

A struct 'stub_cb_args' was added to keep relevant information for
performing a query, like TSIG key, udp size, dscp value, etc, this
information is borrowed from, and created within function 'ns_query',
where the resolving of nameserver from master starts.

A new field was added to the struct 'dns_stub', an atomic integer,
namely pending_requests, which is used to keep how many queries are
created when resolving nameserver addresses that were missing in
the glue.

When the value of pending_requests is zero we know we can release
resources, adjust zone timers, dump to zone file, etc.
2020-10-21 12:03:42 -03:00
Michal Nowak
803d12d430 Merge branch '1490-run-unit-tests-on-openbsd-in-ci' into 'main'
Add OpenBSD unit tests to CI

Closes #1490

See merge request isc-projects/bind9!4269
2020-10-21 11:15:23 +00:00
Michal Nowak
cf7db2003b Run unit tests on OpenBSD in GitLab CI
Unlike other maintained BIND branches, the "main" BIND branch does not
require Kyua for running unit tests, which has been an obstacle for
adding an OpenBSD unit test job to GitLab CI.  Experiments show that a
complete BIND unit test suite completes in a few minutes on OpenBSD and
that unit tests are not as severely affected by OpenBSD performance
issues as system tests are.  Add a GitLab CI job which runs unit tests
on OpenBSD to every pipeline.
2020-10-21 13:06:52 +02:00
Diego dos Santos Fronza
ef050228f7 Merge branch '2195-freebsd-dnstap-system-test-failure' into 'main'
Resolve "FreeBSD dnstap system test failure"

Closes #2195

See merge request isc-projects/bind9!4213
2020-10-20 13:20:04 +00:00
Diego Fronza
d934513c42 Fix dnstap system test on FreeBSD
This commit ensures that dnstap output files captured
by fstrm_capture are properly flushed before any attempt
on reading them with dnstap-read is done.

By reading fstrm-capture source code it was noticed that
signal SIGHUP is used to flush the capture file.
2020-10-20 10:18:28 -03:00
Matthijs Mekking
7350c7555d Merge branch '2208-tcp4recverr-stat-miscount' into 'main'
Don't increment network error stats on UV_EOF

Closes #2208

See merge request isc-projects/bind9!4274
2020-10-20 11:57:35 +00:00
Matthijs Mekking
6c5ff94218 Don't increment network error stats on UV_EOF
When networking statistics was added to the netmgr (in commit
5234a8e00a), two lines were added that
increment the 'STATID_RECVFAIL' statistic: One if 'uv_read_start'
fails and one at the end of the 'read_cb'.  The latter happens
if 'nread < 0'.

According to the libuv documentation, I/O read callbacks (such as for
files and sockets) are passed a parameter 'nread'. If 'nread' is less
than 0, there was an error and 'UV_EOF' is the end of file error, which
you may want to handle differently.

In other words, we should not treat EOF as a RECVFAIL error.
2020-10-20 10:57:16 +02:00
Mark Andrews
a63ac933bb Merge branch 'marka-fix-not-enough-categories' into 'main'
Tune the minimum number of expected categories.

See merge request isc-projects/bind9!4216
2020-10-15 01:02:49 +00:00
Mark Andrews
0abb49034e Drop the expected minimum number of buckets to 4.
The previous value of 5 produced too many false errors.
2020-10-15 00:40:14 +00:00
Mark Andrews
1a4a7f4671 Merge branch 'marka-rrl-mdig-burst' into 'main'
Try to improve rrl timing

See merge request isc-projects/bind9!4126
2020-10-15 00:37:59 +00:00
Mark Andrews
92cdc7b6c7 Try to improve rrl timing
Add a +burst option to mdig so that we have a second to setup the
mdig calls then they run at the start of the next second.

RRL uses 'queries in a second' as a approximation to
'queries per second'. Getting the bursts of traffic to all happen in
the same second should prevent false negatives in the system test.

We now have a second to setup the traffic in.  Then the traffic should
be sent at the start of the next second.  If that still fails we
should move to +burst=<now+2> (further extend mdig) instead of the
implicit <now+1> as the trigger second.
2020-10-15 00:05:12 +00:00
Mark Andrews
3562cc7c89 Merge branch '2209-tsan-error-bin-named-controlconf-c-related' into 'main'
Resolve "TSAN error bin/named/controlconf.c related."

Closes #2209

See merge request isc-projects/bind9!4257
2020-10-15 00:01:36 +00:00
Mark Andrews
f95ba8aa20 Complete the isc_nmhandle_detach() in the worker thread.
isc_nmhandle_detach() needs to complete in the same thread
as shutdown_walk_cb() to avoid a race.  Clear the caller's
pointer then pass control to the worker if necessary.

    WARNING: ThreadSanitizer: data race
    Write of size 8 at 0x000000000001 by thread T1:
    #0 isc_nmhandle_detach lib/isc/netmgr/netmgr.c:1258:15
    #1 control_command bin/named/controlconf.c:388:3
    #2 dispatch lib/isc/task.c:1152:7
    #3 run lib/isc/task.c:1344:2

    Previous read of size 8 at 0x000000000001 by thread T2:
    #0 isc_nm_pauseread lib/isc/netmgr/netmgr.c:1449:33
    #1 recv_data lib/isccc/ccmsg.c:109:2
    #2 isc__nm_tcp_shutdown lib/isc/netmgr/tcp.c:1157:4
    #3 shutdown_walk_cb lib/isc/netmgr/netmgr.c:1515:3
    #4 uv_walk <null>
    #5 process_queue lib/isc/netmgr/netmgr.c:659:4
    #6 process_normal_queue lib/isc/netmgr/netmgr.c:582:10
    #7 process_queues lib/isc/netmgr/netmgr.c:590:8
    #8 async_cb lib/isc/netmgr/netmgr.c:548:2
    #9 <null> <null>
2020-10-12 17:51:09 +11:00
Ondřej Surý
8c4cf5d2e5 Merge branch 'ondrej/little-socket-fixes' into 'main'
Various little fixes in the old socket code

See merge request isc-projects/bind9!4253
2020-10-08 07:02:15 +00:00
Ondřej Surý
96ac91a18a Clean the last remnant of ISC_PLATFORM_HAVEIPV6 macro
In set_sndbuf() we were using ISC_PLATFORM_HAVEIPV6 macro that doesn't
exist anymore, because we assume that IPv6 support is always available.
2020-10-08 08:28:33 +02:00
Ondřej Surý
1672e851c8 Always set the DF flag (not only when CMSG is available)
By mistake, we were setting the DF flag only when CMSG was available for
said platform.
2020-10-08 08:28:14 +02:00
Ondřej Surý
442a45966a Merge branch 'ondrej/clean-netmgr-callback-locks' into 'main'
Clean the locking around nm callbacks

See merge request isc-projects/bind9!4220
2020-10-08 05:42:39 +00:00
Ondřej Surý
e8b56acb49 Clone the csock in accept_connection(), not in callback
If we clone the csock (children socket) in TCP accept_connection()
instead of passing the ssock (server socket) to the call back and
cloning it there we unbreak the assumption that every socket is handled
inside it's own worker thread and therefore we can get rid of (at least)
callback locking.
2020-10-08 07:24:31 +02:00
Ondřej Surý
d86a74d8a4 Change the isc__nm_tcpdns_stoplistening() to be asynchronous event
The isc__nm_tcpdns_stoplistening() would call isc__nmsocket_clearcb()
that would clear the .accept_cb from non-netmgr thread.  Change the
tcpdns_stoplistening to enqueue ievent that would get processed in the
right netmgr thread to avoid locking.
2020-10-08 07:24:31 +02:00
Mark Andrews
fe0a62654c Merge branch '2204-investigate-pipeline-system-test-failure' into 'main'
Resolve "Investigate pipeline system test failure"

Closes #2204

See merge request isc-projects/bind9!4247
2020-10-08 05:21:52 +00:00