-
Notifications
You must be signed in to change notification settings - Fork 119
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
Volume synchronization bug on M1 Mac #6219
Comments
In case it's relevant, here's the Dockerfile for the image where I experienced the issue (I haven't tested any other images at this point):
|
Same issue with |
Same issue with |
not sure how this new VirtioFS feature works but I've seen similar behaviour with webdav mounted volumes (unsure if it is of any help) |
Might also be related to #5795 |
I’ve noticed I get a lot of ‘git loose object` corruptions when trying to commit from a container when using VitrioFS on an Intel Mac. Turning off VitrioFS allowed me to commit. |
@twss I've seen the exact same behaviour. when I switch to the mounted directory on the host (because I get the error you mentioned in the container) I'm able to commit my code. |
Same issue with 4.8.2 |
Issues go stale after 90 days of inactivity. Prevent issues from auto-closing with an If this issue is safe to close now please do so. Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows. |
/remove-lifecycle stale |
There is def an issue here. Eventually I tried changing the image from But now today I just tried to run a fresh http container and found volume mounts would simply not work. Using the command from the docker hub documentation:
I was only ever able to get the default index.html provided by the image. I jump into the contianer and do an After pulling my hair our for 2 hours I walked over to my old PC and ran the exact same command on Ubuntu WSLv2 and it works. Created a test folder with a file and it appears and the default index.html is nowhere to be seen. So yeah def an issue with volume mounts going on but seems to be working for some images and not others. ( all images tested support arm64). |
Just for other folks, who searching quick-fix: the problem in |
There hasn't been any activity on this issue for a long time. Prevent issues from auto-closing with a /lifecycle stale |
/remove-lifecycle stale |
There hasn't been any activity on this issue for a long time. Prevent issues from auto-closing with a /lifecycle stale |
/remove-lifecycle stale |
/remove-lifecycle stale |
I had similar issue when we try to build rust code in container. We mount the One thing I am confused is that everything is happening in container for my case. We compile and build source code from scratch in the container. How would sync issue between host and container cause such a problem? The container cannot read what it writes? |
Facing same issue on Apple Mac M2 pro + Docker for Desktop 4.22.1 |
@Arpanbhagat5 I found specific images seem to work more often than others. I've been using |
@b-hayes Thanks for sharing some details on this. |
Out of curiosity @zhixinwen, were the error messages you were experiencing similar to those here?
|
Yes
Get Outlook for iOS<https://aka.ms/o0ukef>
…________________________________
From: Daniel Slatkin ***@***.***>
Sent: Wednesday, October 11, 2023 8:38:37 PM
To: docker/for-mac ***@***.***>
Cc: Zhixin Wen ***@***.***>; Mention ***@***.***>
Subject: Re: [docker/for-mac] Volume synchronization bug on M1 Mac (Issue #6219)
I had similar issue when we try to build rust code in container. We mount the /target dir from host to container, where all the compiled code would be stored in. The linker would complain about not able to link the compiled .o code because they cannot be found. Disabling VitrioFS fixes this.
One thing I am confused is that everything is happening in container for my case. We compile and build source code from scratch in the container. How would sync issue between host and container cause such a problem? The container cannot read what it writes?
Out of curiosity @zhixinwen<https://github.com/zhixinwen>, were the error messages you were experiencing similar to those here<rust-lang/docker-rust#161 (comment)>?
/usr/bin/ld: cannot find /failing-builds/target/debug/deps/failing_builds-64e53c5ba8e26b41.2siq4apgpszziqx5.rcgu.o: No such file or directory
—
Reply to this email directly, view it on GitHub<#6219 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ACN2JKOQS6ACNBPYL5BPKLDX65Q33ANCNFSM5QDU5MFA>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
I'm running into this same issue FWIW, my use case differs slightly. I'm writing a file to a shared drive from a JVM app running on the host OS. After the app finishes writing the file and closing it, it tells postgres (running in a container) to do a bulk import of the file. Postgres errors with a message indicating the file is incomplete / corrupted. However, if I simply tell Postgres to try importing the file again, it passes. Switching back to grpc fuse resolve my issue for now, but I'd really like to keep using virtio FS |
To echo other commentators here, I've also had similar errors with git "loose object" corruption. In my case it was fetching from about 70 remotes using GNU parallel while effectively using unlimited number of jobs with I've also had mind-bending issues where I would I disable VirtioFS, all the problems go away. I will call out I think this core issue may still be perfectly reproducible using the |
I just tested this issue (probably the same as #6270) again in 4.27.2 using steps from rust-lang/docker-rust#161 and sad to report this issue still persists, preventing rust builds working in bind-mounted file systems. |
Still having this issue. Files updated on my local file system are not updating in the container. |
I'm in the same situation as @ajoy39 |
Is it still a problem? |
Yes, I can still see this happening in My use case: I'm adding new entries to a sqlite database that I would expect to be available inside the container. It is not, I have to restart the container for the changes to be recognized. This is part of an autotest pack that works fine on linux. I'm happy to build a minified example out of this usecase if that helps with repro. |
Apple (just yesterday) got back to me about my issue opened via Feedback Assistant about VIRTIO affecting Rust builds in Docker in rust-lang/docker-rust#161. They said a potential fix was identified and asked that I test again using MacOS 15 beta. It seems the issue might be fixed? For anyone wanting to test the fix, this worked for me:
Hoping to hear this addresses other issues like this as well. 🙂 |
For example, when I perform a git operation, like checkout or merge, things get messed up. |
Expected behavior
Consistent synchronization of file contents inside and outside the container
Actual behavior
When mounting a volume in an M1 Mac, file synchronization doesn't work reliably. Sometimes the Docker container still has an old copy of the file after saving a new version of the file on the host.
This seems to happen when checking out a different branch using git on the host (maybe too many file changes for it to handle at once? But the repo I'm working with isn't particularly big...)
Information
macOS version: 12.2.1
M1 Pro (MacBook Pro (16-inch, 2021)
Docker Desktop Version: 4.5.0
Output of
/Applications/Docker.app/Contents/MacOS/com.docker.diagnose check
Steps to reproduce the behavior
Then check out a different branch in git (e.g. run
git checkout some-other-branch
on the host)Change a file in the current working directory and observe that the file hasn't been updated inside the container.
The text was updated successfully, but these errors were encountered: