Skip to content
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.supervisor 100% cpu usage #2923

Closed
felixbuenemann opened this issue May 20, 2018 · 31 comments
Closed

com.docker.supervisor 100% cpu usage #2923

felixbuenemann opened this issue May 20, 2018 · 31 comments

Comments

@felixbuenemann
Copy link

felixbuenemann commented May 20, 2018

After recently updating to 18.05.0-ce-mac66 (24545) on macOS 10.13.4 (17E202) I noticed today that the com.docker.supervisor process had started to have 100% cpu usage over night.

I have uploaded a stack-trace of the com.docker.supervisor process when it was eating all cpu in the following gist: https://gist.github.com/09b8f0a0d7c960e06b671e4a9faab13a

The problem could be fixed by killing the supervisor process and restarting Docker for Mac.

@felixbuenemann
Copy link
Author

Unfortunately I didn't export a CPU-Time analysis of the stack-trace, which would have been more useful in this case. I'll post one, if the issue re-appears.

@Joshfindit
Copy link

Joshfindit commented May 23, 2018

Having a similar issue, but mine hovers between ~95% and ~105%.

OSX 10.12.6 (16G1114)
Engine: 18.05.0-ce-mac66 (24545)

@asoorm
Copy link

asoorm commented May 23, 2018

screen shot 2018-05-23 at 20 28 39

My machine is about to take off I think!

$ docker version
Client:
 Version:      18.05.0-ce
 API version:  1.37
 Go version:   go1.9.5
 Git commit:   f150324
 Built:        Wed May  9 22:12:05 2018
 OS/Arch:      darwin/amd64
 Experimental: true
 Orchestrator: swarm

Server:
 Engine:
  Version:      18.05.0-ce
  API version:  1.37 (minimum version 1.12)
  Go version:   go1.10.1
  Git commit:   f150324
  Built:        Wed May  9 22:20:16 2018
  OS/Arch:      linux/amd64
  Experimental: true

@BretFisher
Copy link

Same issue here, Diagnostic ID 63E96CD0-0C00-47D4-8722-55299AA803AC/20180523-222626. 100% CPU (single core) with no containers running since re-starting Docker and let it sit idle a few hours.

@akimd
Copy link
Contributor

akimd commented May 24, 2018

We believe that this issue was identified and fixed recently (https://github.com/docker/pinata/pull/9355).
Could you try with this version? https://download-stage.docker.com/mac/pr/24648/Docker.dmg

@vegasbrianc
Copy link

I also submitted a Diag yesterday for the same incident.

@felixbuenemann
Copy link
Author

@akimd Is the docker/pinata repo private? I'm getting a 404 if I try to view the linked PR or repo.

@akimd
Copy link
Contributor

akimd commented May 24, 2018

Yes, it is, sorry about that.

@sjwl
Copy link

sjwl commented May 24, 2018

not just cpu, but also network is surging

image

@BretFisher
Copy link

BretFisher commented May 24, 2018

@akimd looks like a newer version 24677 is out, I'm testing that today.

@ear
Copy link

ear commented May 25, 2018

I have been experiencing this issue (twice in two days) with Version 18.05.0-ce-mac66 (24545).

By the way @BretFisher how do you get 24677? The release notes link to 24545.

@akimd
Copy link
Contributor

akimd commented May 25, 2018

I gave a link to 24648 above. Using random builds by playing with the numbers over there is asking for trouble, be sure to use only versions one of us pointed to.

@akimd akimd self-assigned this May 25, 2018
@BretFisher
Copy link

So far everything is fine on 24700

@akimd
Copy link
Contributor

akimd commented May 28, 2018

Good. Let's close this. Thanks all!

@deitch
Copy link

deitch commented Jun 7, 2018

When does that build/those fixes get incorporated into the next Edge release?

@bertolo1988
Copy link

bertolo1988 commented Aug 3, 2018

Same issue here on Version 18.06.0-ce-mac70 (26399).

@rkingon
Copy link

rkingon commented Oct 14, 2018

yikez, this is killing me! I am on Version 18.06.1-ce-mac73 (26764)

I'm on battery life right now, was at 80%, walked away to get coffee and apparently it started as my machine went into sleep mode? I came back 20minutes later with 15% battery!

I absolutely love docker and have integrated it into all my workflows. Hope this resolves quickly :(

@tatwater
Copy link

tatwater commented Nov 2, 2018

Just caught this using 226% of my CPU, draining my battery like crazy, same release as rkingon above.

@perhallstroem
Copy link

I, too, am observing this on 18.06.1-ce-mac73. The described behaviour appears to commence without any overt action taken by any operator of the computing system. A typical scenario is that one retires in the eventide with a normal device—to the touch somewhat lukewarm—and returns on the morrow only to find a blistering gale issuing from the ventilation apertures. On further inspection, one then sees that the com.docker.supervisor process greedily performs its enigmatic operations and that a stream of packets, in tirelessness commensurate, is being transmitted across (as an observer above has noted) what appears to be a local interface: for such traffic is seemingly undisturbed by the disabling of all external network interfaces. Further, having observed the above-described process continuing uninterrupted for hours, one assumes that it is unceasing and therefore tires rather than awaits the conclusion of that which is ostensibly unceasing.

An interim measure that I have adopted is to terminate the offending process (that is, com.docker.supervisor). Such an action could, peradventure, give rise to a slight degradation in the feature richness manifested by the application components, however.

By which I mean +1.

@benlangfeld
Copy link

I'm experiencing the same issue. Diagnostic ID 7F2CE4A0-332F-4962-AB56-D21435E7EC0F/20181107184649.

@benlangfeld
Copy link

@akimd Could this please be re-opened? The issue is not fixed.

@rkingon
Copy link

rkingon commented Nov 7, 2018

100% not fixed -- happens to me almost every day! i'm pretty sure I've lost life out of my computer from letting it heat up and sit at 100+% cpu =/ (and not realizing it)

@craigsansam
Copy link

Also experiencing this issue here as well - Diagnostic ID 1C1DCE3A-775D-4ACD-9BBC-234420548FC0/20181114105459

@jasonkarns
Copy link

Same. still occurring for me: 2.0.0.0-mac81 (29211), Engine: 18.09.0

@ltm
Copy link

ltm commented Nov 30, 2018

I'm seeing this as well on Docker version 18.09.0. The supervisor is sending 100,000s of (NTP?) packages per second to my local launchdns daemon:

$ sudo tcpdump -i lo0 -k NP -c 1000 -X
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on lo0, link-type NULL (BSD loopback), capture size 262144 bytes
14:36:00.865211 pid com.docker.supe.18169 svc BE IP localhost.51788 > localhost.55353: UDP, length 48
	0x0000:  4500 004c 7da9 0000 4011 0000 7f00 0001  E..L}...@.......
	0x0010:  7f00 0001 ca4c d839 0038 fe4b 2201 81ec  .....L.9.8.K"...
	0x0020:  0000 0000 0000 0000 4c4f 434c dfac 0fa0  ........LOCL....
	0x0030:  dd7e 0264 dfac 0fa0 dd7b 84db dfac 0fa0  .~.d.....{......
	0x0040:  dd7e 0264 dfac 0fa0 dd7e 0264            .~.d.....~.d
[...]
14:36:00.874709 pid launchdns.40263 svc BE IP localhost.55353 > localhost.51788: UDP, length 48
	0x0000:  4500 004c f5b3 0000 4011 0000 7f00 0001  E..L....@.......
	0x0010:  7f00 0001 d839 ca4c 0038 fe4b 2201 8103  .....9.L.8.K"...
	0x0020:  0000 0000 0000 0000 4c4f 434c dfac 0fa0  ........LOCL....
	0x0030:  dfea 5f84 dfac 0fa0 dfe5 a78f dfac 0fa0  .._.............
	0x0040:  dfea 5f84 dfac 0fa0 dfea 5f84            .._......._.
1000 packets captured
4226 packets received by filter
0 packets dropped by kernel

Instruments shows the following as the heaviest stack trace:

69279  com.docker.supervisor (18169) :0
 7472  <Unnamed Thread> 0x275557 :0
 6700  github.com/docker/pinata/mac/backend/ntp.NewServer.func1
 6684  github.com/docker/pinata/mac/backend/ntp.(*Server).Serve
 2910  net.(*UDPConn).WriteToUDP
 2882  net.(*UDPConn).writeTo
 2822  net.(*netFD).writeTo
 2787  internal/poll.(*FD).WriteTo
 2621  syscall.Sendto
 2589  syscall.Syscall6
   65  runtime.exitsyscall
   17  runtime.exitsyscallfast
    1  runtime.exitsyscallfast_reacquired

@ltm
Copy link

ltm commented Nov 30, 2018

It should be noted that launchdns simply echos invalid DNS requests with bytes 3-4 set to 0x8103:

while (quit == 0) {
        int n = recvfrom(sd, msg, RECV_SIZE, flags, &caddr, &len);

        ...

        } else {
                // NXDomain
                msg[2] = 0x81;
                msg[3] = 0x03;
        }

        sendto(sd, msg, n, flags, &caddr, len);
}

The mystery to me is why the Docker supervisor is sending NTP packets to a DNS server.

@kivikakk
Copy link

@ltm:

The supervisor is sending 100,000s of (NTP?) packages per second to my local launchdns daemon

Nice find! I'm seeing this exact same behaviour:

13:42:45.356693 pid com.docker.supe.1013 svc BE IP localhost.57007 > localhost.55353: UDP, length 48
	0x0000:  4500 004c e22d 0000 4011 0000 7f00 0001  E..L.-..@.......
	0x0010:  7f00 0001 deaf d839 0038 fe4b 2201 81ec  .......9.8.K"...
	0x0020:  0000 0000 0000 0000 4c4f 434c dfef b025  ........LOCL...%
	0x0030:  5b4e 874c dfef b025 5b43 73f3 dfef b025  [N.L...%[Cs....%
	0x0040:  5b4e 874c dfef b025 5b4e 874c            [N.L...%[N.L
13:42:45.356700 pid launchdns.16631 svc BE IP localhost.55353 > localhost.57007: UDP, length 48
	0x0000:  4500 004c b234 0000 4011 0000 7f00 0001  E..L.4..@.......
	0x0010:  7f00 0001 d839 deaf 0038 fe4b 2201 8103  .....9...8.K"...
	0x0020:  0000 0000 0000 0000 4c4f 434c dfef b025  ........LOCL...%
	0x0030:  5b4c 1a8a dfef b025 5b40 5f6b dfef b025  [L.....%[@_k...%
	0x0040:  5b4c 1a8a dfef b025 5b4c 1a8a            [L.....%[L..

This keeps Docker, kernel_task and launchdns locked into consuming 2.5 cores:

image

Restarting launchdns seemed to stop Docker from flooding it with requests and brought things back to normal. Previously I was restarting the Docker daemon entirely, which was a huge fuss.

Definitely still an outstanding bug here.

@chrisharrisonkiwi
Copy link

I'm also unsure if this issue has actually been resolved.
Seeing hyperkit using 379% today over 18 threads...

@rkingon
Copy link

rkingon commented Mar 17, 2019

+1 i see this every day

@ltm
Copy link

ltm commented Mar 17, 2019

@chrisharrisonkiwi A new issue was opened for this. Please see #3565.

@docker-robott
Copy link
Collaborator

Closed issues are locked after 30 days of inactivity.
This helps our team focus on active issues.

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.
/lifecycle locked

@docker docker locked and limited conversation to collaborators Jun 28, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests