-
Notifications
You must be signed in to change notification settings - Fork 118
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
Slow performance, incomplete file content, broken filesystem events with gRPC FUSE #4999
Comments
I have a Rails project experiencing the same issue—code changes on the host are not reflected inside the container. Information
|
Thanks for the report. Regarding incomplete content do you mean one single file is truncated or corrupted or do you mean some files are current while some files are out of date? When the server crashes, what kind of crash is it? Is the server getting a file I/O error or something else? If it's the case that a single file is truncated or corrupted, I wonder if the event injection itself is causing incomplete data to be cached in the VM. In case you have time to experiment I've created a build which only injects To help me better understand how I could reproduce this, could you let me know
Thanks for your help! |
Another anecdotal data point: I've seen occasional (on the order of daily) cases where individual files on a volume mount become inaccessible with the error |
I also experienced an I also sometimes notice a long delay when starting a container. Previously, |
Another piece of anecdata: I've had this same issue with Webpack + tsc in a container watching source files on my host. I'll frequently get errors about files already being open, etc. I found that saving the files again would let me get past the error (as if it were finally detecting the appropriate state). I was hoping 2.5.0.0 would address the issue. It didn't. Since disabling the gRPC FUSE experiment, I haven't experienced this. |
I'm also seeing some very weird file behavior in a container with gRPC FUSE turned on. Files "disappear" and can't be listed or deleted, but they can be I can reproduce this fairly reliably by trying to remove my PHP project's Composer Here's an example of a disappearing file.(container) Try to
(container) Trying to list what files remain shows an empty directory:
(host) from the host, I can see that a few files remain:
(container) if I pick one of those files and
(container) if I try to If I turn off gRPC FUSE, I cannot reproduce this behavior. MacOS 10.15.7 on a 2019 MBP. Docker Desktop 2.5.0.0. |
I have a new experiment build which may help with file truncation problems: https://desktop-stage.docker.com/mac/edge/49788/Docker.dmg Unfortunately it hasn't been notarized. Regarding other issues, if anyone could provide a repro case that would be very helpful. |
Has anyone tried this experimental build? We'd love to know if it fixed the problem. |
Installed today. Let's see if something comes along ;) |
Sorry but I have still the same problems that I have with the stable version. What is happening to me is:
Here it is an example of my docker-compose file: container-name:
image: image_name
container_name: container-name
build:
context: .
volumes:
- ../:/opt/acme/code/:delegated
- /opt/acme/code/node_modules/
- ./aliases.sh:/opt/acme/aliases.sh
# Overrides default command so things don't shut down after the process ends.
command: sleep infinity
ports:
- 8080:8080
- 9229:9229
- 9615:9615
networks:
- acme
depends_on:
- container-name-2 I uploaded a Diagnostic ID: I have a macOS BigSur 11.0.1 (20B29) and Docker Desktop 2.5.1 (49788) I hope this helps, let me know if you need some other infos. |
Turning gRPC fuse off, and switching back to osxfs solves the problem for now. |
I have the same problem that often after startup and a few seconds, mounted files appear empty. It seems that it recognizes the file as a folder. I have tried the following variations:
Docker versions: 2.5.1, 3.0.0, 3.0.1 log:
If I turn off gRPC, then it works. |
I'm sorry I don't have more time for debugging. I can only say that this is still happening for me in Docker Desktop 3.0.3. Additionally, osxfuse stopped propagating file system events as well for some reason. Out of desperation I set up https://mutagen.io/documentation/orchestration/compose (see also mutagen-io/mutagen#235) which seems to be working so far. I have to run my apps as |
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. |
Closed issues are locked after 30 days of inactivity. If you have found a problem that seems similar to this, please open a new issue. Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows. |
I have a project that runs 5 containers, 3 of them have mounted volumes. It's all in TypeScript and using filesystem events (CRA, Gatsby,
ts-node-dev
). When using gRPC FUSE performance is noticeably slower when restarting any of the servers but most importantly file syncing and filesystem events randomly stop working. Very often it happens after modifying one file just a few times.My apps either stop picking up file changes or crash because somehow they get incomplete content for that modified file (as if the filesystem event fired before the file finished syncing?). The only remedy seems to be restarting the container (
docker-compose down && docker-compose up
). Sometimes even that doesn't help and I have to restart the Docker daemon.For the diagnostics ID pasted below I started
docker-compose
, changed the file, saved, the server picked up a change and restarted. Then I undid the change, saved, the server picked it up. Then I redid the change, the server no longer picked up the change. From now on no change caused filesystem events to fire. Doingdocker-compose exec XYZ cat /path/to/file
showed that the file was updated after each change though.This is just one of the problems. Sometimes it seems like the file is "stuck" with incomplete content and no matter how many times I save it, the server crashes when receiving the filesystem event and trying to reload.
I first mentioned this problem in docker/roadmap#7 (comment)
Expected behavior
File changes are picked up, file content is complete and up-to-date, filesystem events fire. Performance is on par or better than osxfs.
Actual behavior
None of the above happens. Performance is worse than osxfs.
Information
Diagnostic logs
There's no "Diagnose & Feedback" in the menu so I'm not sure what else to provide in this section.
Steps to reproduce the behavior
Since the problem occurs randomly it's hard for me to find a minimal case to reproduce. I can provide my Dockerfiles but they're basically pretty small Alpine images with a few packages installed and
npm ci
.The text was updated successfully, but these errors were encountered: