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
runc run failed: unable to start container process: can't copy bootstrap data to pipe: write init-p: broken pipe #3937
Comments
The other two cases are from @shepherdjerred as reported in #3167 (comment) After struggling with this for several days, I wasn't able to come up with a solution. On some machines it seems impossible to use Earthly when some unknown situation arises. Unfortunately this is a very poor experience for a core build tool; anyone would say that it is unacceptable to have a dependency on a tool that simply cannot run on some developer's machines without any remediation. Things I tried:
Even a minimal Earthfile wouldn't build:
This was on an arm64 M1 MacBook running Earthly 0.8.5. There is no issue running Docker containers on the machine outside of Earthly. These are the errors I saw:
Related resources |
I put together a rough Dockerfile which extends the earthly-buildkitd container along with an alpine-based rootfs and runc config under https://github.com/earthly/test-runc-in-earthly-buildkitd It contains two different versions: one for amd64 and another for arm64 -- I have tested this on both a linux amd64 host and M1, which work when running their own architecture. However, when I run the arm64 version from my amd64 linux (ubuntu) host, I get the same error:
|
I can replicate this on a M1 by tricking earthly into running the amd64 version of earthly-buildkitd instead of the arm64 version:
and also running the amd64-based version of earthly. It fails with:
|
without the config file change, it still appears to work with an amd64 version of earthly:
and it still detects the host arch is arm64, and runs the correct version:
|
Maybe there's something specific to the macOS host which is failing to detect the arch type, and it's incorrectly falling back to using amd64? As a work-around, maybe we can force the correct version in the
|
It's also possible to reproduce this issue by not changing the config.yml, but instead by pre-pulling the incorrect platform image. for example (running on a M1):
|
Note: there have been three people at my company who have run into this issue. One was able to fix it by enabling Rosetta 2 under Docker Desktop settings, one has tried everything short of reinstalling macOS as mentioned in this comment, and we haven't done much debugging with the last individual. |
It turns out that some users had For those users, they should delete all existing earthly/buildkitd images, and unset the default platform environment variable:
|
Examples of the new warning: When starting a new container: ``` buildkitd | Starting buildkit daemon as a docker container (earthly-dev-buildkitd)... buildkitd | Warning: earthly-dev-buildkitd was started using architecture amd64, but host architecture is arm64; is DOCKER_DEFAULT_PLATFORM accidentally set? ``` When checking an existing container: ``` buildkitd | Found buildkit daemon as docker container (earthly-dev-buildkitd) buildkitd | Warning: currently running earthly-dev-buildkitd under architecture amd64, but host architecture is arm64; is DOCKER_DEFAULT_PLATFORM accidentally set? ``` fixes #3937 Signed-off-by: Alex Couture-Beil <alex@earthly.dev>
There's three known cases of earthly not working, which has something to do with a failure starting runc:
Originally posted by @davidmoshal in #3167 (comment)
The text was updated successfully, but these errors were encountered: