Skip to content

Docker Desktop on Windows crashes when Switching from Linux to Windows platforms (timeout) #11901

Description

@enrichicco

( obviously I included the kernel update package)

Actual behavior

switching to windows containers, the docker desktop app crashes (timeout); when I restart it, it is back on the linux side

System.ServiceProcess.TimeoutException:
Time out has expired and the operation has not been completed.
   at System.ServiceProcess.ServiceController.WaitForStatus(ServiceControllerStatus desiredStatus, TimeSpan timeout)
   at Docker.Backend.Proces...

According to the logs, there is a recurring event (it seems that the app tries several times, then leaves with the exception; just a small excerpt:

[16:19:11.408][IPCClient         ][Info   ] (34e9e27b) 6ad557eb-GoBackendClient-CSharp C->S BackendAPI POST /events: {"timestamp":0,"content":"WindowsContainersEngine sent docker state failed to start","docker":"failed to start","kubernetes":null,"synchronization":null}
[16:19:12.411][GoBackendProcess  ][Info   ] msg="(34e9e27b) 2464bb5c-BackendAPI S<-C 6ad557eb-GoBackendClient-CSharp POST /events[[STACK]]   at Docker.Core.GoBackend.GoBackendClient.<PostAsync>d__17`1.MoveNext() in C:\\workspaces\\master-merge\\src\\github.com\\docker\\pinata\\win\\src\\Docker.Core\\GoBackend\\GoBackendClient.cs:line 246\n   at Docker.Core.GoBackend.GoBackendClient.PostAsync[T](String route, T payload)\n   at Docker.Core.GoBackend.GoBackendClient.<PushEvent>d__19.MoveNext() in C:\\workspaces\\master-merge\\src\\github.com\\docker\\pinata\\win\\src\\Docker.Core\\GoBackend\\GoBackendClient.cs:line 0\n   at Docker.Core.GoBackend.GoBackendClient.PushEvent(Event e)\n   at Docker.Engines.WindowsContainersEngine.<SendState>d__17.MoveNext() in C:\\workspaces\\master-merge\\src\\github.com\\docker\\pinata\\win\\src\\Docker.Engines\\WindowsContainersEngine.cs:line 129\n   at Docker.Engines.WindowsContainersEngine.SendState(String state)\n   at Docker.Engines.WindowsContainersEngine.<DoStartAsync>d__12.MoveNext() in C:\\workspaces\\master-merge\\src\\github.com\\docker\\pinata\\win\\src\\Docker.Engines\\WindowsContainersEngine.cs:line 62\n   at Docker.Core.BackendAPI.ServiceAPIClient.<StartWindowsContainersAsync>d__6.MoveNext() in C:\\workspaces\\master-merge\\src\\github.com\\docker\\pinata\\win\\src\\Docker.Core\\BackendAPI\\ServiceAPIClient.cs:line 53\n"
[16:19:12.411][GoBackendProcess  ][Info   ] msg="(34e9e27b) 2464bb5c-BackendAPI S<-C 6ad557eb-GoBackendClient-CSharp bind: {\"timestamp\":0,\"HasServerTimestamp\":false,\"content\":\"WindowsContainersEngine sent docker state failed to start\",\"docker\":\"failed to start\"}"
[16:19:12.411][GoBackendProcess  ][Info   ] msg="sending to gui: 1629037152411231400 (from server) docker: failed to start (WindowsContainersEngine sent docker state failed to start) "
[16:19:12.411][GoBackendProcess  ][Info   ] msg="(34e9e27b-1) 80e3492d-BackendCMD C->S CSharpAPI POST /docker: {\"state\":\"failed to start\"}"
[16:19:12.453][IPCServer         ][Info   ] (34e9e27b-1) 1dd2198f-CSharpAPI S<-C 80e3492d-BackendCMD POST /docker

Expected behavior

The app should switch to windows containers without problems, as, by the way, it did the first time (it worked once, than stopped)

Information

  • Is it reproducible?
    on my machine yes : keeps happening, despite I also tried changing (downgrading) the docker version (tested also vs 3.4.0 and 3.5.2)

  • Is the problem new?
    I found some threads (one year old) regarding similar issues
    Docker fails to start after v3.0.0 upgrade #9755
    "Timeout has expired" when switching to Windows containers #1898
    Switching to Windows Containers Crashes Docker Desktop #8634
    https://forums.docker.com/t/switching-to-windows-container-crash/80610
    ... and many other (searched on google something like Docker Desktop switch to windows container crashes/timeout/whatever...)

  • Did the problem appear with an update?
    I would say no

  • A reproducible case if this is a bug, Dockerfiles with reproduction inside is best.
    no docker files, I just switched the platforms to windows right clicking on the docker icon in the hidden/running area and selecting "Switch to Windows containers..."

  • Did it worked sometimes?...
    after the very first install, I was able to switch, and I was able to test some windows containers (mssql server). The day after, the problem appeared, and I was not able to launch the windows side any more.

  • Windows Version:
    Win 10 Pro, 20H2 Build 19042.1165

  • Docker Desktop Version:
    3.6.0 ... reinstalled many times... I tried also with 3.4.0 and 3.5.2

  • WSL2 or Hyper-V backend?
    WSL2 (Debian distro)

  • Are you running inside a virtualized Windows e.g. on a cloud server or a VM:
    No, I am on a physical machine (Eurocom W7, 32 GB RAM, 2+2 TB ssd, intel 8700K, nvidia geforce 1080, windows fresh install, Visual studio installed...)

Steps to reproduce the behavior

  1. On my machine, trying to change the containers type (from linux to windows) is enough

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