-
Notifications
You must be signed in to change notification settings - Fork 118
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
Segfault in amd64 container using Rosetta #6773
Comments
I have the same issue when using UPX to compress a binary (and it just so happens to be a Go language produced binary too.) UPX definitely does some strange things to a binary, but as it still works under the old qemu system, it does seem to be a rosetta specific issue. |
Just checking in to see if anyone is listening… still getting segfaults using Rosetta on Docker 4.21.1 (114176)/MacOS Ventura 13.4.1 (22F82). |
I have tried the following versions:
and still getting the same error:
I am running macOS Ventura 13.5. This is driving me crazy since I cannot find a solution for this issue, any help? |
Can also reproduce this on macOS 14.1 with Docker For Mac 4.25.0. This is especially problematic as Rosetta is now enabled by default. Just to add another example of what fails: https://github.com/zerok/docker-rosetta-issue |
It might be related to docker/buildx#2028 |
I recently learned that you can create a builder in
You can include pods running on a Kubernetes cluster as well. See I don’t know if this is a bug in Rosetta, Docker, or QEMU, but in the meantime I have fast builds that work. |
We are getting a segmentation fault with a Ubuntu-based image running PHP-FPM and Composer:
Anything we can do to report the issue? This has always been happening on my end, and is more annoying since the option got enabled by default (currently using 4.25.1) |
Hi @zerok, I've tried to reproduce from your project but couldn't make it fail. Could you share the exact commands you used to trigger the issue? |
Hi @AdrienPoupa, could you share the exact commands you used to trigger the issue? Which version of php are you using? Have you tried with a more recent version? |
@koehn same, I couldn't reproduce with your project. FWIW, I'm on Sonoma 14.1.1 and Docker Desktop 4.25.1 |
Hi @dgageot 🙂 A checkout of that repository and then running Happened for me with 4.25.0 (126437) every time I ran it. With 4.25.1 the story is a bit different. I had to run the same command multiple times but in the vast majority of runs I now see this:
... or similar errors. I'm also on macOS 14.1.1. |
You're on an Apple Silicon Mac and you're cloning and go running inside an amd64 container? |
Exactly 🙂 |
Which image are you using to build? I used |
That's what Dagger is for. All you should need to do to reproduce this issue is running |
Oh, that makes more sense. I'll give it a try |
OK, this one is interesting. It succeeded in building the image, the first time I ran it. I think this one is a FWIW, when I go through the same build steps with a Dockerfile, it all works:
|
Those are the logs I am getting when trying to load any page:
Even a simple
I'll try to rebuild the image, I can send you the Docker file privately if needed |
@AdrienPoupa could you try with php 8.2.something? |
I don't think it is about Dagger. Consider this reproducer, for example: docker/buildx#2028 (comment) |
I can try to compile a 8.2 image, but this is not really an acceptable workaround given our production environment runs 8.1 and migrating is not a trivial task, not to mention people relying on older PHP versions to work in Docker. I rebuilt the image with 8.1, I am still having the issue:
This is how we are installing PHP and extensions:
We are also installing NewRelic's PHP agent but not using it in dev:
|
I built a 8.2 image, and it works fine:
It seems 8.1 is broken, but that means we can't use the new option with our existing image, even with the latest PHP 8.1 stable version - meaning I feel the activation by default was a bit rushed. |
@zerok a fix to your workflow should ship in Docker Desktop 4.26.0. We could reproduce it on 4.25.1 but not on our main branch where we added many fixes to Rosetta. @AdrienPoupa no fix for php < 8.1 yet. I'm still working on it and will keep you posted! |
@AdrienPoupa FWIW, I also couldn't reproduce the issue with |
Same here, php:8.1-fpm works fine so it is either coming from the different Ubuntu base, or one of the extensions |
@AdrienPoupa it's coming from OPCache and the way it's using |
Looks like a fix / improvement was made in Docker Desktop, which will ship with the next release |
@AdrienPoupa did you get a chance to test Docker Desktop v4.26.0? |
I just did, looks like it is fixed, thank you very much! |
I'm going to close this issue. Feel free to reopen |
Thank you 😊 my case also works with 4.26 🥳 |
Expected behavior
Expected amd64 containers run under Rosetta to function the same as containers run under QEMU.
Actual behavior
amd64 containers run under Rosetta segfaults.
Information
Output of
/Applications/Docker.app/Contents/MacOS/com.docker.diagnose check
For the record: Docker is running and working fine; no idea why
diagnose
is reporting the VM down.Immediately after running the above command, I ran:
Steps to reproduce the behavior
Using this code/Dockerfile, which has a very simple build of a golang file being added to a distroless base image.
From an Apple Silicon machine, run:
docker buildx build -t koehn/fetchurl --platform linux/amd64,linux/arm64 . --push
with Rosetta enabled, then without. For me, the without version segfaults:Again, when I disable Rosetta and run the build again, it succeeds. The arm64 build always succeeds.
The text was updated successfully, but these errors were encountered: