-
Notifications
You must be signed in to change notification settings - Fork 18.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multistage docker build fails with unexpected EOF #40993
Comments
@tonistiigi ptal |
Please provide a reproducer |
This seems to do it without requiring any additional files:
|
I can't seem to reproduce this on my mac, only within that amazonlinux2 container. |
Please provide all the steps that are needed to reproduce. I would guess you don't get the above error by just running |
First you need to build the AWS CodeBuild image (or just run the final
Get the files to reproduce it (I don't know what is relevant):
Now run the container (this is the long way but it works):
An interesting thing is that once I reproduce the issue then I can also reproduce it with the smaller self contained Dockerfile above but if I start with a clean container then it requires the larger one with additional files. Doing trivial changes like removing |
@tonistiigi are these steps sufficient to reproduce the problem? Perhaps this issue belongs in https://github.com/moby/buildkit instead. The problem doesn't happen if I remove |
@steinybot Yes, I can reproduce now. I think this might be fixed with moby/buildkit#1382 |
In case you prefer a workaround to upgrade, the thing that triggers this case is when you are copying the same files from the stage where they were already copied https://github.com/steinybot/bug-reports/blob/moby/unexpected-eof/docker/Dockerfile#L20-L21 https://github.com/steinybot/bug-reports/blob/moby/unexpected-eof/docker/Dockerfile#L41-L42 That creates a loop where the If you remove |
Thanks a lot for the update! I'll give that a go. Hopefully I can remove the cache from AWS CodeBuild. |
Opened moby/buildkit#1514 to backport to the BuildKit "docker-19.03" / v0.6.x branch. After that's merged, it needs to be vendor in the 19.03 branch in this repository to resolve the issue for 19.03 |
….6.4-15-gdc6afa0f) full diff: moby/buildkit@a7d7b7f...dc6afa0 - solver: avoid recursive loop on cache-export - fixes moby/buildkit#1336 --export-cache option crashes buildkitd on custom frontend - fixes moby/buildkit#1313 Dockerd / buildkit in a infinite loop and burning cpu - fixes / addresses moby#41044 19.03.9 goroutine stack exceeds 1000000000-byte limit - fixes / addresses moby#40993 Multistage docker build fails with unexpected EOF Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Opened #41185 to vendor the fix in the 19.03 branch |
….6.4-15-gdc6afa0f) full diff: moby/buildkit@a7d7b7f...dc6afa0 - solver: avoid recursive loop on cache-export - fixes moby/buildkit#1336 --export-cache option crashes buildkitd on custom frontend - fixes moby/buildkit#1313 Dockerd / buildkit in a infinite loop and burning cpu - fixes / addresses moby/moby#41044 19.03.9 goroutine stack exceeds 1000000000-byte limit - fixes / addresses moby/moby#40993 Multistage docker build fails with unexpected EOF Signed-off-by: Sebastiaan van Stijn <github@gone.nl> Upstream-commit: e7c2b106ec7785fcb54b1cf80258a2bea25ed020 Component: engine
@thaJeztah Seems like this can be closed too by 19.03.13 :) |
Good catch, yes. Looks like GitHub didn't auto-close. Should be fixed by #41185 Thanks! |
Description
Steps to reproduce the issue:
Describe the results you received:
Describe the results you expected:
The build should succeed.
Additional information you deem important (e.g. issue happens only occasionally):
Output of
docker version
:Output of
docker info
:Additional environment details (AWS, VirtualBox, physical, etc.):
I first encountered this when trying to build a Docker image in AWS CodeBuild using the image
aws/codebuild/amazonlinux2-x86_64-standard:3.0
.I built the image myself from https://github.com/aws/aws-codebuild-docker-images/tree/master/al2/x86_64/standard/3.0 and I can reproduce it reliably.
Here is the daemon log file:
dockerd-logfile.txt
It looks as though the root cause is a stack overflow.
The text was updated successfully, but these errors were encountered: