bug(vm): per-sandbox Unix socket paths exceed macOS sun_path limit
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 55/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- macos, rust
- Ambito
- backend, operating-systems
Direzione di ricerca
Parti dalla costruzione del percorso del socket per sandbox del driver di calcolo VM e riproduci il fallimento di bind su macOS usando il state_dir predefinito. Traccia come vengono create e ripristinate le directory delle sandbox, quindi verifica che i percorsi rivisti rimangano entro il limite di macOS, preservino discovery e persistenza e lascino invariato run/compute-driver.sock.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
User Story
As a developer running the VM compute driver on macOS, I want per-sandbox Unix socket paths to fit within the OS sun_path limit so that sandbox creation does not fail with a socket bind error.
Problem Statement
The VM driver constructs per-sandbox Unix socket paths by joining {state_dir}/sandboxes/{sandbox_id}/{socket_name}. Sandbox IDs are UUID v4 strings (36 chars), and state_dir depends on the user's home directory. On macOS, struct sockaddr_un.sun_path is 104 bytes (103 usable). With the default state_dir (~/.local/state/openshell/vm-driver), the resulting socket path reaches 107 bytes — 3 bytes over the limit — and bind() fails.
/Users/benoitf/.local/state/openshell/vm-driver/sandboxes/3eb2ad45-bead-4c2e-bd10-1a4a7f3a2721/control.sock
└─────────────────────────────────── 107 bytes ──────────────────────────────────────┘
Path length breakdown:
/Users/benoitf/.local/state/openshell/vm-driver (47)
/sandboxes/ (11)
3eb2ad45-bead-4c2e-bd10-1a4a7f3a2721 (36)
/control.sock (13)
total = 107 bytes
macOS limit = 104 bytes
over by 3 bytes
Impact / Why This Matters
When this happens, VM sandbox creation fails at the control socket bind step. The error surfaces as a low-level socket error, not as a clear path-length diagnostic.
The current workaround is to manually configure a short state_dir (e.g. /tmp/os-vm). or rename control.sock for ctl.sock for my case (as I reduced 3 extra chars)
This is non-obvious, fragile, and breaks persistence expectations. Any user whose home directory path is longer than /Users/benoitf (15 chars) would be even further over the limit.
Linux is less affected (108-byte limit) but not immune with deep state directories or longer usernames.
Acceptance Criteria
- Per-sandbox Unix socket paths fit within 103 usable bytes on macOS for any reasonable
state_dir - The fix does not break sandbox state directory layout or persistence/restore
- Existing sandbox directories remain discoverable (sandbox ID must still be recoverable from the filesystem)
- The gateway compute-driver socket path (
run/compute-driver.sock) remains unaffected
Reproduction Steps
- On macOS, start the gateway with
--compute-driver vmusing the defaultstate_dir(~/.local/state/openshell/vm-driver) - Run
openshell sandbox create --name test --from ubuntu:24.04 - Observe the sandbox creation fails at the control socket bind
Environment
- OpenShell: development build (current main branch)
- OS: macOS (Apple Silicon) —
sun_pathis 104 bytes - Runtime: VM compute driver (libkrun)
Logs
Error: bind() failed for /Users/benoitf/.local/state/openshell/vm-driver/sandboxes/3eb2ad45-bead-4c2e-bd10-1a4a7f3a2721/control.sock
- Lingua principale
- Rust
- Stelle
- 8.7k
- Fork
- 1.3k
- Merge medio
- 2g 8h
- PR unite (30g)
- 271
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di NVIDIA/OpenShell
-
area:docs
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
-
state:triage-needed
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
-
area:cli state:validated
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
-
state:triage-needed
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
-
area:build spike state:review-ready state:stale
Difficoltà 2/5 Mezza giornata Idoneità per principianti 68/100
Tutte le issue di NVIDIA/OpenShell
Issue simili
-
Browser (wasm) relay client cannot connect to relays whose URL has a trailing-dot FQDN hostname Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
n0-computer/iroh#4550 ·
-
impl detach for native Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
paritytech/zombienet-sdk#591 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
farion1231/cc-switch#7638 · 1 commento ·
-
onnx-ir re-exports ModelProto and GraphProto but not NodeProto, AttributeProto and AttributeType Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100