Skip to content

Win10/WSL2: Docker containers become unkillable #13320

@mason-hendricks

Description

@mason-hendricks
  • I have tried with the latest version of Docker Desktop
  • I have tried disabling enabled experimental features
  • I have uploaded Diagnostics
  • Diagnostics ID: 7297779D-1ECF-4C93-9816-379A68A6A548/20230320221923

Actual behavior

docker-compose down / Ctrl-C hangs until: Error response from daemon: cannot stop container: {containerHash}: tried to kill container, but did not receive an exit event.

Trying to docker exec into the container for a manual stop produces: OCI runtime exec failed: exec failed: unable to start container process: error executing setns process: exit status 1: unknown

Once this happens on my machine, all running containers are unstoppable until docker/wsl are stopped and restarted. I would prefer to not have to restart docker and each container when I just need one restarted.

Any guidance as to what could be causing this would be greatly appreciated!

Expected behavior

docker-compose down or Ctrl-C in terminal should stop docker containers.

  • Windows Version: 10.0.19045
  • Docker Desktop Version: 4.17.0
  • WSL2 or Hyper-V backend? WSL2
  • Are you running inside a virtualized Windows e.g. on a cloud server or a VM: No

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

`C:\Program Files\Docker\Docker\resources>com.docker.diagnose.exe check
[2023-03-20T22:21:32.285664400Z][com.docker.diagnose.exe][I] set path configuration to OnHost
Starting diagnostics

[PASS] DD0027: is there available disk space on the host?
[PASS] DD0028: is there available VM disk space?
[PASS] DD0002: does the bootloader have virtualization enabled?
[SKIP] 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?
[PASS] DD0029: is the WSL 2 Linux filesystem corrupt?
[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?
[PASS] DD0014: are the backend processes running?
[PASS] DD0007: is the backend responding?
[PASS] DD0008: is the native API responding?
[PASS] DD0009: is the vpnkit API responding?
[PASS] DD0010: is the Docker API proxy responding?
[PASS] 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?
[PASS] DD0029: is the WSL 2 Linux filesystem corrupt?
[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?
[WARN] DD0032: do Docker networks overlap with host IPs? network {network} has subnet {network ip} which overlaps with host IP {host ip}

Please note the following 1 warning:

1 : The check: do Docker networks overlap with host IPs?
Produced the following warning: network {network} has subnet {network ip} which overlaps with host IP {host ip}

If the subnet used by a Docker network overlaps with an IP used by the host, then containers
won't be able to contact the overlapping IP addresses.

Try configuring the IP address range used by networks: in your docker-compose.yml.
See https://docs.docker.com/compose/compose-file/compose-file-v2/#ipv4_address-ipv6_address

No fatal errors detected.`

NOTE: The above warning message is also produced on my laptop, which does not replicate this problem. Instead of switching machines, I'd prefer this to be rectified on my main work setup.

This doesn't seem to be limited to a docker configuration. My company uses 3 containers for our stack, any one of which can produce this issue.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions