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

Docker Hangs intermittently #2984

Closed
dunwho opened this issue Jun 8, 2018 · 4 comments

Comments

@dunwho
Copy link

commented Jun 8, 2018

  • I have tried with the latest version of my channel (Stable or Edge)
  • I have uploaded Diagnostics
  • Diagnostics ID:

Expected behavior

Docker doesn't hang

Actual behavior

Docker hangs intermittently. Needs to be completely restarted to get it running properly again

Information

  • macOS Version:

Diagnostic logs

DIAGNOSTIC ID: 8C3AB885-B389-47C0-980B-799EBB5D8F56

Docker for Mac: version: 18.03.1-ce-mac65 (dd2831d4b7421cf559a0881cc7a5fdebeb8c2b98)
macOS: version 10.12.6 (build: 16G1314)
logs: /tmp/8C3AB885-B389-47C0-980B-799EBB5D8F56/20180608-184359.tar.gz
failure: docker ps failed: (Failure "docker ps: timeout after 10.00s")
[OK] vpnkit
[OK] vmnetd
[OK] dns
[OK] driver.amd64-linux
[OK] virtualization VT-X
[OK] app
[OK] moby
[OK] system
[OK] moby-syslog
[OK] kubernetes
[OK] files
[OK] env
[OK] virtualization kern.hv_support
[OK] osxfs
[OK] moby-console
[OK] logs
[ERROR] docker-cli
docker ps failed
[OK] disk

Docker for Mac: version...
Version 18.03.1-ce-mac65 (24312)

Steps to reproduce the behavior

It just happens intermittently and is noticed when a request is made to a container.. very hard to grab any logs at exactly that moment as Docker is just completely unresponsive.

4 CPUS
Memory 6.0GiB
Swap: 1.0GiB

@djs55

This comment has been minimized.

Copy link
Contributor

commented Jun 12, 2018

Thanks for your report. Looking through the logs that exist I can see that the networking is working in the VM and the console/dmesg don't seem to have anything worrying on them. We don't seem to have the contents of /var/log inside the VM which would include the crucial docker.log :(

There have been some diagnostic improvements (and general bug fixes) in the latest edge version:18.05.0-ce-mac67 -- could you give that a go and let me know how it goes? If it fails, could you upload a fresh diagnostic and also try logging into the VM via the serial console with screen ~/Library/Containers/com.docker.docker/Data/vms/0/tty. I'm interested to know what happens if you run

  • ls /var/lib/docker
  • df
  • docker ps

inside the VM.

@djs55

This comment has been minimized.

Copy link
Contributor

commented Jun 13, 2018

While investigating this I discovered that the VM log directory was accidentally created in tmpfs (i.e. RAM) rather than on disk. It's possible that the logs build up until the RAM is full, at which point the VM starts to hang. A restart clears the RAM and makes it ok again.

I can't tell for sure whether this explains your problem or not, but there is a development build with a fix if you'd like to try it: https://download-stage.docker.com/mac/bysha1/8d256c2d490c2bc1c32544636d363757c5e2aaa6/Docker.dmg

Note the development build is suitable only for testing and not for production.

@steakknife steakknife referenced this issue Jun 27, 2018

Closed

Yet another hanging DfM #3037

2 of 2 tasks complete
@dunwho

This comment has been minimized.

Copy link
Author

commented Jul 25, 2018

@djs55 Apologies for failure to follow up on this.

I just downloaded the latest release of docker which includes your bug fix and I can report that it has had a significant impact on memory usage in the container. We still see some signs of memory leakage but that is likely on our end where we need to improve. Hopefully this will alleviate the issue of Docker hanging.

I will return to completely normal usage and report back if the issue reoccurs. It could simply be that memory limit is reached at a much later stage, which would not be a bad result but like I said that is likely due to leakage and memory management issues on our end if anything.

Thanks for getting this issue sorted and for following through despite my lack of help!

@docker-desktop-robot

This comment has been minimized.

Copy link
Collaborator

commented Oct 23, 2018

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale comment.
Stale issues will be closed after an additional 30d of inactivity.

Prevent issues from auto-closing with an /lifecycle frozen comment.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.