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

After upgrading to 4.33.0 (160616), now crashes with "process terminated unexpectedly: accepting AF_VSOCK connection: AF_VSOCK listener closed"

Open rpeck opened this issue 1 year ago • 32 comments

Description

Docker Desktop was working on my M3 Max MBP (96GB ram, ~160GB disk free).

I upgraded in-app to 4.33.0 (160616). Now the daemon won't start. I get this in the dialog:

running engine: waiting for the Docker API: engine linux/virtualization-framework failed to run: running VM: com.docker.virtualization: process terminated unexpectedly: accepting AF_VSOCK connection: AF_VSOCK listener closed

My diagnostics ID is: 56E4566F-162A-4324-A824-B145A2B81FF3/20240810011527

HALP! :-)

Reproduce

  1. Start up Docker Desktop after a clean reboot.
  2. Observe the error dialog.
  3. Weep.

Expected behavior

Uh, not crashing?

docker version

Version:           27.1.1
 API version:       1.46
 Go version:        go1.21.12
 Git commit:        6312585
 Built:             Tue Jul 23 19:54:12 2024
 OS/Arch:           darwin/arm64
 Context:           desktop-linux

docker info

Client:
 Version:    27.1.1
 Context:    desktop-linux
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.16.1-desktop.1
    Path:     /Users/rpeck/.docker/cli-plugins/docker-buildx
  compose: Docker Compose (Docker Inc.)
    Version:  v2.29.1-desktop.1
    Path:     /Users/rpeck/.docker/cli-plugins/docker-compose
  debug: Get a shell into any image or container (Docker Inc.)
    Version:  0.0.34
    Path:     /Users/rpeck/.docker/cli-plugins/docker-debug
  desktop: Docker Desktop commands (Alpha) (Docker Inc.)
    Version:  v0.0.14
    Path:     /Users/rpeck/.docker/cli-plugins/docker-desktop
  dev: Docker Dev Environments (Docker Inc.)
    Version:  v0.1.2
    Path:     /Users/rpeck/.docker/cli-plugins/docker-dev
  extension: Manages Docker extensions (Docker Inc.)
    Version:  v0.2.25
    Path:     /Users/rpeck/.docker/cli-plugins/docker-extension
  feedback: Provide feedback, right in your terminal! (Docker Inc.)
    Version:  v1.0.5
    Path:     /Users/rpeck/.docker/cli-plugins/docker-feedback
  init: Creates Docker-related starter files for your project (Docker Inc.)
    Version:  v1.3.0
    Path:     /Users/rpeck/.docker/cli-plugins/docker-init
  sbom: View the packaged-based Software Bill Of Materials (SBOM) for an image (Anchore Inc.)
    Version:  0.6.0
    Path:     /Users/rpeck/.docker/cli-plugins/docker-sbom
  scout: Docker Scout (Docker Inc.)
    Version:  v1.11.0
    Path:     /Users/rpeck/.docker/cli-plugins/docker-scout

Server: (hangs)

Diagnostics ID

56E4566F-162A-4324-A824-B145A2B81FF3/20240810011527

Additional Info

No response

rpeck avatar Aug 10 '24 01:08 rpeck

[!WARNING] This will delete your containers. Please expect breaking changes.

BREAKING CHANGES (THIS WILL DELETE YOUR CONTAINERS): On MacOs, I fixed the error running:

rm -rf Library/Group\ Containers/group.com.docker
rm -rf Library/Containers/com.docker.docker
rm -rf Library/Application\ Support/Docker\ Desktop 

Based on the following issue https://github.com/docker/for-mac/issues/6135#issuecomment-1406951111

vicentematus avatar Aug 12 '24 15:08 vicentematus

I'm encountering the SAME error message on my side. After a few days of Docker chugging along, the entire thing errors out and the entire Docker engine + containers are unresponsive. Has been happening for nearly a month now.

I get this error:

running engine: engine linux/virtualization-framework failed to run: running VM: com.docker.virtualization: process terminated unexpectedly: accepting AF_VSOCK connection: AF_VSOCK listener closed

Intel Mac hardware, Docker Engine: 27.1.1, Docker version 4.33.0 (160616).

Diagnostic ID: 75C47FAE-FA34-4D49-8E5F-EB781AB630B0/20240812123725

macstainless avatar Aug 12 '24 15:08 macstainless

I'm encountering the same issue. I was on 4.29.0 and on nearly every docker start up I have to go to ~/Library/Group Containers/group.com.docker/settings.json and remove the JetBrains Rider path from the filesharingDirectories just to get Docker up and running. I upgraded today to 4.33.0 and i'm still having the same issue, but now upon me adding back the Rider file path and attempt to lift the container it now gives me the same error OP is getting.

wwc-dlemons avatar Aug 12 '24 18:08 wwc-dlemons

On MacOs, I fixed the error running:

rm -rf Library/Group\ Containers/group.com.docker
rm -rf Library/Containers/com.docker.docker
rm -rf Library/Application\ Support/Docker\ Desktop 

Based on the following issue #6135 (comment)

Hm.

Docker is running now, but I've lost the container I had set up.

This is a real drag. Warning to those who come after: this will blow away your containers. I've lost a few hours of work. Yay.

rpeck avatar Aug 12 '24 18:08 rpeck

On MacOs, I fixed the error running:

rm -rf Library/Group\ Containers/group.com.docker
rm -rf Library/Containers/com.docker.docker
rm -rf Library/Application\ Support/Docker\ Desktop 

Based on the following issue #6135 (comment)

Hm.

Docker is running now, but I've lost the container I had set up.

This is a real drag. Warning to those who come after: this will blow away your containers. I've lost a few hours of work. Yay.

Damn, sorry :(. I will add an alert for my comment. I didn't expected breaking changes

vicentematus avatar Aug 13 '24 03:08 vicentematus

On MacOs, I fixed the error running:

rm -rf Library/Group\ Containers/group.com.docker
rm -rf Library/Containers/com.docker.docker
rm -rf Library/Application\ Support/Docker\ Desktop 

Based on the following issue #6135 (comment)

Hm.

Docker is running now, but I've lost the container I had set up.

This is a real drag. Warning to those who come after: this will blow away your containers. I've lost a few hours of work. Yay.

This solved the problem, thank you 🙇

MilanVilov avatar Aug 21 '24 11:08 MilanVilov

I'm encountering the same issue. I was on 4.29.0 and on nearly every docker start up I have to go to ~/Library/Group Containers/group.com.docker/settings.json and remove the JetBrains Rider path from the filesharingDirectories just to get Docker up and running. I upgraded today to 4.33.0 and i'm still having the same issue, but now upon me adding back the Rider file path and attempt to lift the container it now gives me the same error OP is getting.

Same problem here, can't debug anything in Rider currently.

anqus avatar Aug 23 '24 13:08 anqus

Deleting Library files and filesharingDirectories did not help in my case. For me it seems to be related to heavy load in the container, as reported in https://github.com/docker/for-mac/issues/7381

belm0 avatar Sep 02 '24 01:09 belm0

This happens to me after Docker freezes up doing something, sometimes it's building, sometimes it's pushing a container. Then Docker freezes. When I stop the operation with CTRL+C in terminal. Then Docker is non-responsive. Restarting Docker gives the AF_VSOCK error. The only solution I have is to re-install Docker Desktop from scratch. Repeating the operation will break Docker again.

There is definitely some operation or action which breaks this connection in an unfixable manner.

I am on a MacBook Pro, 16GB RAM, M1 Pro chip.

Diagnostics ID: 76782BD3-97D1-4BBD-8F60-F33B84574B4C/20240905170703

avosepp avatar Sep 05 '24 15:09 avosepp

Experienced the same issue, after upgrade Docker did not start and gave the AF_VSOCK error. Increasing memory and swap in the settings fixed the issue.

tanel avatar Sep 09 '24 10:09 tanel

Still experiencing this issue today :/ 2024-09-24 at 7 15 PM

On version

Docker Desktop 4.34.2 (167172)

sidpremkumar avatar Sep 25 '24 02:09 sidpremkumar

Any update on this from a contributor or docker rep?

ganicus avatar Oct 01 '24 17:10 ganicus

Also running into at least a similar issue. If I'm understanding OP theirs happens consistently but mine is intermittent. It happens when developing inside a container for a nextjs and saving changes of a file in vscode which triggers a hotswap of the code. Doesn't happen consistently I would say at least once every working day My diagnostics ID is FBD6BD3A-2EE8-4CA4-9D84-EEC878716C1B/20241001173916 MacOS 14.6.1 M2 Pro Chip 32 GB of memory Docker Desktop 4.34.2

ian-weir avatar Oct 01 '24 17:10 ian-weir

I hit the same thing after running just fine for a while

If another datapoint helps here: diagnostic ID: 8677129E-8DA0-4C37-997F-DC0E988A52F8/20241002222113

macOS 14.5 (23F79) Apple M2 Pro 16 GB RAM

DAcodedBEAT avatar Oct 02 '24 22:10 DAcodedBEAT

Just dropping what worked for me: I uninstalled docker, upgraded macOS to Sequoia, and re-installed and it's working for now.

KyleRampGrowth avatar Oct 03 '24 07:10 KyleRampGrowth

You dont need to delete your setup or upgrade because that can be delete all your image and container

  1. Stop your docker

  2. Check how much does your docker data currently by this command du -sh ~/Library/Containers/com.docker.docker

  3. Then change the configuration of docker data for diskSizeMiB. Increase more cat ~/Library/Group\ Containers/group.com.docker/settings.json { ... "diskFlush": "os", "diskSizeMiB": 61035, "diskStats": "", .... }

  4. Start your docker

thuongnguyenthanh avatar Oct 03 '24 09:10 thuongnguyenthanh

I got this problem after trying to add Rider's folder to the File Sharing settings. Despite the folder existed it was still crashing. The rm -rf + chmod workaround didn't help right away, though after the exact following sequence the problem was gone for me:

  1. Kill Docker Desktop, wait until it's fully stopped (the icon is gone from the status bar).
  2. Quit Rider.
  3. rm -rf Library/Group\ Containers/group.com.docker
  4. cd /usr/local/bin
  5. chmod 0755 dock*
  6. Find the "swap" configuration in "~/Library/Group Containers/group.com.docker/settings.json". I increased it from 1024 to 2048. Not sure it was needed though.
  7. Ensure the folder you tried to add exists. In my case – /Applications/Rider.app/Contents/bin. If it's not added yet, better do it via the Browse button to make sure you make no typos.
  8. Run Docker.
  9. Make sure your folder it added in File Sharing settings.
  10. Run Rider.

My theory is that trying to add a shared folder while Rider's Docker plugin is connected to Docker breaks updating the settings or something. It would constantly try to restart Docker even if I pause it manually, so maybe it just doesn't let it finish the process correctly. So try to kill whatever apps you have connected to Docker and do the steps.

Apple M1 Pro macOS 13.4.1 Rider 2024.2.4 Docker Desktop 4.34.2

smetlov avatar Oct 03 '24 15:10 smetlov

Has anyone found a workaround?? This is halting my dev workflow....

luisedelgado avatar Oct 07 '24 00:10 luisedelgado

The following works for me.

  1. Go to settings (DONT Close Docker Desktop even if it shows error msgs)
  2. Increase Memory, SWAP, and also Disk
  3. Click Apply
  4. Quit Docker Desktop and Re-launch

zsystm avatar Oct 11 '24 01:10 zsystm

Hi,

Same issue occurred with me as well. I tried docker buildx command to build an image for another platform architecture and it bricked whole installation.

It can be reproduced with version 4.34.3 (170107).

I tried reinstalling and again got bricked with docker buildx build --platform=linux/amd64

Information: Version: 4.34.3 (170107) Engine: 27.2.0 Compose: v2.29.2-desktop.2 Credential Helper: v0.8.2 Kubernetes: v1.30.2 MacOS: 15.0.1 (24A348)

dkbhadeshiya avatar Oct 16 '24 12:10 dkbhadeshiya

Getting same error: running engine: engine linux/virtualization-framework failed to run: running VM: com.docker.virtualization: process terminated unexpectedly: accepting AF_VSOCK connection: AF_VSOCK listener closed

Apple M2 Max with 32GB Ram MacOS Sonoma 14.6.1 (23G93) Image

kodcuserkan avatar Oct 17 '24 07:10 kodcuserkan

I have the same problem! my diagnostic ID: D871EFA7-19F3-4E9A-BD1B-F9ECDE69FFD7/20241021132731

max-klochikhin avatar Oct 20 '24 12:10 max-klochikhin

It looks like this problem appears when you add a resource to Virtual file shares in docker (Resources -> File Sharing)

It seems like the problem is solved if you go to "privacy and security" -> "Full Disk Access" in Mac OS settings and add docker there giving access to the entire disk

I'm not sure if this is correct, but in my case the problem was solved (i setup debugging in container with goland)

Mac OS 14.5 (23F79) Mac M1

awerqo avatar Oct 21 '24 12:10 awerqo

Was this problem ever solved? I got than on all my computers, both Mac and Windows. I'm using DDEV and every 3-4 days this error appears.

GBeushausen avatar Oct 27 '24 12:10 GBeushausen

any idea?

geraldstanje1 avatar Oct 29 '24 04:10 geraldstanje1

Having this issue as well, can't proceed with docker push command. It just freezes the console and the layer pushing screen is stuck...

jovanvuleta avatar Oct 30 '24 10:10 jovanvuleta

Same issue here recently on Docker Desktop 4.34.3.

After a docker push that seemingly hangs forever, Docker never restarts again until a reboot.

rudiv avatar Oct 30 '24 18:10 rudiv

Sometimes see this issue during pulls, builds, or even just idling (docker containers are running, but not issuing any docker commands)

gregtws avatar Oct 30 '24 18:10 gregtws

removing folders trick and giving full disk access doesn't work for me

bye bye Docker Desktop helo Podman Desktop

marcinkubica avatar Nov 01 '24 16:11 marcinkubica

The following works for me.

  1. Go to settings (DONT Close Docker Desktop even if it shows error msgs)
  2. Increase Memory, SWAP, and also Disk
  3. Click Apply
  4. Quit Docker Desktop and Re-launch

this worked. It was tricky to do but it just worked.

luismsousa avatar Nov 05 '24 11:11 luismsousa