-
Notifications
You must be signed in to change notification settings - Fork 120
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
Segmentation fault on x86_64 with MacOS Virtualization Framework enabled #6824
Comments
@antoniofrignani, would it be possible to submit a diagnostic report and then add the Diagnostics ID here? |
@MihaelaStoica i've just updated my comment with a diagnostic ID |
I also have this issue. There is no need to create a full Laravel project though. Installing Vite is enough to reproduce this issue:
Downgrading to 4.18.0 via https://docs.docker.com/desktop/release-notes/#4180 without changing the version of Vite is also a working workaround for me. I also have access to a MacBook of a different model where this issue does not occur, so this might be hard to reproduce. Specs of the MacBook that has the issue:
Specs of the MacBook without the issue:
|
I reported this issue to the yarn project (in hindsight not sure if I should have filed it here or at the node project instead). This issue here looks very similar to what I reported at yarnpkg/berry#5420. The issue at the yarn repository contains a minimal case to reproduce. For me, this issue happens 100% of the time, for coworkers (almost identical hardware) it does not fail at all. |
@irobin591 yes the issue is not direcly related to the framework itself, thanks for reproducing it with bare minimum boilerplate. I'll watch the issue on the node/yarn side too since this seems strictly related, thanks @tisba for reporting it here. |
I can confirm that downgrading to Docker Desktop 4.18.0 (104112) fixes the issue for Update I only see the issue on x86. On arm64 (macOS 13.3.1 (a) (22E772610a)) Docker Desktop 4.19.0 works fine, without segmentation fault. So it looks like 4.19.0 broke something specifically on Intel. I use this to test: #!/bin/sh
# run via
#
# docker run -it --rm -v "$(pwd)/test.sh":/app/test.sh:ro -w /app node:18.16 /app/test.sh
set -e
cat << EOF > ./package.json
{
"packageManager": "yarn@3.5.1",
"dependencies": {
"@rails/ujs": "7.0.4"
}
}
EOF
corepack enable
npm install -g npm@9.6.5
printf "uname -a: %s\n" "$(uname -a)"
printf "Node version: %s\n" "$(node --version)"
printf "Yarn version: %s\n" "$(yarn --version)"
printf "npm version: %s\n" "$(npm --version)"
printf "\n\n"
printf "Running: yarn install\n"
yarn install |
@sam-thibault @MihaelaStoica: Can we provide something else to help with acknowledging/analysing the issue? (looking at the |
I have the same problem on a Laravel project with sail when I do the command
Docker version 23.0.5, build bc4487a |
In case you missed it, @julienallexandre, downgrading Docker Desktop one version seems to help until the issue is identified and fixed. |
@tisba thanks yes that's what I did :) |
Ran into the same issue today. I was using: I continually ran into silently failing yarn installs. Eventually, I tried a yarn install in the Docker terminal itself and received a seg fault. Shoutout to you @tisba - I was losing my mind all afternoon. Please fix this issue. @docker-robot |
I can confirm that with Docker Desktop 4.20.1 (110738) the problem persists under x86 (macOS 13.3.1 (a) (22E772610a)). None of my Apple Silicon devices show this problem, also tested with latest Docker Desktop 4.20.1. Update I also can't get it to crash on Apple Silicon using Rosetta x86 emulation. |
I have same problem on i9 intel iMac. I can reproduce on latest docker desktop. Downgrading to 4.18 fixes issue but has networking problems of its own on Ventura 13.4. Interestingly, I can reproduce with node v18 and 20 buster/bullseye images. However node v16 works fine. |
Updated to macOS 13.4 (22F66) and the problem still persists. |
As an added piece of information... I have 2 development setups I am currently working in and experiencing this same issue. I am using the bullseye images for my containers.
Both machines are running: macOS 13.4 / Docker Desktop v4.20.1 / Node v18.16.0 |
Same problem with version 4.20.1, reverting to v 4.18 is the only working workaround afaik |
I had same issue. MacBook Pro (13-inch, 2020, Four Thunderbolt 3 ports) But it's fixed after downgraded to 4.18.0 without any changes of dockerfile, thank you. |
I had the same issue, but I use Laravel Mix instead of Vite. Downgrading Docker desktop to 4.18.0 did also the trick for me. |
Still preproducable with 4.21.0 (113844) on Ventura 13.4.1 (22F82). Do the issue labels need to be updated to reflect that the bug is still present, @sam-thibault? |
Managed to reproduce the issue on macOS Ventura 13.4.1 (22F82) with Docker Desktop 4.20.1 (110738) and Docker version 24.0.2, build cb74dfc |
Problem still relevant with latest 4.21.1 version |
Confirmed this issue exists on macOS 13.6.4, Intel Core i5, Docker v4.28. Upgrade to v4.28 to support the "include" tag in Dockerfile in a new project, then noticed the previous project broken...cost one whole day to find out the reason and solution...then come here...have to revert to v4.18 to save my other projects. Seems the issue lay here more than half a year, so no plan to check this issue at all? |
Same here, shit's unusable |
The issue is still present on macOS Sonoma v14.4.1 & Docker Desktop 4.29.0. |
I've switched to OrbStack since the issue popped up and solved the problem Edit: I've just realized it's been one year since I opened the issue and no one GAF about that, so anybody who will stumble upon this lately: do yourelf a favor and switch tool, this is not going to be fixed anytime soon. |
I can only vouch for @antoniofrignani's suggestion to switch to OrbStack. |
I've also switched to OrbStack and have no regrets. Even on my Apple Silicon Macs that don't experience this issue with Docker Desktop, I have switched to OrbStack and it's just faster than Docker Desktop. |
Cheers @antoniofrignani, I didn't know about it! Seriously considering the switch now 🙌 |
I just switched! I previously switched to Rancher Desktop but eventually, I found Rancher lacking some features I liked in DD, so now I tried OrbStack and it seems to have all I need. Thanks! |
Hello everyone, so sorry for breaking your workflow! I'm currently trying to reproduce your issue, although there might be more than one. |
@dgageot I found this to fail reliably on any system that showed the failure...
|
Thanks a lot! I can't reproduce on Docker Desktop 4.29, on an Intel MacPro. |
one liner: |
Thanks @SheepReaper, that's handy! I've tried with this command too and same result: it works well. A colleague of mine has tried too and couldn't reproduce either. Have you tried Docker Desktop 4.29? Can you share your version of macOS and type of Mac? |
@dgageot I can reproduce on 4.29, iMac 2020 Intel i9 running Sonoma 14.4.1 You need to make sure you have Running the test command above gets me
Using Virtualization Framework AND gRPC Fuse seems to work. As does NO virtualization framework AND osxfs Strangely after going back to VirtioFS, |
@dgageot I don't have a machine in a state to test this again right now, but as of May 2023, Nov 2023, and late Feb 2024 with all machines up to date on latest MacOS and Docker Desktop at that time I had 4 13" MBP (2020, Intel, i7 cpu) and 1 13" Macbook Air (2020, Intel, i7) all failed on this. I had 1 15" MBP (2018, Intel, i7) and 1 16" MBP (2019, Intel, i9) that did NOT have the problem with Mac Virtualization Framework on. Turning off the Mac Virtualization Framework fixed all machines. Also in my testing in November, node:16-slim did NOT have the problem. node:18-slim and node:20-slim DID have the problem. node:22-slim (not GA yet) did NOT have the problem. Hope that helps. |
Keeping you posted: For now, we failed to reproduce on four different Intel Macs. Each time, we enabled |
OK, we've tried six Mac<=2018 and had no issue |
@dgageot thank for stepping in. If that helps, you can have a look at the diagnostics i have uploaded when i first opened the issue. |
Here is an internal build which we think solves this issue. Could you give it a try? |
A few days ago we upgraded our stack to nodejs 20 and suffered the same issue as described here (precisely a segfault when running webpack during image build with no mount) on a macbook pro 2020. @dgageot I gave your internal build a try, switched back to use of the Virtualization Framework and used it yesterday for a few hours, everything works fine now 👏 I'll let others confirm that it works for them too. Thanks for taking the time to reproduce and fix the issue ! |
I can confirm that it works on our end, too. Thank you for fixing this issue! |
FYI, the fix is planned for Docker Desktop v4.30.0 |
Great, thank you for fixing the issue! 🙏 |
Closing this issue because a fix has been released in Docker Desktop |
Interestingly I am facing yarn SIGSEGV on Docker Desktom 4.33... Do I need to check specific versions/settings? I have the VirtioFS enabled UPDATE using simply |
Expected behavior
After a fresh local install of a Laravel project + Breeze (Vue), trying to build for production (
sail npm run build
) or starting a local hmr server (sail npm run dev
) should work properly (using Docker for Mac on Intel Chip, v4.19.0)Actual behavior
Both commands thows a Segmentation Fault error without further info.
Information
Switching back to Docker for Mac v4.18.0 works as expected.
Possible workaround: disable Virtualization framework on v4.19+
Steps to reproduce the behavior
curl -s "https://laravel.build/example-app" | bash
)sail npm run dev
should throw the Segmentation Fault errorThe text was updated successfully, but these errors were encountered: