Commit graph

32344 commits

Author SHA1 Message Date
Michal Nowak
58a8873228 Merge branch 'mnowak/add-fedora-33-v9_16' into 'v9_16'
[v9_16] Add Fedora 33

See merge request isc-projects/bind9!4327
2020-10-29 15:18:42 +00:00
Michal Nowak
91e28d1fb4
Add Fedora 33
(cherry picked from commit 914be61ff8c5a3e0395acd980486c1b4cd656d20)
2020-10-29 14:00:19 +01:00
Ondřej Surý
02bdaa48fe Merge branch '2227-tcp-connection-closed-fix-v9_16' into 'v9_16'
Resolve "BIND 9.16.8 assertion failure"

See merge request isc-projects/bind9!4324
2020-10-29 12:51:38 +00:00
Witold Kręcicki
0f1810efb2 Add CHANGES and release note for GL #2227
(cherry picked from commit cd3117b747)
2020-10-29 13:23:25 +01:00
Witold Kręcicki
e1c75d00b7 Properly handle outer TCP connection closed in TCPDNS.
If the connection is closed while we're processing the request
we might access TCPDNS outerhandle which is already reset. Check
for this condition and call the callback with ISC_R_CANCELED result.

(cherry picked from commit c41ce8e0c9)
2020-10-29 13:21:55 +01:00
Evan Hunt
0ba073a1b8 Merge branch 'each-rpz-test-typo-v9_16' into 'v9_16'
fix a typo in rpz test

See merge request isc-projects/bind9!4321
2020-10-29 06:15:14 +00:00
Evan Hunt
bc9a1b0b2d fix a typo in rpz test
"tcp-only" was not being tested correctly in the RPZ system test
because the option to the "digcmd" function that causes queries to
be sent via TCP was misspelled in one case, and was being interpreted
as a query name.

the "ckresult" function has also been changed to be case sensitive
for consistency with "digcmd".

(cherry picked from commit 78af071c11)
2020-10-28 22:38:55 -07:00
Michal Nowak
f2a228d2fa Merge branch 'mnowak/test-coverage-visualization-v9_16' into 'v9_16'
Enable Test Coverage Visualization for merge requests

See merge request isc-projects/bind9!4314
2020-10-27 14:57:36 +00:00
Michal Nowak
2c9892ed1d
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).

(cherry picked from commit 2dabf328c4)
2020-10-27 15:57:06 +01:00
Michal Nowak
93efe7685c Merge branch 'mnowak/enhanced-test-portability-v9_16' into 'v9_16'
[v9_16] POSIX compatibility fixes to system test

See merge request isc-projects/bind9!4311
2020-10-27 14:25:34 +00:00
Michal Nowak
175f03f5db
Replace a seq invocation with a shell loop
seq is not portable.  Use a while loop instead to make the "dnssec"
system test script POSIX-compatible.

(cherry picked from commit c0c4c024c6)
2020-10-27 12:26:03 +01:00
Michal Nowak
3e937a8c7c
Get rid of bashisms in string comparisons
The double equal sign ('==') is a Bash-specific string comparison
operator.  Ensure the single equal sign ('=') is used in all POSIX shell
scripts in the system test suite in order to retain their portability.

(cherry picked from commit 481dfb9671)
2020-10-27 12:26:03 +01:00
Michal Nowak
fee71478c5 Merge branch 'mnowak/add-stress-test-to-CI-v9_16' into 'v9_16'
[v9_16] Add "stress" tests to GitLab CI

See merge request isc-projects/bind9!4307
2020-10-26 17:11:56 +00:00
Michal Nowak
06f721fdc5
Add "stress" tests to GitLab CI
Run "stress" tests for scheduled pipelines and pipelines created for
tags.  These tests were previously only performed manually (as part of
pre-release testing of each new BIND version).  Their purpose is to
detect memory leaks and potential performance issues.

As the run time of each "stress" test itself is set to 1 hour, set the
GitLab CI job timeout to 2 hours in order to account for the extra time
needed to set the test up and gather its results.

(cherry picked from commit 39305411e8)
2020-10-26 18:04:53 +01:00
Michal Nowak
8643bc7a7a Merge branch 'mnowak/openbsd-fix-gdb-in-system-test-v9_16' into 'v9_16'
[v9_16] Fix system test backtrace generation on OpenBSD

