Repository navigation
bug: uv fails to install packages on docker based sandboxes with Cross-device link (os error 18) #1467
Copy link
Copy link
Closed as not planned
Closed as not planned
bug: uv fails to install packages on docker based sandboxes with Cross-device link (os error 18)#1467
Bug
Copy link
Labels
area:supervisorProxy and routing-path workProxy and routing-path workos:linuxIssue affects Linux hostsIssue affects Linux hostsstate:staleInactive item at risk of automatic closure.Inactive item at risk of automatic closure.test:e2eRequires end-to-end coverageRequires end-to-end coveragetopic:compatibilityCompatibility-related workCompatibility-related work
Description
Agent Diagnostic
- Loaded debug-openshell-cluster and openshell-cli skills
- Created diagnostic sandboxes with openshell sandbox create --name uv_diag_testX --no-keep
- Reproduced the failure: uv tool run cowsay fails with Cross-device link (os error 18) on every run
- Verified both paths (/sandbox/.cache/uv/.tmpXXXXXX and /sandbox/.cache/uv/archive-v0/) report the same device number (dev=56, overlayfs)
- Confirmed manual mv (which uses rename(2)) between the same directories succeeds without error
- Wrote and executed a Python script that calls renameat2(RENAME_NOREPLACE) directly on the same paths → confirmed it returns errno=18 (EXDEV)
- Root cause: uv uses renameat2(2) with the RENAME_NOREPLACE flag for atomic cache population. Linux kernel 5.15 overlayfs (used by Docker-backed sandboxes) returns EXDEV for renameat2(RENAME_NOREPLACE) when source and destination are in different subdirectories, even on the same device. Standard rename(2) works fine on the same paths.
- Gateway: local Docker driver, kernel 5.15.0-179-generic, uv 0.10.8
- No workaround found via UV_CACHE_DIR or TMPDIR — the issue is in uv's cache write path, not the cache location
Description
When creating a sandbox using the docker driver uv is not able to install packages. Based on the investigation this is related to EXDEV (errno 18, cross-device link error) error on overlayfs. This may be related to Landlock restriction as noted on this past PR #151
Reproduction Steps
- Run
openshell sandbox create --name 'uv_test_1' uv tool run cowsay- Get error:
sandbox@33cd2528853a:~$ uv tool run cowsay
x Failed to download `cowsay==6.1`
|-> Failed to read from the distribution cache
`-> failed to rename file from /sandbox/.cache/uv/.tmpKk67yS to /sandbox/.cache/uv/archive-v0/L6-C5kj-jfrluxzZ1YhlR: Cross-device link (os error 18)
Environment
- OS: Ubuntu 22.04
- Docker: version 29.1.3, build 29.1.3-0ubuntu3~22.04.2
- OpenShell: v.0.0.41
Logs
x Failed to download `cowsay==6.1`
|-> Failed to read from the distribution cache
`-> failed to rename file from /sandbox/.cache/uv/.tmpKk67yS to /sandbox/.cache/uv/archive-v0/L6-C5kj-jfrluxzZ1YhlR: Cross-device link (os error 18)Agent-First Checklist
- I pointed my agent at the repo and had it investigate this issue
- I loaded relevant skills (e.g.,
debug-openshell-cluster,debug-inference,openshell-cli) - My agent could not resolve this — the diagnostic above explains why
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area:supervisorProxy and routing-path workProxy and routing-path workos:linuxIssue affects Linux hostsIssue affects Linux hostsstate:staleInactive item at risk of automatic closure.Inactive item at risk of automatic closure.test:e2eRequires end-to-end coverageRequires end-to-end coveragetopic:compatibilityCompatibility-related workCompatibility-related work
Activity
[-]uv fails to install packages on docker based sandboxes with Cross-device link (os error 18)[/-][+]bug: uv fails to install packages on docker based sandboxes with Cross-device link (os error 18)[/+]TaylorMutch commentedon Jul 13, 2026
github-actions commentedon Aug 29, 2026
This issue has had no activity for 14 days and is now marked stale. It may be closed in 7 days if there is no further activity. Comment or remove the state:stale label to keep it open.
github-actions commentedon Oct 13, 2026
Closing this issue after 14 days with no activity since it was marked stale. Reopen it if the work is still relevant.