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

Sandbox warning with --sandbox_base=/dev/shm #22502

Open
keith opened this issue May 22, 2024 · 0 comments
Open

Sandbox warning with --sandbox_base=/dev/shm #22502

keith opened this issue May 22, 2024 · 0 comments
Assignees
Labels
team-Local-Exec Issues and PRs for the Execution (Local) team type: bug

Comments

@keith
Copy link
Member

keith commented May 22, 2024

Description of the bug:

Sometimes when building with --sandbox_base=/dev/shm bazel prints this warning and dumps this stack trace:

WARNING: Failed to delete contents of sandbox /dev/shm/bazel-sandbox.0e1a1ab7e0ac17d9ec65fd5f1326e721c44bc1407fc751caa1af1fbd44d8a849: java.io.IOException: /dev/shm/bazel-sandbox.0e1a1ab7e0ac17d9ec65fd5f1326e721c44bc1407fc751caa1af1fbd44d8a849/linux-sandbox/10828 -> /home/ubuntu/.cache/bazel/_bazel_ubuntu/a8246705211370f9a29d0c6e94adcf5a/sandbox/_moved_trash_dir/70069 (Invalid cross-device link)
FATAL: bazel crashed due to an internal error. Printing stack trace:
java.lang.IllegalStateException: Found unexpected files in sandbox base. Please report this in https://github.com/bazelbuild/bazel/issues.
        at com.google.common.base.Preconditions.checkState(Preconditions.java:512)
        at com.google.devtools.build.lib.sandbox.SandboxModule.checkSandboxBaseTopOnlyContainsPersistentDirs(SandboxModule.java:529)
        at com.google.devtools.build.lib.sandbox.SandboxModule.afterCommand(SandboxModule.java:572)
        at com.google.devtools.build.lib.runtime.BlazeRuntime.afterCommand(BlazeRuntime.java:627)
        at com.google.devtools.build.lib.runtime.BlazeCommandDispatcher.execExclusively(BlazeCommandDispatcher.java:688)
        at com.google.devtools.build.lib.runtime.BlazeCommandDispatcher.exec(BlazeCommandDispatcher.java:244)
        at com.google.devtools.build.lib.server.GrpcServerImpl.executeCommand(GrpcServerImpl.java:573)
        at com.google.devtools.build.lib.server.GrpcServerImpl.lambda$run$1(GrpcServerImpl.java:644)
        at io.grpc.Context$1.run(Context.java:566)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.base/java.lang.Thread.run(Unknown Source)

I don't have the case right now but I don't actually think it crashed fatally here like the error suggests, I think it was just noise. It looks like a similar case was fixed here #21733 but we're using 7.1.1 and I'm still seeing this, I assume the fix made it a warning but not an error

Which category does this issue belong to?

No response

What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

No response

Which operating system are you running Bazel on?

Linux

What is the output of bazel info release?

7.1.1

If bazel info release returns development 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 ?

No response

Is this a regression? If yes, please try to identify the Bazel commit where the bug was introduced.

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

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

No branches or pull requests

6 participants