See merge request isc-projects/bind9!4304
2020-10-26 15:58:13 +00:00
Michal Nowak
659feff963
Fix system test backtrace generation on OpenBSD
On Linux core dump contains absolute path to crashed binary

    Core was generated by `/home/newman/isc/ws/bind9/bin/named/.libs/lt-named -D glue-ns1 -X named.lock -m'.

However, on OpenBSD there's only a basename

    Core was generated by `named'.

This commit adds support for the latter, retains the former.

(cherry picked from commit f0b13873a3)
2020-10-26 15:01:52 +01:00
Mark Andrews
e657199696 Merge branch '2226-tsan-error-in-dispatch-c-v9_16' into 'v9_16'
Hold qid->lock when calling deref_portentry() as

See merge request isc-projects/bind9!4302
2020-10-23 20:56:48 +00:00
Mark Andrews
2a5d2c55aa Hold qid->lock when calling deref_portentry() as
socket_search() need portentry to be unchanging.

    WARNING: ThreadSanitizer: data race
    Write of size 8 at 0x000000000001 by thread T1 (mutexes: write M1):
    #0 deref_portentry lib/dns/dispatch.c:630
    #1 deactivate_dispsocket lib/dns/dispatch.c:861
    #2 udp_recv lib/dns/dispatch.c:1105
    #3 udp_exrecv lib/dns/dispatch.c:1028
    #4 dispatch lib/isc/task.c:1152
    #5 run lib/isc/task.c:1344
    #6 <null> <null>

    Previous read of size 8 at 0x000000000001 by thread T2 (mutexes: write M1, write M2):
    #0 socket_search lib/dns/dispatch.c:661
    #1 get_dispsocket lib/dns/dispatch.c:744
    #2 dns_dispatch_addresponse lib/dns/dispatch.c:3120
    #3 resquery_send lib/dns/resolver.c:2467
    #4 fctx_query lib/dns/resolver.c:2217
    #5 fctx_try lib/dns/resolver.c:4245
    #6 fctx_timeout lib/dns/resolver.c:4570
    #7 dispatch lib/isc/task.c:1152
    #8 run lib/isc/task.c:1344
    #9 <null> <null>

(cherry picked from commit 5c253c416d)
2020-10-24 07:14:47 +11:00
Mark Andrews
0a5ab32400 Merge branch '2215-dns_zoneflag_noixfr-is-misnamed-v9_16' into 'v9_16'
DNS_ZONEFLAG_NOIXFR should be DNS_ZONEFLG_NOIXFR

See merge request isc-projects/bind9!4300
2020-10-23 13:53:25 +00:00
Mark Andrews
2e264a4ae2 DNS_ZONEFLAG_NOIXFR should be DNS_ZONEFLG_NOIXFR
(cherry picked from commit 3a044444bd)
2020-10-24 00:26:25 +11:00
Evan Hunt
dd9e8a313b Merge branch '2221-netmgr-fixes-from-unit-testing-v9_16' into 'v9_16'
Fix the problems found when writing the unit test for netmgr

See merge request isc-projects/bind9!4294
2020-10-22 22:53:04 +00:00
Evan Hunt
b252fd5fd8 CHANGES
(cherry picked from commit 58a0e95976)
2020-10-22 15:01:12 -07:00
Ondřej Surý
bca8604bf3 Fix the data race when read-writing sock->active by using cmpxchg
(cherry picked from commit 8797e5efd5)
2020-10-22 15:00:07 -07:00
Ondřej Surý
74378ea4f4 Ignore and don't log ISC_R_NOTCONNECTED from uv_accept()
When client disconnects before the connection can be accepted, the named
would log a spurious log message:

    error: Accepting TCP connection failed: socket is not connected

We now ignore the ISC_R_NOTCONNECTED result code and log only other
errors

(cherry picked from commit 5ef71c420f)
2020-10-22 15:00:07 -07:00
Ondřej Surý
301e4145de Fix the isc_nm_closedown() to actually close the pending connections
1. The isc__nm_tcp_send() and isc__nm_tcp_read() was not checking
   whether the socket was still alive and scheduling reads/sends on
   closed socket.

2. The isc_nm_read(), isc_nm_send() and isc_nm_resumeread() have been
   changed to always return the error conditions via the callbacks, so
   they always succeed.  This applies to all protocols (UDP, TCP and
   TCPDNS).

(cherry picked from commit f7c82e406e)
2020-10-22 15:00:00 -07:00
Ondřej Surý
5547657bce Fix the way tcp_send_direct() is used
There were two problems how tcp_send_direct() was used:

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

2. In isc__nm_tcp_send(), when the TCP send is already in the right
   netthread, it uses tcp_send_direct() to send the TCP 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.

(cherry picked from commit 6af08d1ca6)
2020-10-22 14:59:01 -07:00
Ondřej Surý
e0ebd02b9c Detach the sock->server in uv_close() callback, not before
(cherry picked from commit d72bc3eb52)
2020-10-22 14:59:01 -07:00
Ondřej Surý
e18f3fd003 Explicitly stop reading before closing the nmtcpsocket
When closing the socket that is actively reading from the stream, the
read_cb() could be called between uv_close() and close callback when the
server socket has been already detached hence using sock->statichandle
after it has been already freed.

(cherry picked from commit 97b33e5bde)
2020-10-22 14:59:01 -07:00
Witold Kręcicki
63e923364f Proper handling of socket references in case of TCP conn failure.
(cherry picked from commit ff0a336d52)
2020-10-22 14:59:00 -07:00
Witold Kręcicki
b4e27a075a 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.

(cherry picked from commit ae9a6befa8)
2020-10-22 14:59:00 -07:00
Ondřej Surý
81085bbeca 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.

(cherry picked from commit afca2e3b21)
2020-10-22 14:59:00 -07:00
Michal Nowak
970e1821cc Merge branch '2218-ensure-use-of-echo_i-where-possible-in-system-tests-v9_16' into 'v9_16'
[v9_16] Ensure use of "echo_i" where possible

See merge request isc-projects/bind9!4290
2020-10-22 10:50:27 +00:00
Michal Nowak
47862fc559
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 12:15:15 +02:00
Michał Kępień
216273c73b Merge branch 'v9_16_8-release' into 'v9_16'
Merge 9.16.8 release branch

See merge request isc-projects/bind9!4288
2020-10-22 07:16:08 +00:00
Michał Kępień
09b9dffd46 Set up release notes for BIND 9.16.9 2020-10-22 09:14:31 +02:00
Michał Kępień
f8c9f78684 Bump BIND_BASELINE_VERSION for ABI checks 2020-10-22 09:14:31 +02:00
Michał Kępień
3f28a134cf Bump BIND_BASELINE_VERSION for respdiff tests 2020-10-22 09:14:31 +02:00
Tinderbox User
48760b31f5 Merge branch 'prep-release' into v9_16_8-release 2020-10-22 09:09:07 +02:00
Michał Kępień
b8b7b55f3f Merge branch 'michal/prepare-release-notes-for-bind-9.16.8' into 'v9_16_8-release'
Prepare release notes for BIND 9.16.8

See merge request isc-private/bind9!217
2020-10-22 09:09:07 +02:00
Tinderbox User
44e91206a4 prep 9.16.8 2020-10-22 09:09:07 +02:00
Michał Kępień
a38a76d455 Prepare release notes for BIND 9.16.8 2020-10-22 09:09:07 +02:00
Michał Kępień
7adc616d7e Reorder release notes 2020-10-22 09:09:07 +02:00
Michał Kępień
92d513c235 Tweak and reword release notes 2020-10-22 09:09:07 +02:00
Michał Kępień
df8fd53b0f Tweak and reword recent CHANGES entries 2020-10-22 09:09:07 +02:00
Michał Kępień
6cf77e7c26 Minor ARM formatting tweak 2020-10-22 09:09:07 +02:00
Diego dos Santos Fronza
7280362005 Merge branch '1736-stub-zone-foiled-by-minimal-responses-v9_16' into 'v9_16'
Resolve "stub zone foiled by minimal-responses"

See merge request isc-projects/bind9!4282
2020-10-21 17:41:57 +00:00
Diego Fronza
34f1196f36 Add CHANGES entry 2020-10-21 14:04:43 -03:00
Diego Fronza
be98c78802 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:12:57 -03:00
Diego Fronza
69e6bea835 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:12:36 -03:00
Diego Fronza
d5355b8105 Always return address records in additional section for NS queries 2020-10-21 12:12:22 -03:00