1. 30 Oct, 2020 8 commits
    • Michał Kępień's avatar
      Merge branch 'mnowak/OpenBSD_6.8-v9_11' into 'v9_11' · 11c7cc84
      Michał Kępień authored
      [v9_11] Update to OpenBSD 6.8
      See merge request !4337
    • Michal Nowak's avatar
      Update to OpenBSD 6.8 · 9379beb2
      Michal Nowak authored
      (cherry picked from commit 773649f4)
    • Michał Kępień's avatar
      Merge branch '2231-miscellaneous-backtrace-fixes-v9_11' into 'v9_11' · 27d1b5f3
      Michał Kępień authored
      [v9_11] Miscellaneous backtrace fixes
      See merge request !4335
    • Michał Kępień's avatar
      Fix getrbp() · 7f13c427
      Michał Kępień authored
      The following compiler warning is emitted for the BACKTRACE_X86STACK
      part of lib/isc/backtrace.c:
          backtrace.c: In function ‘getrbp’:
          backtrace.c:139:1: warning: no return statement in function returning non-void [-Wreturn-type]
      While getrbp() stores the value of the RBP register in the RAX register
      and thus does attempt to return a value, this is not enough for an
      optimizing compiler to always produce the expected result.  With -O2,
      the following machine code may be generated in isc_backtrace_gettrace():
          0x00007ffff7b0ff7a <+10>:	mov    %rbp,%rax
          0x00007ffff7b0ff7d <+13>:	mov    $0x17,%eax
          0x00007ffff7b0ff82 <+18>:	retq
      The above is equivalent to:
          sp = (void **)getrbp();
          return (ISC_R_NOTFOUND);
      and results in the backtrace never getting printed.
      Fix by using an intermediate variable.  With this change in place, the
      machine code generated with -O2 becomes something like:
          0x00007ffff7af5638 <+24>:	mov    $0x17,%eax
          0x00007ffff7af563d <+29>:	mov    %rbp,%rdx
          0x00007ffff7af5640 <+32>:	test   %rdx,%rdx
          0x00007ffff7af5643 <+35>:	je     0x7ffff7af56bd <isc_backtrace_gettrace+157>
          0x00007ffff7af56bd <+157>:	retq
      (Note that this method of grabbing a stack trace is finicky anyway
      because in order for RBP to be relied upon, -fno-omit-stack-frame must
      be present among CFLAGS.)
      (cherry picked from commit 923c4433)
    • Michał Kępień's avatar
      Check for _Unwind_Backtrace() support · a51cde6c
      Michał Kępień authored
      Some operating systems (e.g. Linux, FreeBSD) provide the
      _Unwind_Backtrace() function in libgcc_s.so, which is automatically
      linked into any binary using the functions provided by that library.  On
      OpenBSD, though, _Unwind_Backtrace() is provided by libc++abi.so, which
      is not automatically linked into binaries produced by the stock system C
      Meanwhile, lib/isc/backtrace.c assumes that any GNU-compatible toolchain
      allows _Unwind_Backtrace() to be used without any extra provisions in
      the build system.  This causes build failures on OpenBSD (and possibly
      other systems).
      Instead of making assumptions, actually check for _Unwind_Backtrace()
      support in the toolchain if the backtrace() function is unavailable.
      (cherry picked from commit 10d70557)
    • Michał Kępień's avatar
      Merge branch '2228-fix-the-make-depend-check-in-gitlab-ci-v9_11' into 'v9_11' · c5d38c7a
      Michał Kępień authored
      [v9_11] Fix the "make depend" check in GitLab CI
      See merge request !4334
    • Michał Kępień's avatar
      Do not test "make depend" for out-of-tree builds · e10eb578
      Michał Kępień authored
      The make/mkdep script does not understand the concept of generated
      source files (like lib/dns/dnstap.pb-c.c), which prevents it from
      working correctly for out-of-tree builds.  As "make depend" is not
      required for building BIND and the "depend" make target was removed
      altogether in the development branch, just prevent the "make depend"
      check from being performed for out-of-tree builds in GitLab CI instead
      of trying to add support for handling generated source files to
      (cherry picked from commit 1b5a8a91)
    • Michał Kępień's avatar
      Fix the "make depend" check in GitLab CI · f1045036
      Michał Kępień authored
      "make depend" prints errors to stderr, not to stdout.  This means that
      the check for "make depend" errors currently used in the definition of
      every build job in GitLab CI could never fail.  Fix that check by
      redirecting stderr to stdout.  Also employ tee to prevent the output of
      "make depend" from being hidden in the job log.  (While using tee hides
      the exit code of "make depend" itself, the next line still checks for
      errors anyway.)
      (cherry picked from commit 0ab099ca)
  2. 29 Oct, 2020 10 commits
  3. 28 Oct, 2020 2 commits
  4. 27 Oct, 2020 2 commits
    • Michal Nowak's avatar
      Merge branch 'mnowak/test-coverage-visualization-v9_11' into 'v9_11' · 37dc2e05
      Michal Nowak authored
      [v9_11] Enable Test Coverage Visualization for merge requests
      See merge request !4315
    • Michal Nowak's avatar
      Enable Test Coverage Visualization for merge requests · 4cb5c300
      Michal Nowak authored
      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
      (cherry picked from commit 2dabf328)
  5. 26 Oct, 2020 11 commits
    • Michal Nowak's avatar
      Merge branch 'mnowak/add-stress-test-to-CI-v9_11' into 'v9_11' · d456de2b
      Michal Nowak authored
      [v9_11] Add "stress" tests to GitLab CI
      See merge request !4308
    • Michal Nowak's avatar
      Add "stress" tests to GitLab CI · a0c0af64
      Michal Nowak authored
      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 39305411)
      (cherry picked from commit 06f721fd)
    • Michal Nowak's avatar
      Merge branch 'mnowak/openbsd-fix-gdb-in-system-test-v9_11' into 'v9_11' · d9ed1a85
      Michal Nowak authored
      [v9_11] Fix system test backtrace generation on OpenBSD
      See merge request !4305
    • Michal Nowak's avatar
      Fix system test backtrace generation on OpenBSD · 523050f0
      Michal Nowak authored
      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 f0b13873)
      (cherry picked from commit 659feff9)
    • Diego dos Santos Fronza's avatar
      Merge branch '1736-stub-zone-foiled-by-minimal-responses-v9_11' into 'v9_11' · c679913c
      Diego dos Santos Fronza authored
      Resolve "stub zone foiled by minimal-responses"
      See merge request !4284
    • Diego dos Santos Fronza's avatar
      Update copyrights · 29043867
      Diego dos Santos Fronza authored
    • Diego dos Santos Fronza's avatar
      Add CHANGES entry · 9772ebe8
      Diego dos Santos Fronza authored
    • Diego dos Santos Fronza's avatar
      Adjusted additional system test (NS, non-root zone) · 4fef8acb
      Diego dos Santos Fronza authored
      After the updates from this branch, BIND now sends glue records for
      NS queries even when configured with minimal-responses yes.
    • Diego dos Santos Fronza's avatar
      Added test for the proposed fix · acef95ce
      Diego dos Santos Fronza authored
      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.
    • Diego dos Santos Fronza's avatar
    • Diego dos Santos Fronza's avatar
      Fix transfer of glue records in stub zones if master has minimal-responses set · 6b97de38
      Diego dos Santos Fronza authored
      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.
  6. 23 Oct, 2020 4 commits
  7. 22 Oct, 2020 3 commits