-
Notifications
You must be signed in to change notification settings - Fork 117
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
"VMAllocationTracker.cpp:745 remove_shared_mem assertion failed error" under Rosetta on Apple Silicon Sonoma #7220
Comments
+1, I have the same exact error when running an Looks like they changed something in Rosetta on macOS Sonoma 14.3 (see Apple Developer Forums). It would be good to have some information from Docker devs about this problem. |
Hey everyone, sorry to hear that your workflow is broken... Have you tried running without I'll investigate some more and reach out to Apple to see if they can explain this behaviour. |
Interesting that this also fails with qemu (with --init only):
|
Yeah Apple definitely changed stuff recently https://blogs.oracle.com/java/post/java-on-macos-14-4 |
Wow, interesting, that's a pretty big hammer, to change that to SIGKILL 😬;
|
Running without |
webengine in docker on linux under rosetta has issues docker/for-mac#7220
webengine in docker on linux under rosetta has issues docker/for-mac#7220
I have the same error when trying to run a db2 container from an amd64 image using Rosetta on an M1 Pro. |
FYI |
has anyone been able to find a work around this issue? I'm also having the same problem |
I have the same with 4.29 |
Here is a minimal testcase # syntax = docker/dockerfile:1
FROM --platform=linux/amd64 ubuntu:jammy
RUN apt-get -y update && apt-get -y install build-essential
COPY <<EOF shmem.c
#include <stdio.h>
#include <sys/shm.h>
#include <fcntl.h>
int main ()
{
int segment_id;
char* shared_memory;
segment_id = shmget(IPC_PRIVATE, 0x6400, IPC_CREAT | IPC_EXCL | S_IRUSR | S_IWUSR);
shared_memory = (char*) shmat(segment_id, 0, 0);
shmdt(shared_memory);
shared_memory = (char*) shmat(segment_id, 0, 0);
shmdt(shared_memory);
return 0;
}
EOF
RUN <<EOF
gcc -o shmem shmem.c -lrt
EOF
ENTRYPOINT ["./shmem"] Build with > docker run --rm -it shmem
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
assertion failed [rem_idx != -1]: Unable to find existing allocation for shared memory segment to unmap
(VMAllocationTracker.cpp:745 remove_shared_mem) |
Same issue with rdesktop of linuxserver. |
Hello, I have the same problem here with a Qt-based application. I can reproduce the problem on macOS Sonoma 14.5 with Docker Desktop 4.29 (Rosetta activated) on a M1 and on a M3 Pro with the minimal example provided above. It would be great to have a workaround or fix for that. Anyone got any further already? |
I am having the same problem and looking for a workaround or, in an optimal scenario, a fix. |
Hey guys i am facing the same issue as well. |
you can replace the files in the /Library/Apple/usr/libexec/oah/RosettaLinux folder with binaries from the macos version, which did not have this problem don't forget to set execution rights :) |
Hi everyone! We're discussing with Apple so that they fix this issue. It is an issue with recent versions of Rosetta, shipped since 14.4. |
Just updated to Sonoma 14.5. The issue is still present. |
Same issue on Sonoma 14.5 |
We are having the same issue with another Docker image that use xvfb-run and electron |
I found a workaround based on this
|
This workaround does not work for me. |
Hi everyone! The issue is indeed still in 14.5. FWIW, apple is aware of it. I can see workarounds mentioning the installation of an older version of Rosetta. While this does work, it'll break other things and it's also not supported nor encouraged by Apple. I hate to say it but I believe the safest thing to do here is to wait for a fix, from Apple, to macOS/Rosetta itself. |
Hello everyone, I managed to solve this problem by installing the Sonoma from scratch. I went into repair mode, formatted the drive and had it installed again. |
Just to confirm that the reinstall performed kept you on 14.5 and did not revert back to a prior version. |
As far as I noticed, he got the latest version of the system.
|
Any news on this? |
For what it's worth, I'm seeing the same issue. MacOS 14.5, Macbook Pro M1 Max, Docker version 26.1.4, build 5650f9b. Would really love to find a viable workaround. |
Hi everyone, here's an internal build that you could try: Docker.dmg |
Hi @dgageot, I installed the verison v4.32.0 (153994) and I'm still getting the same issue. |
This version 4.32.0 (153994) fixed it for me. I'm running the IBM ELM-Web-installer on debian:stable on MacOS 14.5 with Apple M3 Pro. |
Same issue here with MacBook Air M3 with Sonoma. |
@rectalogic @dgageot could you please help to me understand why this is related to rossetta? docker uses aarm64 containerd as CRI, and use QEMU to translate x86 based image to make it runnable on containerd. |
Since 4.25 docker uses rosetta:
|
Thank you @rectalogic and @dgageot, do you know if Docker Desktop(aarm64) totally abandon QEMU and switch to Rossetta? or it will use QEMU in some situation? |
It doesn't on neither Sonoma |
Apparently it was solved with Sonoma 14.6.1. i`m No longer having this problem. |
On Sequoia macOS also solved it. |
Sonoma 14.6.1 also solves it for me (Nixos aarch86 in UTM virtual machine running x86 docker). |
Description
Running this amd64 container on macOS Sonoma 14.4 on an M2 mac under Rosetta gets this error:
Reproduce
This is the Dockerfile used to create the container:
Built with
docker buildx build --platform linux/amd64 --load --tag rectalogic/qtwebengine .
Expected behavior
Should run without fatal errors. Running the container in docker on amd64 linux does not have this error.
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
ECBEBC37-A545-45B6-9DCA-FCE68405FE65/20240315183013
Additional Info
Other reports of a very similar issue, all on Sonoma Apple Silicon:
https://forums.docker.com/t/unable-to-find-existing-allocation-for-shared-memory-segment-to-unmap/139868
https://forums.developer.apple.com/forums/thread/746618
https://bugs.openfoam.org/view.php?id=4060
The text was updated successfully, but these errors were encountered: