You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] building w/ compose bake always results in NotFound desc = no such job xxxxxxxxx errors #3486
I don't have a minimal reproduction scenario at this point, but we've tried to switch to compose bake as the build engine for our existing docker compose project for a while and we always get the same type of error coming from a random container.
The errors look as follows:
08:43:09 docker/compose#141 exporting layers 0.4s done
08:43:12 target some-container: failed to receive status: rpc error: code = NotFound desc = no such job xxxxe8yk4gxypivxclixworqh
We've tried all docker compose versions since the feature is available (including 2.37.1 from a day ago) and all of them produce the same results.
Any idea what it could be or how we can help diagnose it?
Steps To Reproduce
enable bake as the build engine w/ COMPOSE_BAKE=true
build a previously working project w/ docker compose build --with-dependencies <A LIST OF CONTAINERS>
see it error out on an arbitrary container with the following error: target some-container: failed to receive status: rpc error: code = NotFound desc = no such job xxxxe8yk4gxypivxclixworqh
Please run docker compose build <...args> --print and capture output into a bake.json file
Then run docker buildx bake -f bake.json to double check this same error applies when directly running bake.
I'm concerned about the deprecation (and subsequent removal) of the legacy build engine when the bake build engine is still completely unusable for us.
Sadly I don't have a minimal repro, our project is a complex project with over 120 containers which makes it incredibly difficult and time consuming to anonymize.
Additionally, the issue seems to be a race condition that only occurs under certain circumstances, since I was never able to reproduce it successfully in my local environment. It does occur quite consistently in our CI executions though where the project is built before the actual execution of tests.
Ouput of docker buildx inspect as requested:
Name: default
Driver: docker
Last Activity: 2025-10-24 14:52:09 +0000 UTC
Nodes:
Name: default
Endpoint: default
Status: running
BuildKit version: v0.25.1
Platforms: linux/amd64, linux/amd64/v2, linux/amd64/v3, linux/amd64/v4, linux/386
Labels:
org.mobyproject.buildkit.worker.moby.host-gateway-ip: 172.17.0.1
GC Policy rule#0:
All: false
Filters: type==source.local,type==exec.cachemount,type==source.git.checkout
Keep Duration: 48h0m0s
Max Used Space: 2.059GiB
GC Policy rule#1:
All: false
Keep Duration: 1440h0m0s
Reserved Space: 14.9GiB
Max Used Space: 117.3GiB
Min Free Space: 29.8GiB
GC Policy rule#2:
All: false
Reserved Space: 14.9GiB
Max Used Space: 117.3GiB
Min Free Space: 29.8GiB
GC Policy rule#3:
All: true
Reserved Space: 14.9GiB
Max Used Space: 117.3GiB
Min Free Space: 29.8GiB
FWIW I've asked AI 🙈 to theorize about a possible cause, here's what I got as a reply:
Based on the provided stack trace and the complexity of the Docker Compose project, here is a hypothesis for the root cause of the error.
Hypothesis: Premature Build Job Termination due to a Race Condition Under High Load
The error message NotFound: forwarding Ping: no such job indicates that the docker buildx client sent a keep-alive "Ping" for a specific build job, but the BuildKit daemon (part of dockerd)
no longer had any record of that job. This points to a race condition where the build job was terminated on the daemon side while the client still believed it was running.
Here is the likely sequence of events:
1. High Parallelism: The docker buildx bake command attempts to build the numerous services defined across your two docker-compose.yml files. By default, it runs many of these builds in
parallel to maximize speed.
2. Resource Contention: Your project is exceptionally large, with dozens of services, many of which have complex dependencies (depends_on) and are built from source. This high degree of
parallelism likely causes extreme resource contention on the host machine, leading to CPU saturation, memory exhaustion (OOM), or I/O bottlenecks.
3. Job Termination: Under this heavy load, a specific build job (uz44bf3z90k09tbt9clzlqpcc) is prematurely and unexpectedly terminated. This could be due to:
* The system's Out-Of-Memory (OOM) killer terminating the process.
* An internal timeout within the BuildKit scheduler, which gives up on an unresponsive build process.
* A crash within the specific build container itself due to the stressful conditions.
4. State Desynchronization (The Race Condition): The BuildKit daemon registers the termination and cleans up the job's resources, removing it from its list of active builds. However, the
buildx client is not immediately notified of this termination.
5. Failed Ping: The client, operating with a stale state, sends a routine gRPC Ping request to the daemon to check on the status of the job it thinks is still active.
6. Error Response: The daemon, having already removed the job from its records, cannot find it and correctly responds with the NotFound: no such job error, causing the entire bake process to
fail.
In essence, the massive scale and complexity of your Docker Compose project create a high-stress environment that exposes a gap between a build job failing on the daemon and the client
being notified, leading to this specific error.
I think that 2. and 3. are good points and worth investigating, especially considering this only seems to be consistently reproducible for us in our CI environment.
I'm wondering if there's a way to limit parallelism in docker bake to potentially mitigate the situation. I know it's possible to do it in docker compose, but I couldn't find anything specific to bake.
Let me know if there's anything else I can do to help pin this down. 🙏
Activity
ndeloof commentedon Jun 13, 2025
Please run
docker compose build <...args> --printand capture output into abake.jsonfileThen run
docker buildx bake -f bake.jsonto double check this same error applies when directly running bake.nocive commentedon Jun 17, 2025
@ndeloof thanks for the guidance.
And yes, the same error occurs when directly running bake.
nocive commentedon Jun 17, 2025
With debug enabled, I get the following additional (and potentially useful) output:
ndeloof commentedon Jun 17, 2025
cc @crazy-max
crazy-max commentedon Jun 17, 2025
Can you give a minimal repro with Dockerfile(s) and Compose file?
Also what's the output of
docker infonocive commentedon Jun 17, 2025
Not really, not at this point.
We're only able to reproduce this with our project (which I sadly can't share) and in our CI environments.
ndeloof commentedon Jul 8, 2025
@crazy-max can you please transfert this issue to buildx repository ?
nocive commentedon Aug 15, 2025
Issue persists with latest version at the time of writing (2.39.2).
nocive commentedon Oct 24, 2025
Error persists in newer docker versions, here's an updated stack trace from docker 28.4.0:
nocive commentedon Oct 24, 2025
@ndeloof @thaJeztah is there something else that can be done to raise attention to this? Is there an issue on docker side where this is being tracked?
I'm concerned about the deprecation (and subsequent removal) of the legacy build engine when the bake build engine is still completely unusable for us.
ndeloof commentedon Oct 24, 2025
This is a buildx issue. @crazy-max can you please transfert to buildx repo?
crazy-max commentedon Oct 24, 2025
@ndeloof Don't have perms to transfer
@nocive Do you have a minimal repro? Can you also show the output of
docker buildx inspect?ndeloof commentedon Oct 24, 2025
@crazy-max I gave you RW permission
nocive commentedon Oct 24, 2025
@crazy-max
Sadly I don't have a minimal repro, our project is a complex project with over 120 containers which makes it incredibly difficult and time consuming to anonymize.
Additionally, the issue seems to be a race condition that only occurs under certain circumstances, since I was never able to reproduce it successfully in my local environment. It does occur quite consistently in our CI executions though where the project is built before the actual execution of tests.
Ouput of
docker buildx inspectas requested:nocive commentedon Oct 29, 2025
FWIW I've asked AI 🙈 to theorize about a possible cause, here's what I got as a reply:
I think that 2. and 3. are good points and worth investigating, especially considering this only seems to be consistently reproducible for us in our CI environment.
I'm wondering if there's a way to limit parallelism in docker bake to potentially mitigate the situation. I know it's possible to do it in docker compose, but I couldn't find anything specific to bake.
Let me know if there's anything else I can do to help pin this down. 🙏
nocive commentedon Nov 12, 2025
Maybe related 🤷♂️ #359