for-mac icon indicating copy to clipboard operation
for-mac copied to clipboard

Docker-cli fails after laptop sleep

Open pwright08 opened this issue 10 years ago • 8 comments

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

  1. Run Docker
  2. Put laptop to sleep (close lid)
  3. Wake laptop up
  4. Run docker-compose up

pwright08 avatar Sep 07 '16 08:09 pwright08

@pwright08 Just to confirm, Docker engine was working correctly before sleep?

mchiang0610 avatar Sep 07 '16 13:09 mchiang0610

Seems similar to https://github.com/docker/for-mac/issues/537

mchiang0610 avatar Sep 07 '16 13:09 mchiang0610

@mchiang0610 yes it was working correctly beforehand

pwright08 avatar Sep 07 '16 14:09 pwright08

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.

jespermjonsson avatar Sep 08 '16 09:09 jespermjonsson

Merging with #119

mchiang0610 avatar Sep 11 '16 22:09 mchiang0610

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

samoht avatar Oct 12 '16 15:10 samoht

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!

dsheets avatar Nov 02 '16 18:11 dsheets

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-robott avatar Jun 19 '20 03:06 docker-robott