Skip to content
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

Docker push fails with "failed to copy: io: read/write on closed pipe" #5958

Closed
teor2345 opened this issue Jan 15, 2023 · 6 comments · Fixed by #5985 or #5998
Closed

Docker push fails with "failed to copy: io: read/write on closed pipe" #5958

teor2345 opened this issue Jan 15, 2023 · 6 comments · Fixed by #5985 or #5998
Labels
A-devops Area: Pipelines, CI/CD and Dockerfiles C-bug Category: This is a bug I-build-fail Zebra fails to build I-integration-fail Continuous integration fails, including build and test failures

Comments

@teor2345
Copy link
Contributor

Motivation

Docker image builds are regularly failing due to a server error. This impacts all the Docker builds.

It is currently happening multiple times per day.

Here is an example log:

#27 exporting to image
#27 pushing layers 2.0s done
#27 ERROR: failed to push us-docker.pkg.dev/zealous-zebra/zebra/zebrad-test:pr-5952: failed to copy: io: read/write on closed pipe
------
 > importing cache manifest from us-docker.pkg.dev/zealous-zebra/zebra/zebrad-test:5952-merge-cache:
------
------
 > exporting to image:
------
ERROR: failed to solve: failed to push us-docker.pkg.dev/zealous-zebra/zebra/zebrad-test:pr-5952: failed to copy: io: read/write on closed pipe
Error: buildx failed with: ERROR: failed to solve: failed to push us-docker.pkg.dev/zealous-zebra/zebra/zebrad-test:pr-5952: failed to copy: io: read/write on closed pipe

https://github.com/ZcashFoundation/zebra/actions/runs/3912882750/jobs/6688092494#step:9:2059

This could either be a network error, a bug in our workflows or actions, or a configuration problem on the Docker server or our Docker account.

Testing

We'll need to run any fix a few times in CI to be sure it fixes the problem.

@teor2345 teor2345 added C-bug Category: This is a bug A-devops Area: Pipelines, CI/CD and Dockerfiles S-needs-triage Status: A bug report needs triage P-High 🔥 I-integration-fail Continuous integration fails, including build and test failures I-build-fail Zebra fails to build labels Jan 15, 2023
@teor2345
Copy link
Contributor Author

@teor2345
Copy link
Contributor Author

@mpguerra
Copy link
Contributor

@gustavovalverde have we changed anything with our Docker builds/configuration lately?

@gustavovalverde
Copy link
Member

Sadly, we haven't changed anything related to builds, just deleting extra images from the registry, but this is failing even we the cache image is found, so it doesn't seem to be related. This started happening after a GCP outage in the network, but the outage was solved and this is still happening.

I've been looking at this while working on ci: add a test to validate Zebra's config file and path
#5968

Once I'm done with that I'll deep dive into this one.

@mpguerra
Copy link
Contributor

Sadly, we haven't changed anything related to builds, just deleting extra images from the registry, but this is failing even we the cache image is found, so it doesn't seem to be related. This started happening after a GCP outage in the network, but the outage was solved and this is still happening.

Let's contact GCP support then

@teor2345
Copy link
Contributor Author

teor2345 commented Jan 19, 2023

This seems to be failing in PR #5992, both on the PR and in the merge queue:

Error: buildx failed with: ERROR: failed to solve: failed to push us-docker.pkg.dev/zealous-zebra/zebra/zebrad-test:pr-5997: failed to copy: io: read/write on closed pipe

https://github.com/ZcashFoundation/zebra/actions/runs/3945475841/jobs/6752400182#step:9:2108
https://github.com/ZcashFoundation/zebra/actions/runs/3953457309/jobs/6769753452#step:9:2118

There is also a new warning:

Warning: Unexpected input(s) 'driver-opts', valid inputs are ['add-hosts', 'allow', 'attests', 'build-args', 'build-contexts', 'builder', 'cache-from', 'cache-to', 'cgroup-parent', 'context', 'file', 'labels', 'load', 'network', 'no-cache', 'no-cache-filters', 'outputs', 'platforms', 'provenance', 'pull', 'push', 'sbom', 'secrets', 'secret-files', 'shm-size', 'ssh', 'tags', 'target', 'ulimit', 'github-token']

It seems like we need a different way of setting driver-opts, or a version of docker/build-push-action that supports the driver-opts key.

@teor2345 teor2345 reopened this Jan 19, 2023
@mergify mergify bot closed this as completed in #5998 Jan 19, 2023
@mpguerra mpguerra moved this to 🛑 Won't Fix in Zebra Jan 19, 2023
@mpguerra mpguerra added this to Zebra Jan 19, 2023
@mpguerra mpguerra moved this from 🛑 Won't Fix to ✅ Done in Zebra Jan 19, 2023
@mpguerra mpguerra removed the S-needs-triage Status: A bug report needs triage label Mar 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-devops Area: Pipelines, CI/CD and Dockerfiles C-bug Category: This is a bug I-build-fail Zebra fails to build I-integration-fail Continuous integration fails, including build and test failures
Projects
Archived in project
3 participants