"Docker Desktop is stopping" on macOS M1 Max and hanging
- [x] I have tried with the latest version of Docker Desktop
- [ ] I have tried disabling enabled experimental features
- [x] I have uploaded Diagnostics
- Diagnostics ID: F2606449-114C-4887-8E78-7926B365C0EE/20220905023134
Expected behavior
Docker Desktop starts and I can use the cli tool.
Actual behavior
I cannot run the cli tool, nor Docker Desktop is usable - it shows "Docker Desktop is stopping" and the whole UI is unusable, except for the bug report/reset tool (and various not so useful views).
Information
- macOS Version: 12.5.1 (21G83)
- Intel chip or Apple chip: Apple chip - M1 Max
- Docker Desktop Version: 4.12.0 (85629)
This behaviour is not reproducible on any other Mac computer I have access to other than the one I used to produce the diagnostics.
The problem is new - Docker Desktop used to work last week (This is Friday and today is Monday), which was running a previous version - either 4.11 or 4.7 or something close, since I did not note it except that I have a memory of seeing a version number when trying to re-install via homebrew.
The problem did not appear with an update, but with a restart of the computer and an update to the latest Docker Desktop did not resolve it.
Output of /Applications/Docker.app/Contents/MacOS/com.docker.diagnose check
$ /Applications/Docker.app/Contents/MacOS/com.docker.diagnose check
Starting diagnostics
[PASS] DD0027: is there available disk space on the host?
[PASS] DD0028: is there available VM disk space?
[FAIL] DD0031: does the Docker API work? Cannot connect to the Docker daemon at unix://docker.raw.sock. Is the docker daemon running?
[FAIL] DD0004: is the Docker engine running? Get "http://ipc/docker": dial unix lifecycle-server.sock: connect: no such file or directory
[2022-09-05T02:33:16.780765000Z][com.docker.diagnose][I] ipc.NewClient: 08ac81ec-com.docker.diagnose -> lifecycle-server.sock VMDockerdAPI
[linuxkit/pkg/desktop-host-tools/pkg/client.NewClientForPath(...)
[ linuxkit/pkg/desktop-host-tools/pkg/client/client.go:59
[linuxkit/pkg/desktop-host-tools/pkg/client.NewClient({0x100ad5e20, 0x13})
[ linuxkit/pkg/desktop-host-tools/pkg/client/client.go:53 +0x90
[common/pkg/diagkit/gather/diagnose.isDockerEngineRunning()
[ common/pkg/diagkit/gather/diagnose/dockerd.go:21 +0x28
[common/pkg/diagkit/gather/diagnose.(*test).GetResult(0x1011e3940)
[ common/pkg/diagkit/gather/diagnose/test.go:46 +0x40
[common/pkg/diagkit/gather/diagnose.Run.func1(0x1011e3940)
[ common/pkg/diagkit/gather/diagnose/run.go:17 +0x40
[common/pkg/diagkit/gather/diagnose.walkOnce.func1(0x1011e3a40?, 0x1011e3940)
[ common/pkg/diagkit/gather/diagnose/run.go:140 +0x80
[common/pkg/diagkit/gather/diagnose.walkDepthFirst(0x2, 0x1011e3940, 0x1400059f718)
[ common/pkg/diagkit/gather/diagnose/run.go:146 +0x38
[common/pkg/diagkit/gather/diagnose.walkDepthFirst(0x1, 0x1011e3a40?, 0x1400059f718)
[ common/pkg/diagkit/gather/diagnose/run.go:149 +0x74
[common/pkg/diagkit/gather/diagnose.walkDepthFirst(0x0, 0x20?, 0x1400059f718)
[ common/pkg/diagkit/gather/diagnose/run.go:149 +0x74
[common/pkg/diagkit/gather/diagnose.walkOnce(0x100ca1660?, 0x1400059f890)
[ common/pkg/diagkit/gather/diagnose/run.go:135 +0x8c
[common/pkg/diagkit/gather/diagnose.Run(0x1011e3cc0, 0x140002a21e0?, {0x1400059fb08, 0x1, 0x1})
[ common/pkg/diagkit/gather/diagnose/run.go:16 +0x160
[main.checkCmd({0x140001aa010?, 0x6?, 0x4?}, {0x0, 0x0})
[ common/cmd/com.docker.diagnose/main.go:133 +0xdc
[main.main()
[ common/cmd/com.docker.diagnose/main.go:99 +0x30c
[2022-09-05T02:33:16.781725000Z][com.docker.diagnose][I] (4aba8ee2) 08ac81ec-com.docker.diagnose C->S VMDockerdAPI GET /docker
[2022-09-05T02:33:16.782051000Z][com.docker.diagnose][W] (4aba8ee2) 08ac81ec-com.docker.diagnose C<-S NoResponse GET /docker (321.334µs): Get "http://ipc/docker": dial unix lifecycle-server.sock: connect: no such file or directory
[2022-09-05T02:33:16.782277000Z][com.docker.diagnose][I] (4aba8ee2-1) 08ac81ec-com.docker.diagnose C->S VMDockerdAPI GET /ping
[2022-09-05T02:33:16.782547000Z][com.docker.diagnose][W] (4aba8ee2-1) 08ac81ec-com.docker.diagnose C<-S NoResponse GET /ping (269.125µs): Get "http://ipc/ping": dial unix lifecycle-server.sock: connect: no such file or directory
[2022-09-05T02:33:17.783651000Z][com.docker.diagnose][I] (4aba8ee2-2) 08ac81ec-com.docker.diagnose C->S VMDockerdAPI GET /ping
[2022-09-05T02:33:17.786448000Z][com.docker.diagnose][W] (4aba8ee2-2) 08ac81ec-com.docker.diagnose C<-S NoResponse GET /ping (2.790875ms): Get "http://ipc/ping": dial unix lifecycle-server.sock: connect: no such file or directory
[2022-09-05T02:33:18.787894000Z][com.docker.diagnose][I] (4aba8ee2-3) 08ac81ec-com.docker.diagnose C->S VMDockerdAPI GET /ping
[2022-09-05T02:33:18.790422000Z][com.docker.diagnose][W] (4aba8ee2-3) 08ac81ec-com.docker.diagnose C<-S NoResponse GET /ping (2.51675ms): Get "http://ipc/ping": dial unix lifecycle-server.sock: connect: no such file or directory
[2022-09-05T02:33:19.791560000Z][com.docker.diagnose][I] (4aba8ee2-4) 08ac81ec-com.docker.diagnose C->S VMDockerdAPI GET /ping
[2022-09-05T02:33:19.793782000Z][com.docker.diagnose][W] (4aba8ee2-4) 08ac81ec-com.docker.diagnose C<-S NoResponse GET /ping (2.285791ms): Get "http://ipc/ping": dial unix lifecycle-server.sock: connect: no such file or directory
[2022-09-05T02:33:20.794599000Z][com.docker.diagnose][I] (4aba8ee2-5) 08ac81ec-com.docker.diagnose C->S VMDockerdAPI GET /ping
[2022-09-05T02:33:20.797034000Z][com.docker.diagnose][W] (4aba8ee2-5) 08ac81ec-com.docker.diagnose C<-S NoResponse GET /ping (2.432708ms): Get "http://ipc/ping": dial unix lifecycle-server.sock: connect: no such file or directory
[2022-09-05T02:33:21.797765000Z][com.docker.diagnose][I] (4aba8ee2-6) 08ac81ec-com.docker.diagnose C->S VMDockerdAPI GET /ping
[2022-09-05T02:33:21.800243000Z][com.docker.diagnose][W] (4aba8ee2-6) 08ac81ec-com.docker.diagnose C<-S NoResponse GET /ping (2.470583ms): Get "http://ipc/ping": dial unix lifecycle-server.sock: connect: no such file or directory
[2022-09-05T02:33:22.801217000Z][com.docker.diagnose][I] (4aba8ee2-7) 08ac81ec-com.docker.diagnose C->S VMDockerdAPI GET /ping
[2022-09-05T02:33:22.803775000Z][com.docker.diagnose][W] (4aba8ee2-7) 08ac81ec-com.docker.diagnose C<-S NoResponse GET /ping (2.547917ms): Get "http://ipc/ping": dial unix lifecycle-server.sock: connect: no such file or directory
[2022-09-05T02:33:23.806518000Z][com.docker.diagnose][I] (4aba8ee2-8) 08ac81ec-com.docker.diagnose C->S VMDockerdAPI GET /ping
[2022-09-05T02:33:23.809398000Z][com.docker.diagnose][W] (4aba8ee2-8) 08ac81ec-com.docker.diagnose C<-S NoResponse GET /ping (2.888416ms): Get "http://ipc/ping": dial unix lifecycle-server.sock: connect: no such file or directory
[FAIL] DD0011: are the LinuxKit services running? failed to ping VM diagnosticsd with error: Get "http://ipc/ping": dial unix diagnosticd.sock: connect: no such file or directory
[2022-09-05T02:33:23.811509000Z][com.docker.diagnose][I] ipc.NewClient: 049ec18d-diagnose -> diagnosticd.sock diagnosticsd
[common/pkg/diagkit/gather/diagnose.glob..func12()
[ common/pkg/diagkit/gather/diagnose/linuxkit.go:18 +0x8c
[common/pkg/diagkit/gather/diagnose.(*test).GetResult(0x1011e38c0)
[ common/pkg/diagkit/gather/diagnose/test.go:46 +0x40
[common/pkg/diagkit/gather/diagnose.Run.func1(0x1011e38c0)
[ common/pkg/diagkit/gather/diagnose/run.go:17 +0x40
[common/pkg/diagkit/gather/diagnose.walkOnce.func1(0x1011e3940?, 0x1011e38c0)
[ common/pkg/diagkit/gather/diagnose/run.go:140 +0x80
[common/pkg/diagkit/gather/diagnose.walkDepthFirst(0x3, 0x1011e38c0, 0x140000d1718)
[ common/pkg/diagkit/gather/diagnose/run.go:146 +0x38
[common/pkg/diagkit/gather/diagnose.walkDepthFirst(0x2, 0x1011e3940?, 0x140000d1718)
[ common/pkg/diagkit/gather/diagnose/run.go:149 +0x74
[common/pkg/diagkit/gather/diagnose.walkDepthFirst(0x1, 0x1011e3a40?, 0x140000d1718)
[ common/pkg/diagkit/gather/diagnose/run.go:149 +0x74
[common/pkg/diagkit/gather/diagnose.walkDepthFirst(0x0, 0x20?, 0x140000d1718)
[ common/pkg/diagkit/gather/diagnose/run.go:149 +0x74
[common/pkg/diagkit/gather/diagnose.walkOnce(0x100ca1660?, 0x1400059f890)
[ common/pkg/diagkit/gather/diagnose/run.go:135 +0x8c
[common/pkg/diagkit/gather/diagnose.Run(0x1011e3cc0, 0x140002a21e0?, {0x1400059fb08, 0x1, 0x1})
[ common/pkg/diagkit/gather/diagnose/run.go:16 +0x160
[main.checkCmd({0x140001aa010?, 0x6?, 0x4?}, {0x0, 0x0})
[ common/cmd/com.docker.diagnose/main.go:133 +0xdc
[main.main()
[ common/cmd/com.docker.diagnose/main.go:99 +0x30c
[2022-09-05T02:33:23.813326000Z][com.docker.diagnose][I] (9b3bad8b) 049ec18d-diagnose C->S diagnosticsd GET /ping
[2022-09-05T02:33:23.814174000Z][com.docker.diagnose][W] (9b3bad8b) 049ec18d-diagnose C<-S NoResponse GET /ping (841.584µs): Get "http://ipc/ping": dial unix diagnosticd.sock: connect: no such file or directory
[FAIL] DD0016: is the LinuxKit VM running? vm is not running: failed to open kmsg.log: open log/vm/kmsg.log: no such file or directory
[PASS] DD0001: is the application running?
[PASS] DD0018: does the host support virtualization?
[FAIL] DD0017: can a VM be started? vm has not started: failed to open kmsg.log: open log/vm/kmsg.log: no such file or directory
[PASS] DD0015: are the binary symlinks installed?
The tool never finishes!
Steps to reproduce the behavior
- ...
- ...
I cannot provide steps, since I'm unable to reproduce it on any other machine I've got access to.
I'll create a new user account and see if Docker Desktop loads within that.
Quick update. When I quit Docker Desktop from the menubar - the com.docker.diagnose check tool resumed outputting data:
[PASS] DD0015: are the binary symlinks installed?
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
[FAIL] DD0003: is the Docker CLI working? exit status 1
[PASS] DD0013: is the $PATH ok?
[FAIL] DD0007: is the backend responding? failed to ping com.docker.backend with error: Get "http://ipc/ping": dial unix backend.sock: connect: no such file or directory
[2022-09-05T02:50:40.788714000Z][com.docker.diagnose][I] ipc.NewClient: ee494a31-diagnose -> backend.sock BackendAPI
[common/pkg/backend.NewClientForPath({0x100acd4b6?, 0x0?}, {0x14000492140?, 0x100bd4560?})
[ common/pkg/backend/client.go:170 +0x3c
[common/pkg/backend.NewClient({0x100acd4b6, 0x8})
[ common/pkg/backend/client.go:165 +0x54
[common/pkg/diagkit/gather/diagnose.glob..func8()
[ common/pkg/diagkit/gather/diagnose/ipc.go:25 +0x28
[common/pkg/diagkit/gather/diagnose.(*test).GetResult(0x1011e3d40)
[ common/pkg/diagkit/gather/diagnose/test.go:46 +0x40
[common/pkg/diagkit/gather/diagnose.Run.func1(0x1011e3d40)
[ common/pkg/diagkit/gather/diagnose/run.go:17 +0x40
[common/pkg/diagkit/gather/diagnose.walkOnce.func1(0x2?, 0x1011e3d40)
[ common/pkg/diagkit/gather/diagnose/run.go:140 +0x80
[common/pkg/diagkit/gather/diagnose.walkDepthFirst(0x1, 0x1011e3d40, 0x14000717718)
[ common/pkg/diagkit/gather/diagnose/run.go:146 +0x38
[common/pkg/diagkit/gather/diagnose.walkDepthFirst(0x0, 0x20?, 0x14000717718)
[ common/pkg/diagkit/gather/diagnose/run.go:149 +0x74
[common/pkg/diagkit/gather/diagnose.walkOnce(0x100ca1660?, 0x1400059f890)
[ common/pkg/diagkit/gather/diagnose/run.go:135 +0x8c
[common/pkg/diagkit/gather/diagnose.Run(0x1011e3cc0, 0x140002a21e0?, {0x1400059fb08, 0x1, 0x1})
[ common/pkg/diagkit/gather/diagnose/run.go:16 +0x160
[main.checkCmd({0x140001aa010?, 0x6?, 0x4?}, {0x0, 0x0})
[ common/cmd/com.docker.diagnose/main.go:133 +0xdc
[main.main()
[ common/cmd/com.docker.diagnose/main.go:99 +0x30c
[FAIL] DD0014: are the backend processes running? 5 errors occurred:
* qemu-system-aarch64 is not running
* com.docker.backend is not running
* vpnkit-bridge is not running
* com.docker.vpnkit is not running
* com.docker.driver.amd64-linux is not running
... but it stopped at that place and has not finished still.
Activity Monitor still reports a few items that have not been killed when I initiated the "Quit Docker Desktop" command.

Quick update. Starting under a separate user on the same machine didn't help. Also tried after a restart.
I have the same problem. Disabling the new virtualization framework made docker for mac start again.
- Open activity monitor, search for "docker" and Force Quit docker for desktop and all other processes.
- Edit the file
~/Library/Group Containers/group.com.docker/settings.json:useVirtualizationFramework": false - Restart the docker process (and wait a few minutes).
This fixed it, at least on my machine.
Thanks @anpr. That fixed it for me too.
Feel free to close this issue.
Good to know. I still would like to know why this fails - I would actually prefer to use the virtualization framework.
Also ran into the same issue after updating to the latest Docker Desktop. I downgraded back to 4.11.1 and the "stopping" issue disappeared and I was able to enable the virtualisation framework again. Would be great to get a solution for this.
@avioli thanks for the diagnostics. The logs have something interesting:
[2022-09-05T02:29:49.708705000Z][com.docker.backend][I] com.docker.vpnkit with pid: 32673 shutdown by signal: segmentation fault
(This may be related to https://github.com/docker/for-mac/issues/6435#issuecomment-1232921520 )
The latest development build has a fix for this issue, could you try:
- Apple Silicon: https://desktop-stage.docker.com/mac/main/arm64/86088/Docker.dmg
- Intel: https://desktop-stage.docker.com/mac/main/amd64/86088/Docker.dmg
If it still doesn't work, could you capture diagnostics while it's in the broken state with
/Applications/Docker.app/Contents/MacOS/com.docker.diagnose gather -upload
and quote the new ID here? Thanks!
Hi, docker diagnose stops on: [PASS] DD0007: is the backend responding?
stays there for more than 30 minutes...
My working version stopped working when I quit Docker Desktop and shut it down. Once started later on today - it didn't become operational afterwards.
@djs55 I downloaded the Apple Silicon version and replaced 85629 with the new build 86088, but I'm still get the same endless "stopping".
I also got the following Fatal Error window, saying connecting to VPNKit on vpnkit.eth.sock: EOF:
I did a "Reset Docker to factory defaults", but that didn't improve anything.
Diagnostics ID: F2606449-114C-4887-8E78-7926B365C0EE/20220907040930
I've removed $HOME/Library/Group Containers/group.com.docker/ and $HOME/Library/Containers/com.docker.docker/ and re-started it, but got the same VPNKit Fatal Error as above.
Here's another Diagnostics ID: 6BDF8BC7-5DC2-4E87-8D86-0B8F72FC6B5C/20220907041813
@avioli thanks for trying the build and the diagnostics. Could you see if you have any Apple diagnostics reports from Docker processes (in particular com.docker.vpnkit) in ~/Library/Logs/DiagnosticReports? If so could you attach them here? Unfortunately the current diagnostics capture doesn't include them.
There are 18 from yesterday which have the name of com.docker.vpnkit-2022-09-07-HHMMSS.ips, but there are also three, named Docker-2022-09-07-HHMMSS.ips which I've also included in the below archive.
DiagnosticReports - 2022-09-07.zip
Edit: Just a note - if these logs are generated when an executable is force-killed and not only when it crashes, then many of them will be because of that - I've force-killed them when I was wiping everything out (usually before a computer restart).
Edit 2: I've also tried running Docker 4.7.11, so some of the most recent ones could be from that.
@avioli thanks for the reports, they look very interesting. For the com.docker.vpnkit crashes there are 2 kinds:
- the old version of
com.docker.vpnkitcrashes like this:
VM Region Info: 0x16ef5bff8 is in 0x16b758000-0x16ef5c000; bytes after start: 58736632 bytes before end: 7
REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL
MALLOC_MEDIUM (reserved) 147800000-148000000 [ 8192K] rw-/rwx SM=NUL ...(unallocated)
GAP OF 0x23758000 BYTES
---> STACK GUARD 16b758000-16ef5c000 [ 56.0M] ---/rwx SM=NUL ... for thread 0
Stack 16ef5c000-16f758000 [ 8176K] rw-/rwx SM=PRV thread 0
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 com.docker.vpnkit 0x100cb9a8c camlStdlib__list__map_236 + 4
1 com.docker.vpnkit 0x100cb9ac8 camlStdlib__list__map_236 + 64
2 com.docker.vpnkit 0x100d64d60 caml_callback2_exn + 60
3 com.docker.vpnkit 0x100d247cc fs_callback + 232
4 com.docker.vpnkit 0x100d2fe64 uv__work_done + 192
5 com.docker.vpnkit 0x100d32b98 uv__async_io + 260
6 com.docker.vpnkit 0x100d41218 uv__io_poll + 904
7 com.docker.vpnkit 0x100d32fc8 uv_run + 372
8 com.docker.vpnkit 0x100d17df8 uwt_run_loop + 280
9 com.docker.vpnkit 0x100d6fe5c caml_c_call + 28
10 com.docker.vpnkit 0x1007609e0 camlUwt__run_3961 + 304
-- it looks like it overflows the stack running a (not tail-recursive List.map in the filesystem watch callback).
- the new version of
com.docker.vpnkitcrashes like this:
VM Region Info: 0x16b3fbff8 is in 0x167bf8000-0x16b3fc000; bytes after start: 58736632 bytes before end: 7
REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL
MALLOC_MEDIUM (reserved) 157800000-158000000 [ 8192K] rw-/rwx SM=NUL ...(unallocated)
GAP OF 0xfbf8000 BYTES
---> STACK GUARD 167bf8000-16b3fc000 [ 56.0M] ---/rwx SM=NUL ... for thread 0
Stack 16b3fc000-16bbf8000 [ 8176K] rw-/rwx SM=PRV thread 0
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 com.docker.vpnkit 0x104871e04 camlStdlib__list__map_236 + 4
1 com.docker.vpnkit 0x104871e40 camlStdlib__list__map_236 + 64
2 ??? 0x148324d70 ???
So a very similar List.map call hitting a stack guard page. It might be something as simple as updating the compiler toolchain used to build these binaries, or to adjust the stack size settings. I'll investigate.
Edit: I think I'm building with OCaml 4.12, but there's a useful change in 4.13+: https://github.com/ocaml/ocaml/pull/10549
@avioli would you mind trying a development build of vpnkit for me? I've made a PR for moby/vpnkit and built it locally. I've attached the binary to this comment. It has the following shasum:
94f54180e6918cd3dad9072fbcb7736665608c20 com.docker.vpnkit
It can be installed by:
- stop Desktop
- run from a terminal
# take a backup
mv /Applications/Docker.app/Contents/Resources/bin/com.docker.vpnkit /Applications/Docker.app/Contents/Resources/bin/com.docker.vpnkit.orig
# overwrite file
cp com.docker.vpnkit /Applications/Docker.app/Contents/Resources/bin/com.docker.vpnkit
- start Desktop
Hopefully it will work better. If it doesn't, hopefully there will be an exception in the logs rather than a segfault :sweat_smile: If it fails, could you upload a diagnostic and quote the ID:
/Applications/Docker.app/Contents/MacOS/com.docker.diagnose gather -upload
(Just in case it goes wrong, it's worth looking for a new DiagnosticResport too)
Just took a look at this with @djs55 and can confirm that the OCaml 4.14 build should have a better exception on the M1 Macs than the old (4.12-based) build. Linking https://github.com/ocaml/ocaml/pull/10549#issuecomment-905296300 for the record.
@djs55 🥳 The new vpnkit did the trick and Docker (4.12.0 85629) is now running on my rig as expected. I'll monitor how things go in the following few days. I'll do some restarts just to be sure and let you know if there are any hiccups.
Thank you
At least on my machine, using the new vpnkit did not help for being able to active the virtualization framework again...
@anpr could you upload some diagnostics and quote the ID here? Also take a look to see if there are any crash reports.
There's also a known issue switching the framework on and off: perhaps try turning it on, then stopping and starting Docker (avoid the "restart" menu item, completely stop and start)
I was still having issues with 4.12.0 85629. It only shows "Docker Desktop stopping..." for several minutes and nothing happens. vmnetd seems crashed and unresponsive.
My problem seems to be due to blocking of the domain sessions.bugsnag.com domain in my DNS server. After unblocking it seems to work, but that seems like a non-solution to me.
Experiencing the same issue here, just uploaded diagnostics: 7B32AB05-AFDB-42F9-AD70-2059500A3485/20220919085834.
After replacing vpnkit as suggested above I see no improvement. Uploaded diagnostics again after this: 7B32AB05-AFDB-42F9-AD70-2059500A3485/20220919090940
What I have tried so far:
- I've checked if my network or DNS server blocks sessions.bugsnag.com and that is not the case.
- Manually stopping and starting Docker does not work. I have to forcefully quit the process by performing
sudo killall dockerand then quit Docker Desktop using Activity Monitor. - Reïnstalling Docker Desktop does not change anything.
The only way for me to use Docker right now is with all the experimental features off, resulting in a very slow experience compared to using VirtioFS that I was able to use before last update.
I was still having issues with 4.12.0 85629. It only shows "Docker Desktop stopping..." for several minutes and nothing happens. vmnetd seems crashed and unresponsive.
My problem seems to be due to blocking of the domain
sessions.bugsnag.comdomain in my DNS server. After unblocking it seems to work, but that seems like a non-solution to me.
That ... worked for me too, this domain (sessions.bugsnag.com) is in a common kill-file I use. That's the issue, srsly?