docker / for-win

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

Docker Desktop regularly crashes with various WSL errors #14238

Open SledgeHammer01 opened 4 months ago

SledgeHammer01 commented 4 months ago

Description

My Kubernetes instance has the following installed:

Often times, when I start up Docker, I get various WSL errors

When I tried to collect diagnostics while it was in a "hosed" state, it ended with:

Diagnostics Bundle: C:\Users\xxx~1\AppData\Local\Temp\5D2F74A2-A83F-4710-B6C4-FD06BB364B1D\20240804025350.zip
[2024-08-04T02:56:31.768356800Z][com.docker.diagnose.exe.settingsloader] loaded settings
[2024-08-04T02:56:31.773851700Z][com.docker.diagnose.exe.public] using HTTP proxy inside com.docker.backend
Error uploading: uploading file "C:\\Users\\xxx~1\\AppData\\Local\\Temp\\5D2F74A2-A83F-4710-B6C4-FD06BB364B1D\\20240804025350.zip" with key "incoming/3/5D2F74A2-A83F-4710-B6C4-FD06BB364B1D/20240804025350.zip": RequestError: send request failed
caused by: Put "https://docker-pinata-support.s3.amazonaws.com/incoming/3/5D2F74A2-A83F-4710-B6C4-FD06BB364B1D/20240804025350.zip": tls: failed to verify certificate: x509: certificate signed by unknown authority

I don't know how useful it will be though since when it's in a "hosed" state, the docker daemon is crashed and it can't connect to it.

EDIT: Yes, I am cleanly shutting down Docker before rebooting.

Reproduce

Starting docker desktop

Expected behavior

No response

docker version

Client:
 Version:           27.1.1
 API version:       1.46
 Go version:        go1.21.12
 Git commit:        6312585
 Built:             Tue Jul 23 19:57:57 2024
 OS/Arch:           windows/amd64
 Context:           desktop-linux

Server: Docker Desktop 4.33.1 (161083)
 Engine:
  Version:          27.1.1
  API version:      1.46 (minimum version 1.24)
  Go version:       go1.21.12
  Git commit:       cc13f95
  Built:            Tue Jul 23 19:57:19 2024
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.7.19
  GitCommit:        2bf793ef6dc9a18e00cb12efb64355c2c9d5eb41
 runc:
  Version:          1.7.19
  GitCommit:        v1.1.13-0-g58aa920
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

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:     C:\Program Files\Docker\cli-plugins\docker-buildx.exe
  compose: Docker Compose (Docker Inc.)
    Version:  v2.29.1-desktop.1
    Path:     C:\Program Files\Docker\cli-plugins\docker-compose.exe
  debug: Get a shell into any image or container (Docker Inc.)
    Version:  0.0.34
    Path:     C:\Program Files\Docker\cli-plugins\docker-debug.exe
  desktop: Docker Desktop commands (Alpha) (Docker Inc.)
    Version:  v0.0.14
    Path:     C:\Program Files\Docker\cli-plugins\docker-desktop.exe
  dev: Docker Dev Environments (Docker Inc.)
    Version:  v0.1.2
    Path:     C:\Program Files\Docker\cli-plugins\docker-dev.exe
  extension: Manages Docker extensions (Docker Inc.)
    Version:  v0.2.25
    Path:     C:\Program Files\Docker\cli-plugins\docker-extension.exe
  feedback: Provide feedback, right in your terminal! (Docker Inc.)
    Version:  v1.0.5
    Path:     C:\Program Files\Docker\cli-plugins\docker-feedback.exe
  init: Creates Docker-related starter files for your project (Docker Inc.)
    Version:  v1.3.0
    Path:     C:\Program Files\Docker\cli-plugins\docker-init.exe
  sbom: View the packaged-based Software Bill Of Materials (SBOM) for an image (Anchore Inc.)
    Version:  0.6.0
    Path:     C:\Program Files\Docker\cli-plugins\docker-sbom.exe
  scout: Docker Scout (Docker Inc.)
    Version:  v1.11.0
    Path:     C:\Program Files\Docker\cli-plugins\docker-scout.exe

Server:
 Containers: 142
  Running: 59
  Paused: 0
  Stopped: 83
 Images: 36
 Server Version: 27.1.1
 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: 1
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 2bf793ef6dc9a18e00cb12efb64355c2c9d5eb41
 runc version: v1.1.13-0-g58aa920
 init version: de40ad0
 Security Options:
  seccomp
   Profile: unconfined
 Kernel Version: 5.15.153.1-microsoft-standard-WSL2
 Operating System: Docker Desktop
 OSType: linux
 Architecture: x86_64
 CPUs: 28
 Total Memory: 15.51GiB
 Name: docker-desktop
 ID: 6f70f2f6-0226-4056-9b52-ac0133f84d03
 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
 Labels:
  com.docker.desktop.address=npipe://\\.\pipe\docker_cli
 Experimental: false
 Insecure Registries:
  hubproxy.docker.internal:5555
  127.0.0.0/8
 Live Restore Enabled: false

WARNING: No blkio throttle.read_bps_device support
WARNING: No blkio throttle.write_bps_device support
WARNING: No blkio throttle.read_iops_device support
WARNING: No blkio throttle.write_iops_device support
WARNING: daemon is not using the default seccomp profile

Diagnostics ID

N/A

Additional Info

No response

SledgeHammer01 commented 3 months ago

After getting the error spotted in wslbootstrap log: "[2024-08-04T13:04:00.245585549Z][wsl-bootstrap][F] preparing block device /dev/sdd: mounting disk: input/output error". My Docker is basically corrupt and there is no way to start it and I have to uninstall it and reinstall it and all my k8s stuff.

SledgeHammer01 commented 3 months ago

Tried completely uninstall and downgrading to 4.29.0 since I don't recall having this issue until more recently. This version doesn't reliably start up K8s on a reboot. Get's stuck at "starting Kubernetes" and I have to restart docker a bunch of times.

SledgeHammer01 commented 3 months ago

Another error:

running engine: waiting for the VM setup to be ready: starting WSL engine: bootstrapping in the main distro: starting wsl-bootstrap: context canceled

After installing just ONE application via Helm, Docker is once again hosed and requires a complete uninstall and reinstall.

SledgeHammer01 commented 3 months ago

Yet another error:

error spotted in wslbootstrap log: "[2024-08-04T14:00:49.850833298Z][wsl-bootstrap][F] open /mnt/host/wsl/docker-desktop-data/isocache/entries/docker-wsl-cli.iso/643b529b8b4a6c7b1f239a83cd50e615b703ffea21034698ff60fe88bc5b5957: read-only file system"

SledgeHammer01 commented 3 months ago

And another:

running wsl-keepalive in "docker-desktop-data": WSL engine terminated abruptly

SledgeHammer01 commented 3 months ago

4th error of the day:

deploying WSL2 distributions ensuring main distro is deployed: checking if main distro is up to date: checking main distro bootstrap version: getting main distro bootstrap version: open \wsl$\docker-desktop\etc\wsl_bootstrap_version: The network name cannot be found. checking if isocache exists: CreateFile \wsl$\docker-desktop-data\isocache\: The network name cannot be found.

SledgeHammer01 commented 3 months ago

FYI: SFC and DISM scans pass 100%. BIOS and microcode fully up to date. No overclocking. Memtests all pass with flying colors. 0 problems with the system otherwise.

SledgeHammer01 commented 3 months ago

Completely uninstalled WSL, HyperV, Containers, all WSL distros, data directories, etc. Reinstalled docker + K8s, installed ONE application via Helm and immediately got "Structure needs cleaning".

makeable commented 3 months ago

I have also been getting problems with the new docker version. When iu run an AI workload in a container. This wasnt happening until I updated. Im not sure which version introduced it.

SledgeHammer01 commented 3 months ago

@lorenrh any update on this? It's completely unusable when it corrupts the data once or twice a DAY

EDIflyer commented 1 month ago

4.34.2 had a crash with "running wsl-keepalive in "docker-desktop-data": WSL engine terminated abruptly" too Diagnostic ID: F5FC5563-1C07-4889-9998-5D2A7F63F50A/20241005000149