From: Remi Gacogne Date: Mon, 12 Dec 2022 14:42:57 +0000 (+0100) Subject: dnsdist: Disable the send wrappers in our CI X-Git-Tag: dnsdist-1.8.0-rc1~167^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F12316%2Fhead;p=thirdparty%2Fpdns.git dnsdist: Disable the send wrappers in our CI The way the send wrappers are implemented, reading the data _after_ it has been sent, cause them to report a data race that does not exist with existing implementations: - we call `send()` from thread 1 to send a query to a backend, never touching the data or associated metadata again from that thread - we get a response from the backend in a different thread, thread 2, which will then access the metadata and sometimes (truncated UDP answers following a DoH query) even modify the data itself - ASAN and TSAN complain because the wrapper might still be reading the data after the UDP datagram has been sent, which is effectively a race, but it does not really make any sense for an actual implementation of `send()` to do that. We work around that by disabling the `send()` wrappers in our CI, for the dnsdist regression tests only, via `intercept_send=0`. --- diff --git a/.github/workflows/build-and-test-all.yml b/.github/workflows/build-and-test-all.yml index 3c90ed7d2c..c90344246d 100644 --- a/.github/workflows/build-and-test-all.yml +++ b/.github/workflows/build-and-test-all.yml @@ -368,8 +368,9 @@ jobs: sanitizers: [ubsan+asan, tsan] env: UBSAN_OPTIONS: "print_stacktrace=1:halt_on_error=1:suppressions=${{ github.workspace }}/build-scripts/UBSan.supp" - ASAN_OPTIONS: detect_leaks=0 - TSAN_OPTIONS: "halt_on_error=1:suppressions=${{ github.workspace }}/pdns/dnsdistdist/dnsdist-tsan.supp" + # Disabling (intercept_send=0) the custom send wrappers for ASAN and TSAN because they cause the tools to report a race that doesn't exist on actual implementations of send(), see https://github.com/google/sanitizers/issues/1498 + ASAN_OPTIONS: detect_leaks=0:intercept_send=0 + TSAN_OPTIONS: "halt_on_error=1:intercept_send=0:suppressions=${{ github.workspace }}/pdns/dnsdistdist/dnsdist-tsan.supp" # IncludeDir tests are disabled because of a weird interaction between TSAN and these tests which ever only happens on GH actions SKIP_INCLUDEDIR_TESTS: yes steps: