docker / for-mac

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

Docker does not recover from resource saver mode #6933

Open ramki88 opened 1 year ago

ramki88 commented 1 year ago

Description

After the recent update, docker does not seem to recover from resource saver mode. In the dashboard CPU and Mem shows zero and all docker commands do not respond or wake the engine. Only after a restart of the engine it starts to respond

Reproduce

docker info

Expected behavior

"docker info should provide the info about docker

docker version

Client:
 Cloud integration: v1.0.35-desktop+001
 Version:           24.0.5
 API version:       1.43
 Go version:        go1.20.6
 Git commit:        ced0996
 Built:             Fri Jul 21 20:32:30 2023
 OS/Arch:           darwin/arm64
 Context:           desktop-linux

Server: Docker Desktop 4.22.0 (117440)
 Engine:
  Version:          24.0.5
  API version:      1.43 (minimum version 1.12)
  Go version:       go1.20.6
  Git commit:       a61e2b4
  Built:            Fri Jul 21 20:35:38 2023
  OS/Arch:          linux/arm64
  Experimental:     true
 containerd:
  Version:          1.6.21
  GitCommit:        3dce8eb055cbb6872793272b4f20ed16117344f8
 runc:
  Version:          1.1.7
  GitCommit:        v1.1.7-0-g860f061
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

docker info

Client:
 Version:    24.0.5
 Context:    desktop-linux
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.11.2-desktop.1
    Path:     /Users/ramakrishnan3.s/.docker/cli-plugins/docker-buildx
  compose: Docker Compose (Docker Inc.)
    Version:  v2.20.2-desktop.1
    Path:     /Users/ramakrishnan3.s/.docker/cli-plugins/docker-compose
  dev: Docker Dev Environments (Docker Inc.)
    Version:  v0.1.0
    Path:     /Users/ramakrishnan3.s/.docker/cli-plugins/docker-dev
  extension: Manages Docker extensions (Docker Inc.)
    Version:  v0.2.20
    Path:     /Users/ramakrishnan3.s/.docker/cli-plugins/docker-extension
  init: Creates Docker-related starter files for your project (Docker Inc.)
    Version:  v0.1.0-beta.6
    Path:     /Users/ramakrishnan3.s/.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/ramakrishnan3.s/.docker/cli-plugins/docker-sbom
  scan: Docker Scan (Docker Inc.)
    Version:  v0.26.0
    Path:     /Users/ramakrishnan3.s/.docker/cli-plugins/docker-scan
  scout: Command line tool for Docker Scout (Docker Inc.)
    Version:  0.20.0
    Path:     /Users/ramakrishnan3.s/.docker/cli-plugins/docker-scout

Server:
 Containers: 0
  Running: 0
  Paused: 0
  Stopped: 0
 Images: 2
 Server Version: 24.0.5
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Using metacopy: false
  Native Overlay Diff: true
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Cgroup Version: 2
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 3dce8eb055cbb6872793272b4f20ed16117344f8
 runc version: v1.1.7-0-g860f061
 init version: de40ad0
 Security Options:
  seccomp
   Profile: unconfined
  cgroupns
 Kernel Version: 5.15.49-linuxkit-pr
 Operating System: Docker Desktop
 OSType: linux
 Architecture: aarch64
 CPUs: 5
 Total Memory: 7.765GiB
 Name: docker-desktop
 ID: efcb88bd-4e43-4b04-be3f-89edcd9a82d7
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 HTTP Proxy: http.docker.internal:3128
 HTTPS Proxy: http.docker.internal:3128
 No Proxy: hubproxy.docker.internal
 Experimental: true

Diagnostics ID

073CCF80-81D3-426A-A5F1-1B13A4481DE2/20230804091953

Additional Info

No response

mmulligan03 commented 1 year ago

Running on M2 MacBook Pro. on 4.22.0 docker info docker stats and docker ps all would hang. docker version did not hang. ~Now on version 4.22.1 all of them hang. The only thing that seems to work for me is setting the timeout to something much larger to disable the feature.~ All but stats appear to be working in resource saver mode. I restarted docker to get the others to work.

ctalledo commented 1 year ago

All but stats appear to be working in resource saver mode. I restarted docker to get the others to work.

Thanks @mmulligan03, that's good to hear. We are aware of the docker stats hang in resource saver mode and will be addressing that in the near future.

ramki88 commented 1 year ago

Hi folks, we just released a new Docker Desktop patch release (v4.22.1) that should fix several of the problems reported here (particularly for folks having trouble with Docker Desktop initial startup or resuming from resource-saver mode).

Please let us know if you continue to see problems, we apologize if that's the case and appreciate your feedback. It's a difficult feature to implement, and though we test it internally, nothing beats having thousands of users using it and reporting issues.

If you are still having problems and want to disable the feature, the DD v4.22.1 patch release also ensures that you can disable the feature by clearing the "Access Experimental Features" toggle in the Docker Desktop settings -> Features In Development -> Experimental Features tab. But note that this will disable all experimental features.

If you just want to disable the resource saver feature, then use the features-override.json file as described in a prior comment.

Finally, if you want to modify the resource saver timeout (i.e., the timeout after which if Docker Desktop is idle it enters resource saver mode; defaults to 30 seconds), do so as described above.

As the feature matures we will move it from experimental to a regular feature, at which point you'll be able to fully configure it via the Docker Desktop settings menu.

4.22.1 (118664) seems to have fixed the issue for me at least. Thanks @ctalledo !!

lgw4 commented 1 year ago

@ctalledo I tried 4.22.1 (118664), but Resource Saver still does not allow docker CLI commands to execute. Uploaded Diagnostics ID: 05CCF340-F5A1-406D-9F5F-D549C1836DCD/2023082515460

Any suggestions would be appreciated. Having a non-functional Docker Desktop is maddening.

ctalledo commented 1 year ago

@ctalledo I tried 4.22.1 (118664), but Resource Saver still does not allow docker CLI commands to execute. Uploaded Diagnostics ID: 05CCF340-F5A1-406D-9F5F-D549C1836DCD/2023082515460

Sorry to hear that @lgw4, we will take a look right away.

Can you double-check the diagnostics ID you provided? it's incorrect (seems to missing a digit at the end).

Thanks!

mmulligan03 commented 1 year ago

I will say that I noticed this as well yesterday. I was loosing my mind as well and thought I was just tired. It works for a few but then they all stop those commands working again and docker becomes unresponsive. I set my timeout to a really high number to prevent the resource saver from running and that stoped the issue for now.

On Fri, Aug 25, 2023, 12:38 PM Cesar Talledo @.***> wrote:

@ctalledo https://github.com/ctalledo I tried 4.22.1 (118664), but Resource Saver still does not allow docker CLI commands to execute. Uploaded Diagnostics ID: 05CCF340-F5A1-406D-9F5F-D549C1836DCD/2023082515460

Sorry to hear that @lgw4 https://github.com/lgw4, we will take a look right away.

Can you double-check the diagnostics ID you provided? it's incorrect (seems to missing a digit at the end).

Thanks!

— Reply to this email directly, view it on GitHub https://github.com/docker/for-mac/issues/6933#issuecomment-1693633916, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADBJBDRIOCIHXGFXND4COC3XXDIJFANCNFSM6AAAAAA3D6V6JQ . You are receiving this because you were mentioned.Message ID: @.***>

ctalledo commented 1 year ago

I will say that I noticed this as well yesterday. I was loosing my mind as well and thought I was just tired. It works for a few but then they all stop those commands working again and docker becomes unresponsive.

HI @mmulligan03, if possible please upload the diagnostics bundle so we can take a look. Thanks.

WarrenSchultz commented 1 year ago

Is it possible that this fix would cause the nvidia-container-runtime to no longer be recognized on WSL2? It was working prior to the update, but now I'm getting the error you receive when the linux-daemon-options.json hasn't been updated with the params necessary.

