-
Notifications
You must be signed in to change notification settings - Fork 4.5k
incompatible_sandbox_hermetic_tmp #19915
Copy link
Copy link
Closed
Labels
breaking-change-7.0Incompatible flags to be flipped in Bazel 7.0Incompatible flags to be flipped in Bazel 7.0incompatible-changeIncompatible/breaking changeIncompatible/breaking changemigration-readyIncompatible flag is ready for migration with Bazel rolling releases or Bazel@last_greenIncompatible flag is ready for migration with Bazel rolling releases or Bazel@last_greenteam-Local-ExecIssues and PRs for the Execution (Local) teamIssues and PRs for the Execution (Local) teamtype: process
Metadata
Metadata
Assignees
Labels
breaking-change-7.0Incompatible flags to be flipped in Bazel 7.0Incompatible flags to be flipped in Bazel 7.0incompatible-changeIncompatible/breaking changeIncompatible/breaking changemigration-readyIncompatible flag is ready for migration with Bazel rolling releases or Bazel@last_greenIncompatible flag is ready for migration with Bazel rolling releases or Bazel@last_greenteam-Local-ExecIssues and PRs for the Execution (Local) teamIssues and PRs for the Execution (Local) teamtype: process
Historically, on Linux, Bazel mounted the host machine's
/tmpdirectory into each sandbox as/tmp. Since each sandbox maintains its own PID namespace, this causes problems with actions that create files in/tmpusing only the PID as a distinguishing element of the filename, e.g. well-known sockets.With
--incompatible_sandbox_hermetic_tmp, Bazel creates and later cleans up a dedicated, initially empty temporary directory for each sandboxed action on Linux.Migration:
If any actions in your build depend on access to the host's
/tmpdirectory, for example to exchange data with non-hermetic daemons running on the host, you can either temporarily disable this new behavior via--noincompatible_sandbox_hermetic_tmp(not recommended as the flag will be removed in the future) or explicitly mount the host temporary directory via--sandbox_add_mount_pair=/tmp.