reuse_sandbox_directories, experimental_sandbox_async_tree_delete_idle_threads may lead to Permission denied
when test case creates a 0-bit directory
#25351
Labels
awaiting-user-response
Awaiting a response from the author
team-Local-Exec
Issues and PRs for the Execution (Local) team
type: bug
untriaged
Description of the bug:
I'm upgrading our workspace from Bazel 7.4.0 to Bazel 8.1.0. My
bazel test
commands are quick to fail at random. Error messages mentionPermission denied
when trying to asynchronously clean up (or reuse?) sandbox trees.It looks like one of our tests is misbehaving by creating a directory named
TestDir-new
at the root of its working directory (as opposed to beneathTEST_TMPDIR
) w/ a mode of 0 (no read/write/execute bits).Before I discovered that
TestDir-new
came from our code, I was flailing around toggling flags, and I was able to mitigate this with either of the following:--experimental_sandbox_async_tree_delete_idle_threads=0
--noreuse_sandbox_directories
While this can be chalked up to user error, I'm still filing this only because we only encountered this failure mode when both of these features were enabled together. (At the very least, any other user encountering the same problem may find this report and infer an appropriate local fix.)
Which category does this issue belong to?
Local Execution
What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
I'm not entirely sure. Best guess:
reuse_sandbox_directories
andexperimental_sandbox_async_tree_delete_idle_threads
are both exercised.foo
beneath its current working directory w/ permissions of 0o000.Which operating system are you running Bazel on?
Linux
What is the output of
bazel info release
?release 8.1.0-vmware
If
bazel info release
returnsdevelopment version
or(@non-git)
, tell us how you built Bazel.No response
What's the output of
git remote get-url origin; git rev-parse HEAD
?If this is a regression, please try to identify the Bazel commit where the bug was introduced with bazelisk --bisect.
No response
Have you found anything relevant by searching the web?
No response
Any other information, logs, or outputs that you want to share?
No response
The text was updated successfully, but these errors were encountered: