Parallel image loads from docker compose build fail with "No such file or directory (os error 2)"

Aperta
#756 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
22/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
docker, docker-compose, rust
Ambito
devtools

Direzione di ricerca

The failure is in the image-load path when several BuildKit tarballs are sent to the engine at once, so the relevant code is in the Rust runtime's image import and tarball handling, not in the Compose side. Reproduce with a project of many services sharing one Dockerfile and look for a temporary file that is removed or not yet written when the parallel load reads it. Done means parallel loads of all services succeed in one run, with a test that exercises concurrent imports.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Summary

When docker compose build builds many images in parallel, BuildKit sends all the image tarballs to the engine at about the same time. One of the loads fails with:

ERROR: rpc error: code = Unknown desc = Error response from daemon: No such file or directory (os error 2)

Building the same services one at a time (docker compose build <service> in a loop) succeeds every time.

Environment

  • Kiri 0.2.1 (engine 27.5.1, API 1.47), macOS 26.4, Apple silicon (arm64)
  • Docker CLI 29.9.2, Docker Compose 5.6.1, buildx 0.38.1

Steps to reproduce

  1. Use a Compose project with about 13 services that each build their own image (most share one Dockerfile).
  2. Run docker compose build (parallel build, default settings).

What happens

  • All 13 images reach exporting to docker image format → sending tarball together (each takes about 30 s).
  • One of them (a different service on different runs) fails with the error above, and the build stops.
  • Setting COMPOSE_BAKE=false or COMPOSE_PARALLEL_LIMIT did not help.

Build log excerpt:

#53 [audio-worker] exporting to docker image format
#53 exporting layers 13.2s done
#53 exporting manifest sha256:abbfa98b... 0.0s done
#53 exporting config sha256:73a2dec5... 0.1s done
#53 sending tarball 30.5s done
#53 ERROR: rpc error: code = Unknown desc = Error response from daemon: No such file or directory (os error 2)
target audio-worker: failed to solve: rpc error: code = Unknown desc = Error response from daemon: No such file or directory (os error 2)

Expected

Parallel image loads succeed, as they do when the images are loaded one at a time.

Workaround

Build services one by one: for s in $(docker compose config --services); do docker compose build "$s"; done

Lingua principale
Rust
Stelle
7.5k
Fork
329
Merge medio
15h 49m
PR unite (30g)
241

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di libracoder/kiri

Tutte le issue di libracoder/kiri

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.