Skip to content

Commit

Permalink
doc: new solution for know issue (nvcc filesystem race condition) (#216)
Browse files Browse the repository at this point in the history
With --incompatible_sandbox_hermetic_tmp, Bazel creates and later cleans up a dedicated, initially empty temporary directory for each sandboxed action on Linux.

bazelbuild/bazel#19915
  • Loading branch information
hofbi authored Jan 31, 2024
1 parent 0b9254f commit df39ff3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ The problem is caused by nvcc use PID to determine temporary file name, and with

To avoid it:

- Update to Bazel 7 where `--incompatible_sandbox_hermetic_tmp` is enabled by default.
- Use `--spawn_strategy local` should eliminate the case because it will let nvcc sees the true PIDs.
- Use `--experimental_use_hermetic_linux_sandbox` should eliminate the case because it will avoid the sharing of `/tmp`.
- Add `-objtemp` option to the command should reduce the case from happening.

0 comments on commit df39ff3

Please sign in to comment.