Skip to content

Commit

Permalink
GH-40558: [C++][CI] Fix TSAN and ASAN/UBSAN crashes (#40559)
Browse files Browse the repository at this point in the history
### Rationale for this change

A recent kernel update on some distributions (particularly Ubuntu) broke sanitizers:
google/sanitizers#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 <antoine@python.org>
Signed-off-by: Antoine Pitrou <antoine@python.org>
  • Loading branch information
pitrou committed Mar 14, 2024
1 parent 4c8eff2 commit 5cd64e7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/cpp.yml
Expand Up @@ -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 }}
Expand Down
2 changes: 2 additions & 0 deletions dev/tasks/docker-tests/github.linux.yml
Expand Up @@ -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("") }} \
Expand Down

0 comments on commit 5cd64e7

Please sign in to comment.