Fix/bazel sandbox mount failure#24
Merged
Merged
Conversation
…onfiguring writable /dev/null and disabling directory reuse for tests
…s and synchronous cleanup
94c2ab4 to
7a1e4a3
Compare
…h) and fix /dev writable scope - Remove test:linux --sandbox_base=/tmp/bazel-sandbox: Bazel's linux-sandbox refuses to run when the sandbox working directory is below a tmpfs mount point (--sandbox_tmpfs_path=/tmp mounts tmpfs at /tmp, wiping sandbox dirs). - Change --sandbox_writable_path=/dev/null to --sandbox_writable_path=/dev: writable_path only works on directories, not individual device nodes. - Simplify purge_sandbox_dirs() back to single output_base/sandbox location.
- Install libc++-dev and libc++abi-dev alongside clang/lld in setup - Configure MSan to use -stdlib=libc++ (MSan runtime has interceptors for libc++ but not libstdc++, eliminating false positives) - Enable MSan tests by default (no longer gated behind RUN_MSAN=1) - MSan targets: warm_worker_pool_test, dynamic_worker_coordinator_test (sandbox_test excluded: spawns uninstrumented subprocesses; tsan_checker excluded: TSan-specific canary) - Update test summary to include MSan in pass/fail reporting
…eck) The LLVM install block is skipped when clang is already present, so libc++ was never installed on subsequent runs. Add a dedicated install step (like the sanitizer runtime headers) that always runs.
Three infrastructure fixes for dcodex-setup.sh --test: 1. /dev/null read-only: Remove --sandbox_add_mount_pair=/dev/null which created a separate read-only bind mount overriding the writable /dev directory. --sandbox_writable_path=/dev alone provides /dev/null as a read-write bind mount. 2. MSan 'absolute path inclusion' build error: Add --spawn_strategy=standalone to MSan config. -stdlib=libc++ pulls headers from /usr/lib/llvm-19/ include/c++/v1/ which are not in Bazel's auto-detected cxx_builtin_include_directories (detected with libstdc++). Standalone bypasses the sandbox include validator, which is appropriate since MSan inherently depends on system-installed libc++. Also gate MSan tests behind RUN_MSAN=1 in dcodex-setup.sh since system libc++ is not MSan-instrumented (false positives in googletest/abseil internals). 3. TSan sandbox collisions: Lower --local_test_jobs from 10 to 4. With --runs_per_test=20, sandbox cleanup cannot keep pace at higher concurrency, causing 'Could not copy inputs into sandbox (File exists)' errors.
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.
No description provided.