-
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
com.docker.hyperkit 100% cpu usage is back again #3499
Comments
FYI Was also happening on stable and I upgraded to edge to see if if made a difference... (Ron Howard voice: "It didn't make a difference") |
SAME PROBLEM HERE!!!! |
Same problem here. Tried solving it with solutions mentioned in #1759 like decreasing the CPU count and increasing but that didn't help. |
Same, also #1759, which this is probably a duplicate of. |
@jammi so I had been experiencing #1759 but that seemed to go away around 18.06 This issue only appeared since the new year. And the symptoms sound different. CPU usage is fine until 💥 and then the Docker VM is unresponsive to any control. I need to force kill all the Docker processes. Another strange datapoint. In an effort to see what might be going wrong, I kept a window open on the Docker VM’s TTY and had that running |
@stephenc Ok, this sounds like the issues I've been having since Docker Desktop 2.0; November-December. I can just leave it idle and it'll still go crazy high on CPU and not respond to anything. Killing and restarting it does not help, it goes right back up. "Reset to factory defaults" helps for an hour to a day or so, and then it goes on again. It's a huge PITA and made Docker Desktop essentially useless, so I've resorted to running VirtualBox for any local Docker and Kubernetes operations, which is far from ideal and seriously hurts productivity. |
I'm having a similar issue as well. I've had to resort to running all my services natively on a mac mini instead of docker, I can't even run kube because idle without anything running it consumes like 50+% on all my cores making my laptop really sluggish. Now I need to buy a Linux box to run kube on so I can test stuff :( spinning it up frequently just for tests and having to shut it down after is becoming tedious. |
SAME PROBLEM HERE!!!! |
The same issue with 2.0.0.2 on Mac-mini (macOS Mojave 10.14.3). |
Same here Docker desktop Version 2.0.0.3 (31259) |
What is the workaround for running docker on a mac until this issue gets ack'd or addressed? |
Same problem here. Is there any workaround to solve this issue? Thanks. |
Upper in this topic somebody suggested to use docker-sync on macos. For me this worked. But it have some bugs, so i'd like to see native solution from docker team |
I'm basically back to Virtualbox and docker-machine configurations on it. Since it's not exactly a lightweight configuration either, I'll probably have to invest in some portable Linux cluster to develop locally on. |
The same Here Using Docker 2.0.0.3 Mac OS 10.14.3 |
I think we all know that docker is the real cause of global warming. 😛 |
Same problem here using Docker 2.0.0.3 Mac OS 10.14.3 |
Same issue. Mac OS 10.13.6 Docker Desktop 2.0.0.3. Eats 100% CPU with no containers running, and after quitting Docker Desktop com.desktop.hyperkit must be force quit. Did reset to factory defaults. |
Same issue here |
Still happening for me... though it hasn't struck for a while, its back with vengeance today! (Mostly hasn't struck in a while because I haven't been starting, running and stopping containers) |
Same issue... |
Happening on 10.14.4 too. Docker Desktop 2.0.0.3 |
Same issue: i tried to reset to factory defaults and reset the disk image. It does not help. CPU of com.docker.hyperkit goes to 200% even before i started any containers. Restarting the computer temporary fix the issue! macOS 10.14.14 |
The same issue on Edge version Docker Desktop is almost unusable now 8( |
Same issue, do you have a solution? |
Running into this as well |
In my case I was doing a |
Same here - any update? |
EDIT: Below did not actually resolve the issue. After about 1 hour, CPU started to spike again I had the same issue which now seems to be resolved: I first tried the maxfiles fix noted here: #1759 I then adjusted my memory to 6G and my swap down to 512MB and the issue is gone. MBP i7 OSX 10.14.3 Docker Desktop 2.0.0.3 Engine 18.09.2 |
Which project is that? I'll be more than happy to open a ticket with them. |
As far as I can see - still more than 100% with running containers :c ( Docker 2.3.4 stable ) |
@AlexanderDyriavin if you have running containers please find a different bug. This is issue (in order to assist the Docker people to fix it) is specifically about having high CPU usage with no containers running and with Kubernetes not enabled. I will close this issue if 2.4.1 doesn't spin up the CPUs on me during the next two weeks as that seems long enough to prove the absence of the issue that caused me to raise the bug in the first place |
It would be on kubernetes/kubernetes. I suggest you read the whole of kubernetes/minikube#3207 first, where the minikube team are fighting with the same issue. kubernetes/kubernetes#89936 is one ticket they mentioned, but I'm not sure if that's the whole problem. |
@AlexanderDyriavin Please upgrade to 2.4, we have made a lot of improvements. |
Ok, I had to do some stuff on an older service module in our code base. Previously thig bug would hit about every 3-4 times you fired up the suite of services... Nothing so far. I'll be doing more testing next week, but from what I can see, the issue that caused my original bug report appears to be gone now... |
I'm on the latest edge and it's been super smooth for me who only runs a couple containers a few times a week. |
Same. |
I have installed 2.4.0.0. |
@WimCools Please upload diagnostics. We can't do anything without diagnostics. Thanks. |
Here the output of the diagnostics run : |
Same issue with 2.4.0.0 |
Let me take a look @kimwilson |
9FB8F573-ADD1-44BA-8718-0C7AFD708805/20201007181433 2.4.0.0 com.docker.hyperkit uses CPU with no actual task being run by me |
I am now happy after one week of heavy soak testing to consider my original issue resolved. I am closing this issue as FIXED. I encourage others to open new issues for their remaining issues, my problem with the space-heater is resolved. 😹 |
Hey all, We have now shipped the changes from our investigation over the last 3 months as part of the 2.4 Desktop release. We will do a blog post in a few weeks detailing the things we found/changes we made to give you some insight into what we did and why. If you are still having issues, I would ask that you create new tickets on for-mac rather than comment on old tickets as we are going to close these to keep our backlog a bit tidier and not mix up the messages (and it is easier for us to get signal on the scale of issues this way). Thanks again for your patience and an even bigger thank you to all of you who took the time to test builds & upload diagnostics! |
I encountered a new related issue that seems possibly to have emerged in 2.4.0.0: #4981 |
@stephen-turner update after a week+ - the problem seems to be resolved, com.docker.hyperkit is not wasting more than 50% CPU |
Great, thanks for the update. Current status is that most people seem to be saying that it's fixed. There are one or two rarer CPU bugs in other tickets that we're still tracking down. |
This is most def not fixed. It ranges anywhere from 100% to 600% at times for me - which is freaking crazy. This is the 4th time that it has forced my machine's battery to 0% WHILE PLUGGED IN! I dunno what this process is doing, but it ain't good. |
@infolock Please open a new ticket with a diagnostics id. Thank you. |
I have installed 2.4.1.0 (48583) I don't see any improvements. |
With version 2.4.1.0 my container does not build anymore :
failed to solve with frontend dockerfile.v0: failed to build LLB: executor failed running [/bin/sh -c cp /download/ravdev_hosts /etc/hosts]: runc did not terminate sucessfully |
I'm going to lock this issue now as the biggest causes of this symptom have been fixed. If you are still having CPU problems, please open a new ticket with a diagnostics id so that we can investigate it. Thank you. |
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. |
Summary
This is an issue with a lot of comments and rumors of fixes and confusion over what the exact issue underlying this bug is.
False leads
Here is what we know, because it can get lost in the comments.
Current hypothesis
There is an edge case in the filesystem synchronization code and when triggered it causes the receiver process in the Docker VM to go into an infinite loop and suck all the CPU cycles of one CPU core.
As of 2020-05-28, the leading candidate for this hypothesis is around this line of code: https://github.com/moby/hyperkit/blob/79c6a4d95e3f8a59f774eb66e3ea333a277292c6/src/lib/mirage_block_ocaml.ml#L422 and see this comment: #3499 (comment)
Mitigations
Things that can cause the infinite loop seem to involve syncing of file system events between OS-X and the docker VM. The fewer file system shares you have, the less likely this is to occur. Similarly, if you can switch your filesystem mounts to
:cached
then that means there will be fewer notifications being sent back and forth between the Docker VM and OS-X, just less chance of the issue.The native Docker K8s implementation seems to involve a lot of this kind of sync, so you are more likely to trip over the issue.
Stuff I have found that makes life easier:
/Volumes
but once I removed that the frequency of occurrence was greatly reduced:I leave
/private
and/tmp
because some of the projects I work on have tests that use TempDirs as docker volume mounts.Hope this helps.
P.S. Remember your actual containers that you are running may be causing their own CPU usage spikes... that is not what this bug is about... those CPU spikes are likely the result of bugs in your containers or perhaps how you have configured volume mounts causing your containers to see excessive file system changes. This bug is for Docker CPU spiking when not running any containers or pods at all
P.P.S. I have heard interesting things about using Multipass to run k3s on OS-X without docker at all: https://medium.com/@zhimin.wen/running-k3s-with-multipass-on-mac-fbd559966f7c but that would, AIUI, force me to use something like Kaniko to actually build docker images within the k3s and that gets really ugly really fast. My current recommendation is to use k3d as my usage patters of Docker with k3d is only spiking the CPU about once a week for me.
Original bug report
Expected behavior
com.docker.hyperkit
should not turn my Mac into a space heater with megawatt output when stopping all running containersActual behavior
com.docker.hyperkit
process jumps to use all available CPU resources multiple times per day, some times when only vaguely interacting with docker.All docker commands lock up, e.g.
docker ps
Information
Diagnostic logs
This seems relevant
A second log after restarting docker from previous one. Only docker commands executed in between restart and this lock-up:
And the logs:
Steps to reproduce the behavior
The text was updated successfully, but these errors were encountered: