From d22b0337f4b98a2c58a48824469de5f1260c3c2f Mon Sep 17 00:00:00 2001 From: Remi Gacogne Date: Mon, 12 Dec 2022 15:42:57 +0100 Subject: [PATCH] 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`. --- .github/workflows/build-and-test-all.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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: -- 2.47.2