Images with 60 or more layers fail to start: "mount …/rootfs: No such file or directory"
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 35/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- docker, linux, rust
- Área
- backend, operating-systems
Línea de trabajo
Start with mount_rootfs in crates/kiri-init/src/linux/container.rs and inspect how it builds overlayfs mount options. The report identifies the 4 KiB mount option limit and says the Linux engine needs a fallback for older kernels; it also describes a branch that uses the newer mount API and a test mounting 120 layers. Done means the 60 layer repro starts, the 120 layer test passes, and older Linux kernels retain the fallback.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Kiri version and system
0.2.1 built from the v0.2.1 tag (0.2.0 release does the same) on macOS 27.2 (Apple silicon)
What you did
I hit this with nixos/nix, which has 69 layers. Here's a smaller repro:
mkdir layers65 && cd layers65
{ echo "FROM alpine:3.22"; for i in $(seq 1 64); do echo "RUN echo $i > /layer-$i"; done; } > Dockerfile
docker build -t layers65 .
docker run --rm layers65 cat /layer-64
and
docker run --rm nixos/nix:2.34.9 nix --version
What happened
docker: Error response from daemon: run <id>: mount /var/lib/kiri/containers/<id>/rootfs: No such file or directory (os error 2)
What you expected instead
The container starts. Both work on Docker and OrbStack.
Anything else
It's exactly at 60: with 59 layers (alpine plus 58 RUN lines) the image
starts, with 60 it doesn't.
I think it's the mount options getting too long. mount_rootfs
(crates/kiri-init/src/linux/container.rs:406) puts every layer in one
lowerdir= string, and each layer is a 64-character hash, so about 65
bytes per layer. mount(2) only copies one page (4 KiB) of options, so
around 60 layers the string gets cut off in the middle of a name and
overlayfs can't find that directory.
The guest kernel is 6.18, so the newer mount API can take each layer
separately with lowerdir+ (6.8 and later), which goes up to overlayfs's
own limit of 500. I've got that working on a branch, with a fallback to
the current mount(2) call for older kernels on the Linux engine and a
test that mounts 120 layers. nixos/nix runs with it. Happy to open a PR
if you'd like it done that way.
- Lenguaje dominante
- Rust
- Estrellas
- 7.5k
- Forks
- 329
- Merge medio
- 7 h 48 min
- PR fusionados (30 d)
- 105
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
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 libracoder/kiri
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
libracoder/kiri#364 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
libracoder/kiri#289 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 4/5 3-5 días Aptitud para principiantes 47/100
libracoder/kiri#365 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 35/100
libracoder/kiri#362 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 3/5 1-2 días Aptitud para principiantes 47/100
libracoder/kiri#359 ·
Los mantenedores suelen responder en 1 día
Todos los issues de libracoder/kiri
Issues similares
-
benchmark-review
Dificultad 2/5 1-3 horas Aptitud para principiantes 63/100
Los mantenedores suelen responder en 1 día
-
area:filesystem bug need-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
Captions panel does not offer to show an existing transcriptPosiblemente ocupada @thedavidweng la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
CapSoftware/Cap#4276 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
matrix-org/matrix-rust-sdk#7495 ·
Los mantenedores suelen responder en 1 día