Skip to content

Fix/bazel sandbox mount failure#24

Merged
Sam-Si merged 7 commits into
mainfrom
fix/bazel-sandbox-mount-failure
May 27, 2026
Merged

Fix/bazel sandbox mount failure#24
Sam-Si merged 7 commits into
mainfrom
fix/bazel-sandbox-mount-failure

Conversation

@Sam-Si

@Sam-Si Sam-Si commented May 16, 2026

Copy link
Copy Markdown
Owner

No description provided.

Sam-Si added 2 commits May 16, 2026 20:04
…onfiguring writable /dev/null and disabling directory reuse for tests
@Sam-Si Sam-Si force-pushed the fix/bazel-sandbox-mount-failure branch from 94c2ab4 to 7a1e4a3 Compare May 16, 2026 14:35
Sam-Si added 5 commits May 16, 2026 20:14
…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.
@Sam-Si Sam-Si merged commit 695a27a into main May 27, 2026
3 checks passed
@Sam-Si Sam-Si deleted the fix/bazel-sandbox-mount-failure branch May 27, 2026 03:37
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.

1 participant