docker / for-mac

Bug reports for Docker Desktop for Mac
https://www.docker.com/products/docker#/mac
2.44k stars 118 forks source link

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

Open rpeck opened 3 months ago

rpeck commented 3 months ago

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

vicentematus commented 3 months ago

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

BREAKING CHANGES: 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

macstainless commented 3 months ago

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

wwc-dlemons commented 3 months ago

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.

rpeck commented 3 months ago

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.

vicentematus commented 3 months ago

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

MilanVilov commented 3 months ago

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 🙇

anqus commented 3 months ago

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.

belm0 commented 2 months ago

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

avo-sepp commented 2 months ago

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

tanel commented 2 months ago

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.

sidpremkumar commented 2 months ago

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

On version

Docker Desktop 4.34.2 (167172)
ganicus commented 1 month ago

Any update on this from a contributor or docker rep?

ian-weir commented 1 month ago

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

DAcodedBEAT commented 1 month ago

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

KyleRampGrowth commented 1 month ago

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

thuongnguyenthanh commented 1 month ago

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

smetlov commented 1 month ago

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

luisedelgado commented 1 month ago

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

zsystm commented 1 month ago

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
dkbhadeshiya commented 1 month ago

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)

kodcuserkan commented 1 month ago

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

max-klochikhin commented 1 month ago

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

awerqo commented 1 month ago

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

GBeushausen commented 1 month ago

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.

geraldstanje1 commented 4 weeks ago

any idea?

jovanvuleta commented 3 weeks ago

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

rudiv commented 3 weeks ago

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.

gregtws commented 3 weeks ago

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

marcinkubica commented 3 weeks ago

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

bye bye Docker Desktop helo Podman Desktop

luismsousa commented 3 weeks ago

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.