-
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
Rosetta emulation on arm64 macOS breaks many amd64 (x64_64) image (binaries) #7137
Comments
Hi @spkane, very sorry to hear about your issue. Here's my understanding:
--> The switch to Rosetta by default in Docker Desktop doesn't really have an impact. With or without Rosetta, the There are two ways you can work around this issue:
I've just tested those three options and they all work:
|
Hi @spkane, Docker Desktop 4.27 has been released. I'd love to get your feedback! |
@dgageot With the 4.27 release: $ docker run --rm --platform linux/amd64 -ti mongo:6.0
WARNING: MongoDB 5.0+ requires a CPU with AVX support, and your current system does not appear to have that!
see https://jira.mongodb.org/browse/SERVER-54407
see also https://www.mongodb.com/community/forums/t/mongodb-5-0-cpu-intel-g4650-compatibility/116610/2
see also https://github.com/docker-library/mongo/issues/485#issuecomment-891991814
And then it just sort of hard locks, until I stop it from another terminal. Control-C does not work... $ docker run --rm --platform linux/amd64 -e EXPERIMENTAL_DOCKER_DESKTOP_FORCE_QEMU=1 -ti mongo:6.0
WARNING: MongoDB 5.0+ requires a CPU with AVX support, and your current system does not appear to have that!
see https://jira.mongodb.org/browse/SERVER-54407
see also https://www.mongodb.com/community/forums/t/mongodb-5-0-cpu-intel-g4650-compatibility/116610/2
see also https://github.com/docker-library/mongo/issues/485#issuecomment-891991814
{"t":{"$date":"2024-01-26T18:53:30.727+00:00"},"s":"I", "c":"CONTROL", "id":23285, "ctx":"-","msg":"Automatically disabling TLS 1.0, to force-enable TLS 1.0 specify --sslDisabledProtocols 'none'"}
... This appears to work and responds to a Control-C to stop it. So, this appears to look promising. Now, I need to actually dig into the initial problem I was having, because I think I accidentally found this AVX issue while trying to troubleshoot an issue running mongo 4.4 (which does not require AVX). I just happened to test 6.0 as well to see if it was just a problem with the older mongo image and when I saw another startup error, I thought that they were the same. I may have a second issue to open up regarding Rosseta emulation, because the mongo 4.4 amd64 container I have been using was fine with QEMu, but broke once Rosetta was default forced. |
@dgageot This can probably be closed now. The lack of AVX support in Rosseta 2 is something that isn't going to be fixed, and the workarounds that Docker is providing appear to work. Thanks! |
@spkane Thanks for the feedback! And feel free to open another issue for 4.4 if there's still an problem. |
Description
The switch to requiring users to use Rosetta instead of QEMU has broken things significantly, and there is no obvious way to revert to the old QEMU-based behavior in Docker Desktop for Mac.
Reproduce
It is really easy to reproduce the core issue here with a test comment like this:
Note the Illegal instruction error message at the end. You get this when you run basically any binary inside the container.
Expected behavior
lscpu
CPU op-mode(s) output should show support for 32-bit and 64-bit.The Rosetta support needs to be fixed, if it is going to be required and in the meantime, there need to be a way for people to revert to the old QEMU behavior until there is a fix that allows Rosetta to handle x86_64 properly.
docker version
Version: 24.0.6 API version: 1.43 Go version: go1.21.0 Git commit: unknown-commit Built: 2023-09-05T21:18:11+0000 OS/Arch: darwin/arm64 Context: desktop-linux Server: Docker Desktop 4.26.1 (131620) Engine: Version: 24.0.7 API version: 1.43 (minimum version 1.12) Go version: go1.20.10 Git commit: 311b9ff Built: Thu Oct 26 09:08:15 2023 OS/Arch: linux/arm64 Experimental: true containerd: Version: 1.6.25 GitCommit: d8f198a4ed8892c764191ef7b3b06d8a2eeb5c7f runc: Version: 1.1.10 GitCommit: v1.1.10-0-g18a0cb0 docker-init: Version: 0.19.0 GitCommit: de40ad0
docker info
Diagnostics ID
63AA3B70-500A-4E8E-A5AB-028E750737C9/20240119204843
Additional Info
The
lscpu
output:❯ docker run --rm --platform linux/amd64 --entrypoint lscpu --name mongo bitnami/mongodb:6.0 Architecture: x86_64 CPU op-mode(s): 32-bit Byte Order: Little Endian CPU(s): 8 On-line CPU(s) list: 0-7 Thread(s) per core: 1 Core(s) per socket: 8 Socket(s): 1 Vendor ID: 0x61 Model: 0 Stepping: 0x0 BogoMIPS: 48.00 Vulnerability Gather data sampling: Not affected Vulnerability Itlb multihit: Not affected Vulnerability L1tf: Not affected Vulnerability Mds: Not affected Vulnerability Meltdown: Not affected Vulnerability Mmio stale data: Not affected Vulnerability Retbleed: Not affected Vulnerability Spec rstack overflow: Not affected Vulnerability Spec store bypass: Vulnerable Vulnerability Spectre v1: Mitigation; __user pointer sanitization Vulnerability Spectre v2: Not affected Vulnerability Srbds: Not affected Vulnerability Tsx async abort: Not affected Flags: fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 asimddp sha512 asimdfhm dit uscat ilrcpc flagm ssbs sb paca pacg dcpodp flagm2 front
The text was updated successfully, but these errors were encountered: