-
Notifications
You must be signed in to change notification settings - Fork 90
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
Builds randomly fail on Apple silicon using bind mounts with VirtioFS enabled #161
Comments
I got an update from Apple on the issue I submitted with Feedback Assistant. They marked it as "Potential fix identified - For a future OS update" and asked that I test with iOS 18 beta available at https://developer.apple.com/download/. I think this was a copy pasta mistake and they actually wanted me to test with the MacOS 15 beta. So I installed the beta, made sure Docker was up-to-date, enabled VirtioFS, and the issue no longer presents itself. So I think once MacOS 15 is officially released, this issue can be closed. |
@dslatkin Have you actually tested this on a recent docker-for-mac release before you did your tests on macOS 15? I think back in February there was a docker-for-mac release that included an in-kernel (vm) fix that workarounds the bug in virtualization.framework's virtiofs implementation. I am just wondering because there might be a possibility that this bug hasn't actually been fixed yet but you're just seeing the effects of the workaround the docker devs did some months ago. |
I thought I had tested somewhat recently (probably April or so). If this synchronized file store released in February is what you're thinking of, I did test a couple days later on the free version for the heck of it, and it didn't work then either. If you're on macOS 14 with Apple silicon, you could check yourself:
|
@dslatkin Almost, you are one release off 😅 I just looked it up again and it turns out that they shipped this with 4.28 (docker/for-mac#7059 (comment)). I also have that one installed locally on my M1 and tried to do cargo builds in a loop as you said. It’s been running for one minute or so without showing any issues 🤷♂️. |
@cynecx Ah that's good to know, thanks for sharing. Funny that the release notes for 4.27 explicitly mentioned this issue as fixed but nobody ended up pinging this thread. I suppose the way to properly test this then would be to downgrade to 4.27, confirm if macOS 15 fixes the issue on that old version, and if fixed probably compare performance/build times and open an issue to remove the hotfix in 4.28. Right now I'm in the middle of a crunch and can't risk disrupting my working setup, but I am hopeful I can get to this in the next few weeks to test if nobody else does first. |
I have an issue on Apple Silicon where building Rust projects will randomly fail in bind-mounted volumes when VirtioFS is enabled in Docker.
I've found it pretty easy to reproduce. First make sure VirtioFS is enabled on the Docker engine and run the container:
Inside the container, if you try building in the bind-mounted volume, builds will randomly fail. In this example, the first build succeeds and the second fails. I'm making sure to
rm -fr target/
every time to make sure the build actually happens.If you try in a normal directory, not a bind-mounted volume, building works fine.
And if you disable VirtioFS and use the old gRPC FUSE file sharing implementation in Docker, building in the bind-mounted directory then works fine as well although much slower, compare 0.94s here to 0.31s from earlier. 🙁
Since this only fails with VirtioFS enabled, I'm guessing it's an issue on their end. I can open an issue on their repo but I figured it might be useful to have this issue tracked here anyways until VirtioFS fixes it.
Also if there's any more Rust/Linux debugging information I could collect and provide to them, or other things I could try before opening the issue there, that would be great.
(edit) Reached out to VirtioFS people and they said it's something to do with MacOS's VIRTIO implementation. I tried submitting something via Mac's feedback assistant back in October, but it hasn't gone anywhere.
The text was updated successfully, but these errors were encountered: