This is an automated email from the ASF dual-hosted git repository.
apitrou pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow.git
The following commit(s) were added to refs/heads/main by this push:
new 5cd64e7d09 GH-40558: [C++][CI] Fix TSAN and ASAN/UBSAN crashes (#40559)
5cd64e7d09 is described below
commit 5cd64e7d0960d2c2a2815a73a5c61986fb7aec5a
Author: Antoine Pitrou <[email protected]>
AuthorDate: Thu Mar 14 22:48:14 2024 +0100
GH-40558: [C++][CI] Fix TSAN and ASAN/UBSAN crashes (#40559)
### Rationale for this change
A recent kernel update on some distributions (particularly Ubuntu) broke
sanitizers:
https://github.com/google/sanitizers/issues/1716
### What changes are included in this PR?
Apply recommended workaround by reducing the number of bits used by ASLR
(address space layout randomization).
### Are these changes tested?
Yes, they should fix the failing C++ sanitizer jobs.
### Are there any user-facing changes?
No.
* GitHub Issue: #40558
Authored-by: Antoine Pitrou <[email protected]>
Signed-off-by: Antoine Pitrou <[email protected]>
---
.github/workflows/cpp.yml | 2 ++
dev/tasks/docker-tests/github.linux.yml | 2 ++
2 files changed, 4 insertions(+)
diff --git a/.github/workflows/cpp.yml b/.github/workflows/cpp.yml
index a48b5aafab..3036d06d5d 100644
--- a/.github/workflows/cpp.yml
+++ b/.github/workflows/cpp.yml
@@ -145,6 +145,8 @@ jobs:
ARCHERY_DOCKER_USER: ${{ secrets.DOCKERHUB_USER }}
ARCHERY_DOCKER_PASSWORD: ${{ secrets.DOCKERHUB_TOKEN }}
run: |
+ # GH-40558: reduce ASLR to avoid ASAN/LSAN crashes
+ sudo sysctl -w vm.mmap_rnd_bits=28
sudo sysctl -w kernel.core_pattern="core.%e.%p"
ulimit -c unlimited
archery docker run ${{ matrix.image }}
diff --git a/dev/tasks/docker-tests/github.linux.yml
b/dev/tasks/docker-tests/github.linux.yml
index 9616863b3b..13e00abc70 100644
--- a/dev/tasks/docker-tests/github.linux.yml
+++ b/dev/tasks/docker-tests/github.linux.yml
@@ -35,6 +35,8 @@ jobs:
env:
{{ macros.github_set_sccache_envvars()|indent(8) }}
run: |
+ # GH-40558: reduce ASLR to avoid TSAN crashing
+ sudo sysctl -w vm.mmap_rnd_bits=28
archery docker run \
-e SETUPTOOLS_SCM_PRETEND_VERSION="{{ arrow.no_rc_version }}" \
{{ flags|default("") }} \