Cached tasks cannot spawn child processes inside a rootless bubblewrap sandbox (EPERM)
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 48/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- linux, rust
- Área
- operating-systems, security, tooling
Línea de trabajo
Reproduce el fallo con el comando rootless de bubblewrap proporcionado y compara las tareas en caché con las tareas con la caché deshabilitada usando vp run -r test. Empieza siguiendo el trazado de la ruta fspy_preload_unix y la configuración de los procesos hijo; la tarea estará terminada cuando las tareas en caché puedan iniciarse en este sandbox, o cuando el seguimiento se degrade sin bloquear el exec.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- Rust
- Estrellas
- 466
- Forks
- 42
- Merge medio
- 1 d 20 h
- PR fusionados (30 d)
- 21
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de voidzero-dev/vite-task
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
voidzero-dev/vite-task#738 · 1 comentario ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 78/100
voidzero-dev/vite-task#719 ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
voidzero-dev/vite-task#717 ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 68/100
voidzero-dev/vite-task#702 ·
-
fspy_preload_unix: execl with 32+ arguments aborts on an out-of-bounds NULL terminator write Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 78/100
voidzero-dev/vite-task#699 ·
Todos los issues de voidzero-dev/vite-task
Issues similares
-
risk:low runtime status:in-progress type:test
Dificultad 1/5 Menos de una hora Aptitud para principiantes 92/100
zeroclaw-labs/zeroclaw#11023 ·
-
good first issue refactor
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
EricSpencer00/Resilient#4835 · 1 comentario ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
bisq-network/bisq-musig#204 ·
-
agent:ready documentation
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
cesarferreira/stax#890 ·