Skip to content

[7.1.0] Sandbox error when building with Docker: Invalid cross-device link #21719

@grische

Description

@grische

Description of the bug:

When building two consecutive builds with Bazel inside a Docker container, the second build fails with:

#14 0.129 Starting local Bazel server and connecting to it...
#14 1.523 Computing main repo mapping: 
#14 2.333 Loading: 
#14 2.336 Loading: 0 packages loaded
#14 2.434 ERROR: Failed to initialize sandbox: /root/.cache/bazel/_bazel_root/20f0ced2adfccd482c7c7a0094d96fba/sandbox/_moved_trash_dir -> /root/.cache/bazel/_bazel_root/20f0ced2adfccd482c7c7a0094d96fba/sandbox/stale-trash-0 (Invalid cross-device link)
#14 2.453 INFO: Elapsed time: 2.303s
#14 2.454 INFO: 0 processes.
#14 2.454 ERROR: Build did NOT complete successfully

See https://github.com/freifunkMUC/wgkex/actions/runs/8317435033/job/22758237573

Which category does this issue belong to?

CLI

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

git clone https://github.com/freifunkMUC/wgkex.git
cd wgkex
git checkout b19e1473df04aa78a3355ad2c36f546e821cf79c
docker build -t wgkex -f Dockerfile .

Which operating system are you running Bazel on?

Ubuntu - Github Actions

What is the output of bazel info release?

release 7.1.0

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 ?

https://github.com/freifunkMUC/wgkex.git
b19e1473df04aa78a3355ad2c36f546e821cf79c

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

Yes, this regression first occurred in 7.1.0 and is not present in 7.0.2.

Have you found anything relevant by searching the web?

No response

Any other information, logs, or outputs that you want to share?

No response

Metadata

Metadata

Assignees

Labels

P1I'll work on this now. (Assignee required)team-Local-ExecIssues and PRs for the Execution (Local) teamtype: bug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions