-
Notifications
You must be signed in to change notification settings - Fork 608
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
Certain node.js/amd64 workloads cause container to become unresponsive/100% CPU when using Rosetta #2131
Comments
This should be probably reported to Apple |
Interestingly it appears to have been fixed in Docker for Mac so they must have found some workaround... |
Observing this issue with a VM type VZ and Rosetta emulation enabled (through colima) and Nextjs build using jest-worker. The release notes of Docker Desktop 4.27.2 (released 2024-02-08) mentions:
Similar hints here: docker/for-mac#7184 This seems to go into the direction that it is a configuration or change at level of the Linux virtual machine |
From the hints i could see that we could wrap rosetta command with taskset to avoid this issue I wrote a simple c program to delegate call to rosetta with taskset -c 1 set. Custom program works when calling directly & via binfmt in guest, but this c program is not working when used with binfmt & docker. |
Here is case that hopefully is reproducible. Host is Apple Silicon with Rosetta enabled.
Setup the sample project for NextJS with a Dockerfile.
Setup two VZ VMs one with qemu and one with rosetta emulation.
Build using VZ with qemu works:
Build using VZ with rosetta hangs.
Hangs on
The following process is at 100% CPU:
From VM
|
Yes able to reproduce this issue easily There is a simple docker image and a repo captured here to reproduce this issue |
Description
limactl version 0.19.1, macOS 14.2.1, using Colima 0.6.7 with Rosetta enabled.
On one of our internal projects, an amd64 Docker build seems to hang forever when Rosetta is enabled. I'm also able to reproduce it with the Dockerfile in docker/for-mac#6998, by running
docker run --platform linux/amd64 jbinto/rosetta-what
. This feels different from #1609 because the VM itself isn't unresposive; I'm able to SSH into the VM and runhtop
and see that/mnt/lima-rosetta/rosetta /usr/local/bin/node index.js
is using 100% CPU.The text was updated successfully, but these errors were encountered: