docker / for-win

Bug reports for Docker Desktop for Windows
https://www.docker.com/products/docker#/windows
1.86k stars 291 forks source link

Stopping Docker Desktop doesn't terminate docker-desktop-data WSL2 distro #13443

Closed alexeyvarganov closed 7 months ago

alexeyvarganov commented 1 year ago

Actual behavior

After about a minute from stopping Docker Desktop the WSL2 disrto docker-desktop-data is still running while docker-desktop distro terminated

Expected behavior

Both distro docker-desktop and docker-desktop-data terminated shortly after quitting Docker Desktop

Information

Output of & "C:\Program Files\Docker\Docker\resources\com.docker.diagnose.exe" check

Starting diagnostics

[PASS] DD0027: is there available disk space on the host? [PASS] DD0028: is there available VM disk space? [SKIP] DD0002: does the bootloader have virtualization enabled? [SKIP] DD0018: does the host support virtualization? [PASS] DD0001: is the application running? [SKIP] DD0022: is the Virtual Machine Platform Windows Feature enabled? [SKIP] DD0021: is the WSL 2 Windows Feature enabled? [PASS] DD0024: is WSL installed? [PASS] DD0025: are WSL distros installed? [PASS] DD0026: is the WSL LxssManager service running? [FAIL] DD0029: is the WSL 2 Linux filesystem corrupt? [ 4.090834] EXT4-fs error (device sdc): ext4_put_super:1188: comm weston: Couldn't clean up the journal [PASS] DD0035: is the VM time synchronized? [PASS] DD0017: can a VM be started? [PASS] DD0016: is the LinuxKit VM running? [PASS] DD0011: are the LinuxKit services running? [PASS] DD0004: is the Docker engine running? [PASS] DD0015: are the binary symlinks installed? [PASS] DD0031: does the Docker API work? [PASS] DD0013: is the $PATH ok? [PASS] DD0003: is the Docker CLI working? [PASS] DD0005: is the user in the docker-users group? [PASS] DD0038: is the connection to Docker working? [FAIL] DD0014: are the backend processes running? 1 error occurred:

[PASS] DD0007: is the backend responding? [PASS] DD0008: is the native API responding? [FAIL] DD0009: is the vpnkit API responding? open \.\pipe\dockerVpnKitDiagnostics: The system cannot find the file specified. [PASS] DD0010: is the Docker API proxy responding? [SKIP] DD0006: is the Docker Desktop Service responding? [SKIP] DD0030: is the image access management authorized? [PASS] DD0033: does the host have Internet access? [PASS] DD0002: does the bootloader have virtualization enabled? [PASS] DD0018: does the host support virtualization? [PASS] DD0001: is the application running? [PASS] DD0022: is the Virtual Machine Platform Windows Feature enabled? [PASS] DD0021: is the WSL 2 Windows Feature enabled? [PASS] DD0024: is WSL installed? [PASS] DD0025: are WSL distros installed? [PASS] DD0026: is the WSL LxssManager service running? [WARN] DD0029: is the WSL 2 Linux filesystem corrupt? [ 4.090834] EXT4-fs error (device sdc): ext4_put_super:1188: comm weston: Couldn't clean up the journal [PASS] DD0035: is the VM time synchronized? [PASS] DD0017: can a VM be started? [PASS] DD0016: is the LinuxKit VM running? [PASS] DD0011: are the LinuxKit services running? [PASS] DD0004: is the Docker engine running? [PASS] DD0015: are the binary symlinks installed? [PASS] DD0031: does the Docker API work? [PASS] DD0032: do Docker networks overlap with host IPs?

Please note the following 1 warning:

1 : The check: is the WSL 2 Linux filesystem corrupt? Produced the following warning: [ 4.090834] EXT4-fs error (device sdc): ext4_put_super:1188: comm weston: Couldn't clean up the journal

If the WSL 2 Linux filesystem is corrupt then Docker Desktop cannot start. There is a known issue fixed in Windows Insider builds which can cause filesystem corruption, see: https://github.com/microsoft/WSL/issues/5895 .

Try running "wsl --shutdown" to stop your WSL Virtual Machine. When it restarts it will run a filesystem check and hopefully fix the problem.

Please investigate the following 1 issue:

1 : The test: is the WSL 2 Linux filesystem corrupt? Failed with: [ 4.090834] EXT4-fs error (device sdc): ext4_put_super:1188: comm weston: Couldn't clean up the journal

If the WSL 2 Linux filesystem is corrupt then Docker Desktop cannot start. There is a known issue fixed in Windows Insider builds which can cause filesystem corruption, see: https://github.com/microsoft/WSL/issues/5895 .

Try running "wsl --shutdown" to stop your WSL Virtual Machine. When it restarts it will run a filesystem check and hopefully fix the problem.

Steps to reproduce the behavior

Resetting to factory settings doesn't resolve the issue. The issue was reproduced on two independent workstations,

  1. Start Docker Desktop
  2. Stop Docker Desktop
  3. After about a minute from stopping Docker Desktop application check for running wsl2 distros wsl -l -v
  4. Confirm that docker-desktop-data distro is still running, while docker-desktop distro is stopped.
MihaelaStoica commented 1 year ago

@alexeyvarganov Does the docker-desktop-data distro get stopped eventually, say after 2-3 minutes?

adamjseitz commented 1 year ago

@alexeyvarganov Does the docker-desktop-data distro get stopped eventually, say after 2-3 minutes?

I am not the original reporter, but I am experiencing this as well. It does not ever seem to get stopped for me.

alexeyvarganov commented 1 year ago

@alexeyvarganov Does the docker-desktop-data distro get stopped eventually, say after 2-3 minutes?

The docker-desktop-data distro does not seem to stop at all based on some of my measurements - it continues to run indefinitely until I shutdown wsl

Uj947nXmRqV2nRaWshKtHzTvckUUpD commented 1 year ago

same for me on win 11. eating 8 GB RAM even if i quit docker desktop from tray. i use WSL manager to stop docker-desktop-data and free the 8GB held by the VmmemWSL process (it takes a minute for it to end)

DuaRobin commented 1 year ago

same for me on win 11. eating 8 GB RAM even if i quit docker desktop from tray. i use WSL manager to stop docker-desktop-data and free the 8GB held by the VmmemWSL process (it takes a minute for it to end)

Same issue for me as well. After a couple min docker-desktop stops automatically, but after several min too docker-desktop-data doesn't stop. had to manually terminate thru wsl --shutdown

@fusionneur I did however manage to add a limit to RAM Usage (4GB) thru .wslconfig.

changetol8 commented 1 year ago

I had the same issue on docker desktop 4.20.1 on windows 11. Need run wsl --shutdown to terminate VmmemWSL process

wohenbushuang commented 1 year ago

same on win 10

MrMarvel commented 9 months ago

Docker Desktop 4.27.0 Docker version 25.0.1 Windows 10 WSL: 2.0.14.0 Same here

D:\Users\Sergey> wsl --list -v
  NAME                   STATE           VERSION
* Ubuntu                 Stopped         2
  docker-desktop-data    Running         2
  docker-desktop         Running         2

~4GB is used

MrMarvel commented 9 months ago

But on Docker Desktop 4.25.1 (128006) wsl closes fine.

rmenai commented 8 months ago

I'm also experiencing this issue.

jtvrdon commented 8 months ago

For me it's the same. After quitting docker desktop:

Docker Desktop v4.27.2 Docker Engine v25.0.3 Windows 11 WSL version: 2.0.9.0

D1lsh0d commented 8 months ago

Same problem on Docker Desktop v4.28.0, Windows 11, WSL v2.0.14.0 Had to manually shutdown in terminal

MrMarvel commented 8 months ago

Why devs have not already check this issue? I have to sit on 4.25.1 because of this behavior

Adamou02 commented 7 months ago

Same issue, pls fix it. Have to manually do wsl --shutdown to stop docker-desktop-data and docker-desktop

nicolassimoncini commented 7 months ago

Same here with Docker Desktop v4.28.0, Windows 10 22H2, WSL v2.1.5.0 😞 I manually stopped the images (wsl -t <image>) and vmmemwsl just stopped after a few secconds.

MihaelaStoica commented 7 months ago

Hey everyone, we fixed the issue in Docker Desktop 4.29, please give it a try. I'm closing this ticket, but if you encounter the same again, please let us know.

Adamou02 commented 7 months ago

Hey everyone, we fixed the issue in Docker Desktop 4.29, please give it a try. I'm closing this ticket, but if you encounter the same again, please let us know.

Can you show me the pr pls. Just to analyze the solution.