New Bug (4.37.0): Docker Desktop refuses to shut down

Win 11 Pro (23H2 build 22631.4602)

Docker Desktop just updated itself to 4.37.0 (178034) (engine 27.4.0). There appears to be a new bug.

Now, when I click the menu and select “quit Docker Desktop” I get the “Turning off the Docker Engine” screen forever. Before this update, it would be on this screen for a few seconds and it would successfully shut down the engine. I have left it there for ten minutes right now, and it has still not shut down the engine.

The only way to get it shut down is to go into Task Manager, search for anything with “docker” in the name, and use the “end task” option on it.

This is a significant regression, as I typically shut Docker down before hibernating and moving my laptop. It often failed to recover from a hibernate (or even a sleep) so I got in the habit of shuttting it down before closing the lid and moving on.

If Docker Desktop fails to shut down, I cannot use it again until I nuke it from orbit. Sometimes, it refuses to start up again, and I have to restart Windows.

Can you reproduce it every time? I updated my Desktop on Windows but I can use “Quit Docker Desktop” without any problem. I noticed I didn’t have the latest Windows 11 update, so I installed it, restarted Windows, tried Docker Desktop again, but it still works. So somehow we should figure out what is different in your Desktop. Maybe some settings. You can also check if someone already reported it on GitHub

Thanks for the GitHub link! I’ll search the issues.

Yesterday, my desktop updated itself to 24H2, I updated Docker on that (it was on the previous version), and it works just fine on that machine.

On my laptop, the problem is 100% repeatable – even if I just start Docker Desktop, and tell it to quit immediately after it starts up.

I was going to just nuke the whole Docker install and re-install fresh to see if there was maybe an issue with app data.

But I’m willing to spelunk settings if you can suggest some places to look. The refusal to shut down is the only issue I am having, all other funtionality is good.

The desktop is AMD with Radeon GPU, brand new. The laptop is Intel, with “Iris Xe” graphics (don’t know if that’s on-cpu or separate).

The laptop has “Memory Integrity” under Core Isolation turned off, as I was using VirtualBox before Docker. I really have no need for that anymore. The desktop has all those settings at default.

I just discovered that Microsoft in its wisdom installed “Dev Home (Preview)” on my laptop without my say so. I’ll uninstall and reboot and see if that helps.

I never heard of Dev Home, but it looks like it was installed on my machine too. So it can’t be the difference. Regarding settings, if you have the defaults, I don’t have a specific idea. True that I changed the defaults, but now I did a factory reset and I still can’t reproduce the issue. Which backend are you using? HyperV or WSL2?

I’m using WSL2. I think HyperV is enabled on both machines in the Windows settings.

Just removed Dev Home, turned “Memory Integrity” back on, rebooted, same issue.

I started it and asked it to quit right away after the rebood, and I left it with the stopping the engine spinner for a long time. It went back to the regular sceen. I didn’t catch any error messages or anything.

But it won’t create any containers. It is dead. Windows Task Manager says that Docker Desktop and the backend are all running.

I’m looking at the log files (AppData/Local/Docler/log/vm) and in 01-docker.log I see a slew of errors about device or resource busy, failed to remove cgroup.

I don’t see anything obviously suspicious in the other logs. In fact all of them seem to report that the various parts of the back end did shut down cleanly (even though they’re still running).

I think I’ll save the logs, and take the nuclear approach. Uninstall everything, go on a pogrom with File Explorer and if necessary the wsl command to eradicate all Docker stuff everywhere, then reinstall from scratch. That’ll tell me if something went wacky with the install, or if there’s something wrong with my laptop settings.

This is just too weird to think that merely going from 4.36 to 4.37 would cause a perfectly functional setup to fail like this. There has to be some kind of corruption somewhere.

Do you have running containers in Docker Desktop which can’t stop?

No, there were no containers running. I always tell my containers to stop before I stop Docker (they all have stuff in their entrypoint scripts that respond to SIGTERM by doing a clean shutdown of the stuff running inside).

So I just nuked the world, scrubbed the whole thing off my computer, downloaded a fresh installer from the website. It installed 4.36, which works fine.

I went into settings and updated it to 4.37. Same problem. So I’ll be going on GitHub and filing an issue.

You don’t even need to start any containers. Just start Docker Desktop then tell it to quit. It hangs.

Interesting that it happens on two different computers, without even running a single container.

If containers were running, I could imagine that the process insight one or more of the containers might require a different termination signal than SIGTERM, or has a grace period configured that prologues its termination.

I am not able to reproduce the problem on Win11 / DDfW 4.37.0 either.

It only happens on my laptop. The desktop is fine.

And no, there are no containers running.

  1. Start Docker Desktop
  2. Do not do anything else.
  3. Tell Docker Desktop to quit
  4. Watch it hang

Thanks for doing so. I share the link here as well for other users