-
Notifications
You must be signed in to change notification settings - Fork 122
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
Buildx throws Illegal Instruction installing ca-certificates when building for linux/amd64 on M2 #7255
Comments
have the same issue on m3 mac |
I can consistently reproduce this with:
Example build log
System infoM2 Max. Sonoma 14.3.1.
|
Reporting the exactly issue with M3pro(Sonoma 14.5.0) and Docker Desktop 4.30.0 (Server Version: 26.1.1). There are no other hints logged at any verbosity log level. Is there anyone already figured potential issue and maybe any workaround? |
Digging a bit more into this and since Ubuntu jammy has some nice debuginfo support. So, enabling coredump generation inside running container actually gives this log
and brief looking into the coredump with gdb unfortunatelly not showing full bt (I am not so keen in gdb .. hints appreciated!):
but at least it does tell what the culprit for this ticket is, meaning Does anyone here has some knowledge how to proceed with this further to solve? |
I was able to work around the issue by disabling Rosetta in Docker Desktop. |
docker run --platform linux/amd64 -it ubuntu:22.04 /bin/bash
apt update && apt install ca-certificates This will reproduce the same issue on my M3 pro Macbook, but it's OK on a M1 pro Macbook. So it's like a rosetta bug. |
Hello same issue on M2 Pro Ventura/Sonoma. Disabling Rosetta indeed solves it but the build times are like double 😞 It does work if I try some times after it had failed. This is on Sonoma 14.6 and Docker Desktop 4.33
This solved the issue for about a day or two. The problem still remains and the only solution right now is to disable Rosetta and run with qemu |
I just did a clean re-install of Docker Desktop 4.33.0 (160616) on Sonoma 14.6 and, fingers crossed, so far I'm able to buildx amd64 images on an M3 MacBook Pro. I'm using Rosetta as well as the Virtualization framework. Not sure if this is going to last but I'll post again if it starts failing. |
Not sure how relevant this is here, but even if you get a an linux/amd64 image built, it might not run properly with Rosetta as it doesn't support for example AVX extensions (see also discussion here). When the underlying code doesn't handle/check for this, it might just crash the app. When this happened I got (python) just a non descriptive "Illegal instruction". Disabling Rosetta and running with qemu then might work but be considerably slower. |
M3 user here, also experiencing this bug. Clean Docker Install did not resolve it, deselecting |
Thank you for this thread. |
This worked for me too (on an M3 Pro). You can turn the Rosetta emulation back on again once you have a cached docker layer containing the already installed ca-certificates. It is only the initial installation of the apt "ca-certificates" package that is a problem. |
Same. Can reproduce the bug on an M2 Pro Macbook laptop, and disabling Rosetta works. How can we get this bug to at least the "triaged" or "confirmed" state? |
This comment has been minimized.
This comment has been minimized.
Perhaps podman with other K6 from grafana Alloy and all free SDK, minikube, minio, S3 to manage the microservises |
Having this issue with M2 and Docker Desktop 4.36.0 (175267). Randomly fixed this by moving
|
This worked for me as well! |
Although i confirm the bug, I doubt the last two posts from @MbBrainz and @cyberops7 are solved because of VMM. I can see in the screenshot resetta turned off, which is the only thing I need for my image to build. |
Docker VMM does not currently support Rosetta. So yeah, turning off Rosetta should have the same effect. |
Due to my research it seems to be a bug in Rosetta introduced by Apple with the Dec 11, 2024 Update. |
Thanks a lot for the help, turning off Rosetta worked on my M3 Pro machine. |
Description
I'm running Docker for mac version 25.0.3 on an M2 (arm64) machine.
When trying to build some relatively simple images using buildx on linux/amd64 arch, I get illegal instruction errors installing the ca-certificates package in the image. These happen only some of the time.
Reproduce
My
Dockerfile
:docker buildx build --platform linux/amd64 --platform linux/arm64 --tag lculibrk/dupcaller --push ./
The linux/arm64 build works just fine, however the linux/amd64 fails. The apt-get stdout is pretty verbose but the relevant bit is below:
Some other logs, then finally:
Expected behavior
The build should probably not error here, especially since rerunning the command sometimes does build the container successfully and sometimes does not.
docker version
Client: Cloud integration: v1.0.35+desktop.11 Version: 25.0.3 API version: 1.44 Go version: go1.21.6 Git commit: 4debf41 Built: Tue Feb 6 21:13:26 2024 OS/Arch: darwin/arm64 Context: desktop-linux Server: Docker Desktop 4.28.0 (139021) Engine: Version: 25.0.3 API version: 1.44 (minimum version 1.24) Go version: go1.21.6 Git commit: f417435 Built: Tue Feb 6 21:14:22 2024 OS/Arch: linux/arm64 Experimental: false containerd: Version: 1.6.28 GitCommit: ae07eda36dd25f8a1b98dfbf587313b99c0190bb runc: Version: 1.1.12 GitCommit: v1.1.12-0-g51d5e94 docker-init: Version: 0.19.0 GitCommit: de40ad0
docker info
Diagnostics ID
10E48443-2E93-4CA4-B95F-BD8B7126CFF9/20240416135437
Additional Info
No response
The text was updated successfully, but these errors were encountered: