Docker-cli fails after laptop sleep
Expected behavior
I should be able to run docker-compose up after waking my laptop up from sleep, even though docker was running when it went to sleep
Actual behavior
% docker-compose up
ERROR: Bad response from Docker engine
% docker ps
Error response from daemon: Bad response from Docker engine
Information
Diagnostic ID: D69C1FD9-D7C5-42F3-8643-074F0C274015 Docker for Mac: 1.12.0-a (Build 11213) macOS: Version 10.10.5 (Build 14F27) [ERROR] docker-cli docker ps failed [OK] app [OK] moby-syslog [OK] disk [OK] virtualization [OK] system [OK] menubar [OK] osxfs [OK] db [OK] slirp [OK] moby-console [OK] logs [OK] vmnetd [OK] env [OK] moby [OK] driver.amd64-linux
Steps to reproduce
- Run Docker
- Put laptop to sleep (close lid)
- Wake laptop up
- Run
docker-compose up
@pwright08 Just to confirm, Docker engine was working correctly before sleep?
Seems similar to https://github.com/docker/for-mac/issues/537
@mchiang0610 yes it was working correctly beforehand
Using the Whale -> Restart option from the status bar doesn't resolve the issue, you must use the Quit Docker option and also verify that no docker processes are running (except for com.docker.vmnetd) before starting again using the Activity Monitor. Otherwise both restart or quit with a too quick start will result in that docker ps command still hangs. Looking in the logs it always seems that nothing more happens after this line has been logged:
Docker[68914] <Notice>: dockerState = Starting
Waiting for all docker processes to terminate and then starting Docker the logs will show much more things after that logged line and docker ps will work again.
Merging with #119
An invariant within the code of one of the components was not held. Docker needs to be restarted.
May be related to docker/for-mac#89
The following log matches:
Sep 5 12:36:03 cortiba.local Docker[com.docker.driver.amd64-linux][20272] <Notice>: VM: 2016-09-05 11:36:04 +0000 UTC daemon.info vsudd: 536 Done. read: 254 written: 4949
Sep 5 12:36:03 cortiba.local Docker[com.docker.osxfs][20270] <Notice>: Volume.stop f4bec7ae3882f847152462391fb4f264d0eae4ddbdb40547ebd04d507f21f20a (paths = [/Users/paulwr/repos/apvs/alpha/external-web, /Users/paulwr/repos/apvs/alpha/uploads/eligibility-uploads])
Sep 5 12:36:03 cortiba.local Docker[com.docker.osxfs][20270] <Error>: WATCH TREE REMOVAL EXISTENCE INVARIANT VIOLATED
Sep 5 12:36:03 cortiba.local Docker[com.docker.osxfs][20270] <Error>: WATCH SUBSCRIBER REMOVAL INVARIANT VIOLATED
Sep 5 12:36:03 cortiba.local Docker[com.docker.driver.amd64-linux][20272] <Notice>: VM: 2016-09-05 11:36:05 +0000 UTC daemon.info vsudd: 517 Done. read: 310 written: 1607
Sep 5 12:36:03 cortiba.local Docker[com.docker.driver.amd64-linux][20272] <Notice>: VM: 2016-09-05 11:36:05 +0000 UTC daemon.info vsudd: Connection 537 to: 2376 from: 00000000
Sep 5 12:36:03 cortiba.local Docker[com.docker.driver.amd64-linux][20272] <Notice>: VM: 2016-09-05 11:36:05 +0000 UTC daemon.info vsudd: Connection 538 to: 2376 from: 00000000
This invariant violation was a symptom of a use-after-free bug in the file system event watching code which occurred due to multiple containers with volume mounts racing to set up their mounts. It is possible that it caused your hangs or crashes and has been fixed in the recently released Beta 29.3. Please open a new issue for any further problems. Thanks!
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