Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

linux-sandbox: "No such file or directory" error with TMPDIR under /tmp #23754

Closed
fmeum opened this issue Sep 25, 2024 · 1 comment
Closed

linux-sandbox: "No such file or directory" error with TMPDIR under /tmp #23754

fmeum opened this issue Sep 25, 2024 · 1 comment
Assignees
Labels
P1 I'll work on this now. (Assignee required) team-Local-Exec Issues and PRs for the Execution (Local) team type: bug

Comments

@fmeum
Copy link
Collaborator

fmeum commented Sep 25, 2024

          I also see this inside of a nix-shell, where `TMP` and `TMPDIR` is set to a dedicated temp directory from `/tmp/nix-shell.XXXXXX`.

Can you provide more detailed instructions for reproducing this? I'd need the exact command line.

I have been trying to reproduce with:

TMPDIR=/home/oquenchil/tmpdir USE_BAZEL_VERSION=7.1.0 bazelisk build --action_env=TMPDIR=/home/oquenchil/tmpdir --sandbox_debug :foo

I think you need to set TMPDIR to a directory inside /tmp to trigger the error. Since /tmp is mounted empty inside the sandbox, the given TMPDIR does not exist...

It works for me, when I use --noincompatible_sandbox_hermetic_tmp.

\edit: Oh, I came here from #5900. I don't see the permission denied error, but No such file or directory.

Originally posted by @avdv in #23217 (comment)

@fmeum fmeum self-assigned this Sep 25, 2024
@fmeum fmeum added P1 I'll work on this now. (Assignee required) type: bug team-Local-Exec Issues and PRs for the Execution (Local) team labels Sep 25, 2024
iancha1992 pushed a commit to iancha1992/bazel that referenced this issue Sep 27, 2024
Fixes bazelbuild#23754

Closes bazelbuild#23755.

PiperOrigin-RevId: 679472028
Change-Id: I0ea922ee6edf28c5643c6f2b524371f1d5405c9c
github-merge-queue bot pushed a commit that referenced this issue Oct 8, 2024
Fixes #23754

Closes #23755.

PiperOrigin-RevId: 679472028
Change-Id: I0ea922ee6edf28c5643c6f2b524371f1d5405c9c

Commit
765d5e0

Co-authored-by: Fabian Meumertzheim <fabian@meumertzhe.im>
@iancha1992
Copy link
Member

A fix for this issue has been included in Bazel 7.4.0 RC1. Please test out the release candidate and report any issues as soon as possible.
If you're using Bazelisk, you can point to the latest RC by setting USE_BAZEL_VERSION=7.4.0rc1. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P1 I'll work on this now. (Assignee required) team-Local-Exec Issues and PRs for the Execution (Local) team type: bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants