Skip to content

Lower ASLR entropy on CI runners so ThreadSanitizer can run - #238

Merged
ahcorde merged 1 commit into
rollingfrom
mjcarroll/tsan-aslr-entropy
Nov 2, 2026
Merged

ahcorde merged 1 commit into
rollingfrom
mjcarroll/tsan-aslr-entropy

Conversation

@mjcarroll

@mjcarroll mjcarroll commented Nov 2, 2026 •

Copy link
Copy Markdown
Member

The Thread Sanitizer CI job currently fails on every PR, before any test code runs:

FATAL: ThreadSanitizer: encountered an incompatible memory layout but was unable to disable ASLR (perhaps sandboxing is enabled?).
FATAL: Please rerun with lower ASLR entropy, ASLR disabled, and/or sandboxing disabled.
-- run_test.py: return code 66

The ubuntu-latest runner kernel defaults to vm.mmap_rnd_bits=32, which is incompatible with TSan's memory layout. industrial_ci runs in a container that shares the host kernel, so this adds a step that lowers it to 28 on the host before industrial_ci runs.

The Thread Sanitizer job aborts every TSan-instrumented test with
"FATAL: ThreadSanitizer: encountered an incompatible memory layout but was
unable to disable ASLR" because the ubuntu-latest runner kernel defaults to
vm.mmap_rnd_bits=32. The industrial_ci container shares the host kernel, so
lower the entropy on the host before running it.

Signed-off-by: Michael Carroll <mjcarroll.oss@gmail.com>
@ahcorde
ahcorde merged commit 4595ec2 into rolling Nov 2, 2026
4 checks passed
@ahcorde
ahcorde deleted the mjcarroll/tsan-aslr-entropy branch November 2, 2026 19:00
@ahcorde

ahcorde commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

https://github.com/Mergifyio backport lyrical kilted jazzy humble

ahcorde pushed a commit that referenced this pull request Nov 3, 2026
The Thread Sanitizer job aborts every TSan-instrumented test with
"FATAL: ThreadSanitizer: encountered an incompatible memory layout but was
unable to disable ASLR" because the ubuntu-latest runner kernel defaults to
vm.mmap_rnd_bits=32. The industrial_ci container shares the host kernel, so
lower the entropy on the host before running it.

Signed-off-by: Michael Carroll <mjcarroll.oss@gmail.com>
ahcorde added a commit that referenced this pull request Nov 3, 2026
)

The Thread Sanitizer job aborts every TSan-instrumented test with
"FATAL: ThreadSanitizer: encountered an incompatible memory layout but was
unable to disable ASLR" because the ubuntu-latest runner kernel defaults to
vm.mmap_rnd_bits=32. The industrial_ci container shares the host kernel, so
lower the entropy on the host before running it.

Signed-off-by: Michael Carroll <mjcarroll.oss@gmail.com>
Co-authored-by: Michael Carroll <mjcarroll.oss@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants