Work around a TSAN issue with newer kernels

The ThreadSanitizer version currently available from Fedora 39
repositories is unable to cope with very high ASLR entropy, which is the
default in some recent Linux distributions [1].  This causes all
TSAN-enabled builds to fail on the affected systems with an error like:

    FATAL: ThreadSanitizer: unexpected memory mapping 0x7d00e0772000-0x7d00e0c00000

Work around the problem by reducing ASLR entropy for all TSAN-enabled
builds until the problem is resolved upstream.

[1] https://github.com/google/sanitizers/issues/1716
This commit is contained in:
Michał Kępień
2024-03-21 06:47:29 +01:00
parent ab441581b5
commit 05b09f2b5b

View File

@@ -308,6 +308,7 @@ stages:
<<: *default_triggering_rules
stage: build
before_script:
- sysctl vm.mmap_rnd_bits=28 || true # https://gitlab.isc.org/isc-projects/bind9/-/issues/4649
- test -w "${CCACHE_DIR}" && export PATH="/usr/lib/ccache:${PATH}"
- test -n "${OUT_OF_TREE_WORKSPACE}" && mkdir "${OUT_OF_TREE_WORKSPACE}" && cd "${OUT_OF_TREE_WORKSPACE}"
script:
@@ -366,6 +367,7 @@ stages:
<<: *default_triggering_rules
stage: system
before_script:
- sysctl vm.mmap_rnd_bits=28 || true # https://gitlab.isc.org/isc-projects/bind9/-/issues/4649
- test -n "${OUT_OF_TREE_WORKSPACE}" && cp -r bin/tests/system/* "${OUT_OF_TREE_WORKSPACE}/bin/tests/system/" && cd "${OUT_OF_TREE_WORKSPACE}"
- *setup_interfaces
script:
@@ -427,6 +429,7 @@ stages:
<<: *default_triggering_rules
stage: unit
before_script:
- sysctl vm.mmap_rnd_bits=28 || true # https://gitlab.isc.org/isc-projects/bind9/-/issues/4649
- test -n "${OUT_OF_TREE_WORKSPACE}" && cd "${OUT_OF_TREE_WORKSPACE}"
script:
- make -j${TEST_PARALLEL_JOBS:-1} -k unit V=1
@@ -475,6 +478,7 @@ stages:
.respdiff: &respdiff_job
stage: system
before_script:
- sysctl vm.mmap_rnd_bits=28 || true # https://gitlab.isc.org/isc-projects/bind9/-/issues/4649
- autoreconf -fi
- *configure
- make -j${BUILD_PARALLEL_JOBS:-1} V=1