Cached tasks cannot spawn child processes inside a rootless bubblewrap sandbox (EPERM)
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 48/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- linux, rust
- Ambito
- operating-systems, security, tooling
Direzione di ricerca
Riproduci il malfunzionamento con il comando rootless di bubblewrap fornito e confronta i task memorizzati nella cache con quelli con la cache disabilitata usando vp run -r test. Inizia tracciando il percorso fspy_preload_unix e la configurazione dei processi figli; il lavoro è completato quando i task memorizzati nella cache possono essere avviati in questa sandbox, oppure quando il tracciamento degrada senza bloccare l’exec.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
Inside a rootless bubblewrap sandbox, a cache-enabled task cannot spawn child processes. Every spawn/spawnSync/execFile fails with EPERM before the child runs. Setting cache: false on the same task, with nothing else changed, makes it work.
The path is absolute and executable in both cases, so this is not PATH resolution.
Reproduction
Sandbox is entered as:
bwrap --die-with-parent --new-session \
--unshare-user --unshare-pid --unshare-ipc --unshare-uts --unshare-cgroup --unshare-net \
--cap-drop ALL \
--clearenv --setenv PATH /runtime/bin \
--ro-bind <toolchain-image> /runtime \
--tmpfs /tmp --dev /dev --proc /proc \
--bind <checkout> /workspace \
-- /runtime/bin/sh -c 'cd /workspace && vp run -r test'
There is no /usr/bin, /bin or /usr/lib in the sandbox; everything is under /runtime.
Any cached task whose command spawns a child reproduces it:
execFileSync("/tmp/shell/sh", ["-n"], { input: script });
| task config | spawn |
|---|---|
{ command: 'vp test' } |
EPERM |
{ command: 'vp test', cache: false } |
works |
In one vp run -r test over a workspace, the packages I had flipped to cache: false spawned fine while the packages still cached failed in the same run, same sandbox, same commit. Flipping two packages took the spawn failures from 74 to 0.
Observed
Error: spawnSync /tmp/shell/sh EPERM
Error: spawn EPERM
Nothing is printed by the child. git subprocesses fail the same way one level down:
fatal: cannot exec 'git-receive-pack': Operation not permitted
Environment
- vite-plus 0.3.0
- Linux x86_64, glibc
- rootless bubblewrap, seccomp, unprivileged user namespaces
Notes
Not #569/#576 — 0.3.0 has both. LD_PRELOAD is unset going in, so not #340.
Guess: fspy_preload_unix has to inject into each child, and this sandbox is --cap-drop ALL with /usr/lib unmounted, so either the preload object is unreachable in the child's mount namespace or something it does on init is denied — and the exec is refused instead of tracking degrading.
Falling back to caching without file tracking would be better than failing the spawn. Today the only workaround is disabling the cache for the whole package.
Happy to run patches or a debug build against the sandbox.
- Lingua principale
- Rust
- Stelle
- 466
- Fork
- 42
- Merge medio
- 2g 6h
- PR unite (30g)
- 30
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 voidzero-dev/vite-task
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
voidzero-dev/vite-task#738 · 1 commento ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 78/100
voidzero-dev/vite-task#719 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
voidzero-dev/vite-task#717 ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 78/100
voidzero-dev/vite-task#699 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 65/100
voidzero-dev/vite-task#692 ·
Tutte le issue di voidzero-dev/vite-task
Issue simili
-
bug github_actions
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
registrystack/registry-stack#1393 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
longbridge/gpui-kit#3223 ·
-
bug engine
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
rocky-data/rocky#2181 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
oasisprotocol/oasis-sdk#2523 ·
-
[indexer] [QA] Add a focused test for the new NonRetryableError / assertSocketAlive() behavior. Apertabot:ai-assisted component:indexer QA-roadmap status:untriaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
midnightntwrk/midnight-indexer#1557 ·