microsoft / WSL

Issues found on WSL
https://docs.microsoft.com/windows/wsl
MIT License
17.48k stars 822 forks source link

Docker dead after latest Kernel #11957

Closed SirLouen closed 2 months ago

SirLouen commented 2 months ago

Windows Version

Microsoft Windows [Version 10.0.22631.4037]

WSL Version

2.3.17.0

Are you using WSL 1 or WSL 2?

Kernel Version

6.6.36.6

Distro Version

Ubuntu 22.04

Other Software

Docker Desktop: 4.33.1

Repro Steps

  1. Compile the latest WSL kernel https://github.com/microsoft/WSL2-Linux-Kernel/releases/tag/linux-msft-wsl-6.6.36.3 Steps to compile: 1.1 Download the WSL2-Linux-Kernel 1.2 Extract and copy the config file attached as .config in the Kernel source files config-6.6.36.3.txt 1.3 Run commands:

    make prepare modules_prepare -j $(expr $(nproc) - 1)
    make modules -j $(expr $(nproc) - 1)
    sudo make modules_install
    make -j $(expr $(nproc) - 1)
    sudo make install
  2. Then copy the vmlinux in a place where Windows host can read it

  3. Add the file it to the .wslconfig to run WSL with it

    [wsl2]
    kernel=C:\\Users\\user\\vmlinux
  4. Shutdown wsl with wsl --shutdown to refresh with the new Kernel

  5. Start a fresh installation of Docker Desktop

Expected Behavior

Docker Desktop should run

Actual Behavior

Throws an error, and an endless loop trying to update WSL. In the video, the administrative escalation prompt doesn't show up, but can be heard each time it pops:

https://github.com/user-attachments/assets/ce7e635a-0d30-44ab-9c80-3a8d16ae2f82

With the same WSL version, Docker Desktop version, and everything identical, if I use the standard Kernel 5.15.153.1, everything works well. But as soon I change to the new 6.6.36.6 Kernel, Docker Desktop breaks.

Diagnostic Logs

More info can be found here. https://github.com/docker/for-win/issues/14282

Problem here is that I'm not sure if its an issue with Docker Desktop or WSL Kernel, and since this is the issue tracker for WSL2-Linux-Kernel repo, I had to also post this here.

github-actions[bot] commented 2 months ago

Logs are required for review from WSL team

If this a feature request, please reply with '/feature'. If this is a question, reply with '/question'. Otherwise please attach logs by following the instructions below, your issue will not be reviewed unless they are added. These logs will help us understand what is going on in your machine.

How to collect WSL logs Download and execute [collect-wsl-logs.ps1](https://github.com/Microsoft/WSL/blob/master/diagnostics/collect-wsl-logs.ps1) in an **administrative powershell prompt**: ``` Invoke-WebRequest -UseBasicParsing "https://raw.githubusercontent.com/microsoft/WSL/master/diagnostics/collect-wsl-logs.ps1" -OutFile collect-wsl-logs.ps1 Set-ExecutionPolicy Bypass -Scope Process -Force .\collect-wsl-logs.ps1 ``` The script will output the path of the log file once done. If this is a networking issue, please use [collect-networking-logs.ps1](https://github.com/Microsoft/WSL/blob/master/diagnostics/collect-networking-logs.ps1), following the instructions [here](https://github.com/microsoft/WSL/blob/master/CONTRIBUTING.md#collect-wsl-logs-for-networking-issues) Once completed please upload the output files to this Github issue. [Click here for more info on logging](https://github.com/microsoft/WSL/blob/master/CONTRIBUTING.md#8-collect-wsl-logs-recommended-method) If you choose to email these logs instead of attaching to the bug, please send them to wsl-gh-logs@microsoft.com with the number of the github issue in the subject, and in the message a link to your comment in the github issue and reply with '/emailed-logs'.

View similar issues

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it!

Open similar issues:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

SirLouen commented 2 months ago

Some logs

github-actions[bot] commented 2 months ago
Diagnostic information ``` .wslconfig found Custom kernel found: 'C:\Users\mcama\kernel\vmlinux' Detected appx version: 2.3.17.0 ```
SirLouen commented 2 months ago

After all the evening thrown to the bin, installing, uninstalling, and testing dozens of versions of WSL & Docker Desktop, I've finally discovered the issue:

For some stupid reason WSL 2.3.17.0 DOWNGRADES default Kernel version to 5.15.153.1, because WSL 2.3.14.0 has, by default Kernel 6.6.36.3-1. Why? Noone knows.

So basically, I downgraded to WSL 2.3.14.0 and now everything is working well again.

I'm going to leave this open, because I think that the big bug here is that WSL 2.3.17.0 is being shipped with a 5.15 Kernel

elsaco commented 2 months ago

@SirLouen the reason for switching back to kernel-5.15.153.1 is spelled in the release notes:

Revert Linux kernel to 5.15.153.1-2 while issues are being debugged

So, now you know!

SirLouen commented 2 months ago

@SirLouen the reason for switching back to kernel-5.15.153.1 is spelled in the release notes:

Revert Linux kernel to 5.15.153.1-2 while issues are being debugged

So, now you know!

I can't believe I read release notes for Docker and WSL-Kernels but not for WSL itself. A massive amount of time hitting my head with the wall just for this nuance.

Anyway there is a bigger issue on the Docker Desktop side, with the Kernel compilation system I need to see if they sort. Because it breaks despite having a custom WSL Kernel, theorically compliant.