Repository navigation
ci: lower mmap_rnd_bits for address and thread sanitizer jobs - #957
Merged
viferga merged 2 commits intoNov 12, 2026
Merged
Conversation
ubuntu-latest moved to ubuntu-26.04, and its kernel uses more mmap random bits than the sanitizers support, so every thread sanitizer test dies at startup with "unexpected memory mapping". The setting belongs to the host kernel and docker containers can not change it, so set vm.mmap_rnd_bits=28 on the runner before the tests start. Only the GCC sanitizer jobs and the clang address and thread sanitizer jobs get it.
Check for the address and thread sanitizer entries explicitly, so a new entry added to the clang matrix does not get the sysctl by accident.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motive
The thread sanitizer jobs started failing on every test with "unexpected memory mapping".
ubuntu-latestmoved to ubuntu-26.04, and the newer kernel uses more mmap random bits than the sanitizers support. The last green run was still on 24.04.Approach
vm.mmap_rnd_bitsis a host kernel setting, and docker containers share the host kernel and can not write/proc/sys, so it can not go inmetacall-environment.sh. This adds a step that runssudo sysctl vm.mmap_rnd_bits=28on the runner before./docker-compose.sh:linux-sanitizer-test: always, since every entry is address or thread sanitizerlinux-clang-test: only forclang-address-sanitizerandclang-thread-sanitizer(named explicitly in theif)The memory sanitizer and valgrind jobs are unchanged. Scope agreed with @viferga on Discord: only when running with thread or address sanitizer.
Tests
Can not be run locally, the CI run on this PR is the test. The thread and address sanitizer jobs should get past startup again.
AI-ASSISTED: yes, model: Claude Opus 5.5, human reviewer: bhuvan-somisetty