scottmatth commented 1 year ago

Hi folks, Cesar Talledo from Docker here.

Sorry to hear you are having trouble with the resource-saver feature, and thank you very much for reporting the problem.

First, quick context:

The resource saver feature is meant to significantly reduce Docker Desktop's memory and CPU usage on the host when no containers are running, to improve overall user experience. It will reduce mem utilization by ~2GBs (or more) when DD goes idle. In DD v4.21, the feature would simply pause processes in the DD Linux VM, but in v4.22 we improved it to shutdown the DD Linux VM. We did a lot of testing prior to releasing the feature and for most users it's working well, but a few are reporting problems. Our apologies, we will try to fix them ASAP.

For those of you experiencing problems:

  • If possible, please upload a diagnostics bundle so we can debug it.
  • To disable the feature, edit the features-overrides.json file as follows:
{
  "IdleShutdown": {
    "name": "",
    "label": "Shutdown VM when idle",
    "description": "When this is set, the system will shutdown the VM when idle",
    "enabled": false,
    "type": 2
  }
}

The file can be found here:

Mac: ~/Library/Group Containers/group.com.docker/features-overrides.json Windows: %APPDATA%\Roaming\Docker\features-overrides.json Linux: $HOME/.docker/desktop/settings.json

After you disable the feature, make sure to quit Docker Desktop and start it again via the Whalemenu on the taskbar (don't just simply click "restart" on the Whalemenu).

If you have any issues with this, please let us know.

Thanks again and we hope to fix all issues very soon.

This solution did not work for me on a mac. Is there possibly another one? Is there an easy way to downgrade Docker desktop, because this is inhibiting my ability to reliably work.

scottmatth commented 1 year ago

Hi folks, Cesar Talledo from Docker here. Sorry to hear you are having trouble with the resource-saver feature, and thank you very much for reporting the problem. First, quick context: The resource saver feature is meant to significantly reduce Docker Desktop's memory and CPU usage on the host when no containers are running, to improve overall user experience. It will reduce mem utilization by ~2GBs (or more) when DD goes idle. In DD v4.21, the feature would simply pause processes in the DD Linux VM, but in v4.22 we improved it to shutdown the DD Linux VM. We did a lot of testing prior to releasing the feature and for most users it's working well, but a few are reporting problems. Our apologies, we will try to fix them ASAP. For those of you experiencing problems:

  • If possible, please upload a diagnostics bundle so we can debug it.
  • To disable the feature, edit the features-overrides.json file as follows:
{
  "IdleShutdown": {
    "name": "",
    "label": "Shutdown VM when idle",
    "description": "When this is set, the system will shutdown the VM when idle",
    "enabled": false,
    "type": 2
  }
}

The file can be found here: Mac: ~/Library/Group Containers/group.com.docker/features-overrides.json Windows: %APPDATA%\Roaming\Docker\features-overrides.json Linux: $HOME/.docker/desktop/settings.json After you disable the feature, make sure to quit Docker Desktop and start it again via the Whalemenu on the taskbar (don't just simply click "restart" on the Whalemenu). If you have any issues with this, please let us know. Thanks again and we hope to fix all issues very soon.

This solution did not work for me on a mac. Is there possibly another one? Is there an easy way to downgrade Docker desktop, because this is inhibiting my ability to reliably work.

Please ignore my previous comment. I found the latest update and it is not only working great, but also docker seems a lot more responsive.

mmulligan03 commented 1 year ago

I will say that I noticed this as well yesterday. I was loosing my mind as well and thought I was just tired. It works for a few but then they all stop those commands working again and docker becomes unresponsive.

HI @mmulligan03, if possible please upload the diagnostics bundle so we can take a look. Thanks.

Wasn't crazy, still happens today. Everything stops working: Diagnostic ID: 318FD123-A706-4834-9A6A-2B7A60126529/20230828133250

I added the override and everything but stats is working again: Diagnostic ID: 318FD123-A706-4834-9A6A-2B7A60126529/20230828134850

ctalledo commented 1 year ago

Thanks @mmulligan03, we will take a look right away.

ctalledo commented 1 year ago

Hi @mmulligan03, yes I can acknowledge that the diagnostics logs shows an error while Docker Desktop is exiting resource saver mode, trying to restart the Linux VM:

[2023-08-28T13:28:39.401971000Z][com.docker.backend.idle][I] system idle for 30.002146166s -> reducing
[2023-08-28T13:28:39.403732000Z][com.docker.backend.idle][I] populating cache
ESC[91m[2023-08-28T13:29:39.405253000Z][com.docker.backend.idle][E] failed to populate cache: calling HEAD http://localhost/_ping: calling http://localhost/_ping 500ESC[39m
[2023-08-28T13:29:39.563547000Z][com.docker.backend.idle][I] idle -> busy (was idle for 1m30.163378s; reason: [in-flight APIs: map[/_ping:1]])

Do you recall how often does this occur? It seems it occurred on the first exit from resource saver mode in your case ...

lgw4 commented 1 year ago

@ctalledo I tried 4.22.1 (118664), but Resource Saver still does not allow docker CLI commands to execute. Uploaded Diagnostics ID: 05CCF340-F5A1-406D-9F5F-D549C1836DCD/2023082515460

Sorry to hear that @lgw4, we will take a look right away.

Can you double-check the diagnostics ID you provided? it's incorrect (seems to missing a digit at the end).

Thanks!

@ctalledo Sorry, I missed your response over the weekend. I do not have the original diagnostics ID, but the failure to restore from Resource Saver mode has recurred. I have uploaded a new diagnostics bundle.

Mac Studio:

Diagnostics ID:     54C2C7DF-076B-41C6-9686-912FAB6708CB/20230829024420 (uploaded)

MacBook Pro:

Diagnostics ID:     05CCF340-F5A1-406D-9F5F-D549C1836DCD/20230829032330 (uploaded)
ctalledo commented 1 year ago

Hi @mmulligan03, after inspecting your latest diagnosis bundle, we've made some further fixes. These are not yet released, but you can find a preview of them here:

Let us know if this looks better please. Thanks again!

mmulligan03 commented 1 year ago

Do you recall how often does this occur? It seems it occurred on the first exit from resource saver mode in your case ...

It happens everytime from what I can tell.

mmulligan03 commented 1 year ago

Let us know if this looks better please. Thanks again!

@ctalledo That latest build for Apple Silicon seems to have done the trick. docker stats still does not function in resource saver but other commands like version, ps and info all work when in resource saver.

ctalledo commented 1 year ago

Great to hear @mmulligan03!

docker stats still does not function in resource saver

Yes correct, we are working on a fix for that too.

Thanks again for your support!

ctalledo commented 1 year ago

Hi Chip (@lgw4),

If you have a chance, could you give the DD v4.23 preview build (see above) a try?

I am not 100% sure, but it may address the latest problem you reported.

Thanks!

lgw4 commented 1 year ago

@ctalledo Version 4.23.0 (119233) seems to have fixed my issue with Resource Saver (so far, but tomorrow will be the true test); however, it seems to have broken Use Rosetta for x86/amd64 emulation on Apple Silicon (which I have been using successfully since it has been available in Docker Desktop for macOS) with the following error:

0.086 rosetta error: unhandled auxillary vector type 28
0.086

I generated the following diagnostics bundle. I do not know if it will show you the Rosetta error or not.

Diagnostics ID:     05CCF340-F5A1-406D-9F5F-D549C1836DCD/20230830004341 (uploaded)
lgw4 commented 1 year ago

@ctalledo Unfortunately, the resume from Resource Saver mode issue is still present for me on version 4.23.0 (119233). I disabled Use Rosetta for x86/amd64 emulation on Apple Silicon.

Diagnostics ID:     05CCF340-F5A1-406D-9F5F-D549C1836DCD/20230830212424 (uploaded)
ctalledo commented 1 year ago

Hi @lgw4,

Unfortunately, the resume from Resource Saver mode issue is still present for me on version 4.23.0 (119233).

Sorry to hear that the problem still recurs with the DD v4.23 preview build. I can acknowledge it's there, as I can see there's one occasion where Docker Desktop exits resource saver mode but the VM restart never completes:

[2023-08-30T18:21:34.690826000Z][com.docker.backend.idle][I] starting VM        
[2023-08-30T18:22:04.691897000Z][com.docker.backend.idle][I] busy -> idle
[2023-08-30T18:22:04.692343000Z][com.docker.backend.idle][I] starting timer (30s)
[2023-08-30T18:22:34.693012000Z][com.docker.backend.idle][I] timer expired (30s)
[2023-08-30T18:31:34.697112000Z][com.docker.backend.idle][E] failed to start VM: Post "http://ipc/engine/start": context deadline exceeded (Client.Timeout exceeded while awaiting headers)

We are looking deeper to see why this sometimes occurs.

Regarding the Rosetta failure, we are also looking into it. DD v4.23 includes an updated Linux kernel, and we are trying to see if that plays a role in the failure you reported.

Thanks again!

djs55 commented 1 year ago

Hi @lgw4 ,

Although we've not yet been able to reproduce the hang, we did notice something unexpected in your diagnostic logs (thanks for uploading!) We've made a new version with some small fixes and additional logging which we hope will help us understand the problem better. If you have a moment could you try with

If it hangs again, could you upload another set of diagnostics and quote the ID?

Regarding the Rosetta failure, we confirmed it was caused by an updated kernel in that build. We're digging into that to identify the root cause.

Thanks, Dave

inkyoto commented 1 year ago

Docker Desktop continues to hang, even with the suggested configuration change in ~/Library/Group\ Containers/group.com.docker/features-overrides.jsonenacted.

The diagnostic ID is 45126C79-D3FC-4E2C-ADD9-E836000DDEF8/20230904083522

hrabe commented 1 year ago

Docker Desktop on Intel Mac worked for 2 weeks now after:

Today a found a freeze again under following circumstances:

I did several restarts within the last 2 weeks without any issues. The only difference now is a running Google Meet session with screen sharing.

ctalledo commented 1 year ago

I did several restarts within the last 2 weeks without any issues. The only difference now is a running Google Meet session with screen sharing.

Hi @hrabe, thanks for reporting. The only thing I can think of in your case is that maybe memory is running low on your Mac, so Docker Desktop no longer has enough memory to start. My suggestion would be to check if the host has sufficient memory before starting Docker Desktop (it typically needs 2GB->4GB of RAM to run the Linux VM). If it has sufficient memory and it does not start, please collect a Diagnostics bundle and we can take a look.

Thanks!

ctalledo commented 1 year ago

Hi @inkyoto,

Docker Desktop continues to hang, even with the suggested configuration change in ~/Library/Group\ Containers/group.com.docker/features-overrides.jsonenacted.

Thanks for reporting; is there a particular command on which it hangs, or do all commands hang?

toddjonker commented 1 year ago

I'm not sure if this is the same issue, but on my M1 MacBook Pro it consistently takes about 6 seconds for Docker Desktop 4.22.1 (118664) to recover from resource-saver mode. This adds intolerable friction to my code/test cycle. Please make sure this mode either recovers immediately or is easily disabled.

maodijim commented 1 year ago

MacBook Pro M2 (MacOS 13.4.1) on docker desktop 4.22.1(118664) has the same problem, docker enters resource saver mode (leaf icon) after a certain time the leaf icon will be gone and all docker CLI commands will hang until manually restarted. The only work around is to disable resource saver mode

ctalledo commented 1 year ago

Hi @toddjonker,

I'm not sure if this is the same issue, but on my M1 MacBook Pro it consistently takes about 6 seconds for Docker Desktop 4.22.1 (118664) to recover from resource-saver mode. This adds intolerable friction to my code/test cycle. Please make sure this mode either recovers immediately or is easily disabled.

Thanks for the feedback and apologies for the problems.

FYI, there is a way to modify the resource saver timeout via the settings.json file, as described in this comment above. We set it to 30 seconds by default with the goal of having Docker Desktop use as little resources as possible in your host machine when idle, but it sounds like that's too aggressive for your use case, so you can increase that to any value you need. We also plan to have this be configurable via the Docker Desktop settings soon.

Hope that helps for now while we continue to improve the feature. Thanks!

aiglesiasn commented 1 year ago

Hi @ctalledo !! Hope you're doing great! Can you help me out with this... my CLI is not working and some containers are frozen, this start happening yesterday after the Sleep mode came on in the Mac. A restart didn't work. This is my diagnosis ID. C127E98A-5F1F-471C-B98D-74F404C83436/20230920154431

Thank you very much for your help!

lgw4 commented 1 year ago

@ctalledo,

I finally had to disable experimental features in Docker Desktop for macOS. I really love the idea of Resource Saver mode, but on M2-series Apple silicon, it does not seem to be ready for production use.

Thank you for all the tips you provided and all the hard work you put in to try to make this work.

mikybars commented 1 year ago

@lgw4 MacBook Pro M2 (MacOS 13.5.2) on Docker Desktop 4.23.0 (119794) https://github.com/docker/for-mac/issues/6933#issuecomment-1697908062 and Experimental Features turned on. No issues so far 🤞🏾

ctalledo commented 1 year ago

Hi @ctalledo !! Hope you're doing great! Can you help me out with this... my CLI is not working and some containers are frozen, this start happening yesterday after the Sleep mode came on in the Mac. A restart didn't work. This is my diagnosis ID. C127E98A-5F1F-471C-B98D-74F404C83436/20230920154431

Thank you very much for your help!

Hi @aiglesiasn, sorry to hear that and thanks for reporting it. I looked at the diagnosis bundle but things looked OK (e.g., I could see Docker Desktop entering and exiting resource saver mode a few times without problem).

If possible, can you provide more info about the CLI commands that froze?

Thanks!

ctalledo commented 1 year ago

I finally had to disable experimental features in Docker Desktop for macOS. I really love the idea of Resource Saver mode, but on M2-series Apple silicon, it does not seem to be ready for production use.

Thanks for the feedback Chip (@lgw4) and too bad you had to disable it. It's on us to make sure we get it right. We tested the feature quite a bit prior to release, but of course nothing beats having thousands of users try it across a variety of host machines. We continue to work hard on squashing all bugs and appreciate your patience as we do so.

Thanks!

jreades commented 1 year ago

I am running the latest stable version on an Intel MBP (macOS 13.5.2) and have encountered this issue. Diagnostics ID: 4A890037-1AA1-4830-8D5C-B338720C2790/20230921132027

Will now try restarting with the overrides 'fix' and see if that helps.

[EDIT]: Yes, seems to have dealt with the issue (though I also went straight into building a new image).

aiglesiasn commented 1 year ago

Hi @ctalledo !! Hope you're doing great! Can you help me out with this... my CLI is not working and some containers are frozen, this start happening yesterday after the Sleep mode came on in the Mac. A restart didn't work. This is my diagnosis ID. C127E98A-5F1F-471C-B98D-74F404C83436/20230920154431 Thank you very much for your help!

Hi @aiglesiasn, sorry to hear that and thanks for reporting it. I looked at the diagnosis bundle but things looked OK (e.g., I could see Docker Desktop entering and exiting resource saver mode a few times without problem).

If possible, can you provide more info about the CLI commands that froze?

Thanks!

Thank @ctalledo I was trying to run: docker compose run --rm webapp composer install

And it was still not doing anything, the CPU usage was showing 0 after a couple seconds.

I looked into another issues and found this one in which some users were having problems with 4.23 and moving back to 4.22.1 solved the problem.

I did that, and also change the docker-library/php from 8.2 to 8.2.10, and everything started to work again.

To be honest I'm not exactly sure if docker-library/php was the reason the container didn't worked or if it was 4.23. But it all started when Mac entered Sleep mode.

Thank you for your support, and if you need any more info that I can get with 4.22.1 let me know.

pgazdik commented 1 year ago

I had this same problem on Windows 10, with a ~5 year old Dell XPS. Not even disabling experimental features helped, though I only restarted the app, not windows (which temporarily fixes the issue, until resource saver kicks in again). For now I have installed v21, to be extra sure it works.

ctalledo commented 1 year ago

Hi folks, just a quick update: Docker Desktop v4.24 now includes a way to configure the resource saver feature via the Dashboard's Settings->Resources->Advanced tab.

image

You can configure the resource saver timeout or turn the feature off is you wish.

More info can be found in the Docker Desktop docs.

ansiwen commented 1 year ago

Same issue here with 4.23.0 in case you need more diagnosis files: 95E98686-D4BB-4DCF-B0CA-0F6B96B45D98/20230930170701

Edit: Also with 4.24.0 the issue is still there. I set the timeout to 30s, waited shortly, and as soon as it entered the resource saving mode, the docker socket is unresponsive. New diagnosis ID: 95E98686-D4BB-4DCF-B0CA-0F6B96B45D98/20230930185609

T-101 commented 12 months ago

Can confirm on m2 pro and docker desktop 4.24.0, it doesn't recover from resource saver. Had to turn the feature completely off, again. As an added bonus, the update from 4.23.0 crashed every time. Updated by downloading the install file.

oli-laban commented 12 months ago

4.24.0 is completely broken for me. Resource Saver Mode is off in both the Docker Desktop settings and in settings.json, yet Docker immediately enters Resource Saver Mode on startup as indicated by the status bar, followed by around 30 seconds of freezing and then a crash.

Edit: Attempting to revert to a previous version of Docker Desktop results in an immediate crash. After reinstalling 4.24.0, the above issue persists.

kattelsameer commented 12 months ago

4.24.0 is completely broken for me. Resource Saver Mode is off in both the Docker Desktop settings and in settings.json, yet Docker immediately enters Resource Saver Mode on startup as indicated by the status bar, followed by around 30 seconds of freezing and then a crash.

Edit: Attempting to revert to a previous version of Docker Desktop results in an immediate crash. After reinstalling 4.24.0, the above issue persists.

Same issue. and Once I quit the docker desktop and try re-opening it it won't even lunch. System: Macbook Pro 2017 - Intel processor OS: Venture 13.6

ctalledo commented 12 months ago

Hi @T-101, @oli-laban, @kattelsameer, sorry to hear about the problems and thanks fore reporting. If possible, please upload a diagnostics bundle so we can analyze and debug. Thanks!

T-101 commented 12 months ago

@ctalledo Thank you for responding. Luckly I'm not experiencing crashes like oli-laban and kattelsameer. Just the inability to come out of resource saver mode.

I turned RS on and waited for Docker Desktop to go to RS mode. Then I tried waking it up by typing docker stats in the terminal, and the problem remains - it doesn't awake.

My Diagnostic ID: EFBCD219-AA0F-429B-AC88-1E9596619170/20231010075637 Docker Desktop 4.24.0 (122432) MacOS Ventura 13.6, MBP 2023 M2 Pro

oli-laban commented 11 months ago

@ctalledo

Diagnostics ID: 21117E06-3161-4610-93E9-A81156B93CC8/20231010173622 (Collected via the command line as the app won't stay open long enough) macOS 12.6.8, 2016 Intel MBP

Just for further reference, this is all I see in Docker Desktop before it crashes:

Screenshot 2023-10-10 at 18 35 32

Edit: 4.23.0 is working after completely uninstalling with /Applications/Docker.app/Contents/MacOS/uninstall. It still got stuck in Resource Saver Mode but at least I was able to turn that off by disabling "Access experimental features" in this version.

ctalledo commented 11 months ago

Hi @oli-laban, thanks for uploading the diagnostics bundle.

I looked at it and I can see the Docker Desktop Linux VM crashes when coming out of resource saver mode:

10086 log/host/com.docker.virtualization.log              :[2023-10-09T16:39:05.410603000Z][com.docker.virtualization][I] VM has started
10087 log/host/com.docker.backend.log.4                   :[2023-10-09T16:39:06.503906000Z][com.docker.backend.unix][I] 2023-10-09 17:39:06.503 com.docker.virtualization[90516:830853] The virtual machine stopped unexpectedely: Error Domain=VZErrorDomain Code=1 "The virtual machine stopped unexpectedly." UserIn>  
10088 log/host/com.docker.backend.log.4                   :[2023-10-09T16:39:06.504002000Z][com.docker.backend.unix][I] 2023-10-09 17:39:06.503 com.docker.virtualization[90516:830853] VZErrorInternal
10089 log/host/com.docker.backend.log.4                   :[2023-10-09T16:39:06.504051000Z][com.docker.backend.unix][I] 2023-10-09 17:39:06.503 com.docker.virtualization[90516:830853] Error domain: VZErrorDomain
10090 log/host/com.docker.backend.log.4                   :[2023-10-09T16:39:06.504084000Z][com.docker.backend.unix][I] 2023-10-09 17:39:06.503 com.docker.virtualization[90516:830853] Error userInfo {
10091 log/host/com.docker.backend.log.4                   :[2023-10-09T16:39:06.504126000Z][com.docker.backend.unix][I] NSLocalizedFailure = "Internal Virtualization error.";
10092 log/host/com.docker.backend.log.4                   :[2023-10-09T16:39:06.504164000Z][com.docker.backend.unix][I] NSLocalizedFailureReason = "The virtual machine stopped unexpectedly.";
10093 log/host/com.docker.backend.log.4                   :[2023-10-09T16:39:06.504189000Z][com.docker.backend.unix][I] }
10094 log/host/com.docker.virtualization.log              :[2023-10-09T16:39:06.509086000Z][com.docker.virtualization][I] VM has stopped: Internal Virtualization error. The virtual machine stopped unexpectedly.

This is unexpected and likely due to a Hypervisor bug on the Mac. It's also surprising that the problem occurs right away, on the first exit from resource saver mode (i.e., the first time Docker Desktop tries to restart the Linux VM).

I'll dig a bit deeper, but If the problem reproduces all the time, I suggest you disable resource saver mode for now on that machine.

Alternatively, I noticed you are using MacOS 12.6.8 (Monterey); you can try updating to a MacOS 13 or 14, assuming that's something you are willing to do.

ctalledo commented 11 months ago

Hi @T-101, thanks for filing the diagnostics bundle.

I looked at it and I see there's a problem when Docker Desktop tries to enter resource saver mode. It's different from the issue reported by @oli-laban and does appear to be a bug in Docker Desktop. We are investigating further and will keep you posted.

oli-laban commented 11 months ago

@ctalledo Thanks for looking into it. Unfortunately I can't update beyond macOS 12 as they stopped supporting the 2016 models (cheers Apple...).

I suggest you disable resource saver mode for now on that machine.

I'd be happy to do this but I was unable to disable Resource Saver Mode in 4.24.0. It showed as disabled in the settings UI and the settings.json file, but was clearly enabled in Docker Desktop on launch as it showed the leaf icon in the status bar and in the bottom left of the Docker Desktop UI.

ctalledo commented 11 months ago

I was unable to disable Resource Saver Mode in 4.24.0. It showed as disabled in the settings UI and the settings.json file, but was clearly enabled in Docker Desktop on launch as it showed the leaf icon in the status bar and in the bottom left of the Docker Desktop UI.

Mmm ... that's unexpected; let me take a look and get back to you. Thanks again @oli-laban.