microsoft / WSL

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

WSL complete freeze #8824

Closed schiorean closed 2 years ago

schiorean commented 2 years ago

Version

Microsoft Windows [Version 10.0.22000.918]

WSL Version

Kernel Version

5.15.57.1

Distro Version

Ubuntu 22.04

Other Software

PhpStorm 2022.2.1

Repro Steps

  1. Open a large project in PhpStorm (starts indexing project fileds...)
  2. Open another large project in PhpStorm (starts indexing project fileds...)
  3. Keep switching between large projects and sooner or later WSL is completely frozen while PhpStorm is indexing files

Expected Behavior

PhpStorm finishes files indexing and WSL is usable.

Actual Behavior

WSL freezes completely including any wsl.exe command, so even wsl.exe --shutdown will hang forever. The only way to restart WSL is by doing a computer restart.

Diagnostic Logs

Uploading via Feedback Hub.

XhmikosR commented 2 years ago

I uninstalled any WSL Windows updates, removed my distro, disabled Virtual Machine Platform and WSL features and then installed everything again including the latest WSL from the store. I also gave WSL 6GB of RAM instead of 4GB that I was using in .wslconfig. Now it seems I'm not hitting the issue anymore, but unsure which thing exactly has fixed it.

GeksterOne commented 1 year ago

I have the same with WSL version: 1.0.3.0 Kernel version: 5.15.79.1 WSLg version: 1.0.47 MSRDC version: 1.2.3575 Direct3D version: 1.606.4 DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp Windows version: 10.0.19045.2364

Happens mostly in Pychar,/Intellij. Sometimes in terminal

Considering to stop using wsl in favour of Linux itsef. If it haven't fixed after an year seems Microsoft spoiled technology and doesn't know what to do.

alonbl commented 1 year ago

On Wed, Dec 28, 2022 at 11:37 AM GeksterOne @.***> wrote:

Windows version: 10.0.19045.2364

I also experienced this in the past, now I have Windows version: 10.0.22621.963 which is working properly, can you please try to update and see if it helps?

Message ID: @.***>

GeksterOne commented 1 year ago

Added this. It helped in case where Pychar worked with files stored in normal file system using python enterpreter from WSL. But didn;t help for Pycharm with projects stored in WSL file system. Product still as raw as meat in my fridge.

achs0 commented 1 year ago

Happens for me, too. WSL freezes completly while consuming 100% CPU. Using Docker Desktop with a local k8s in WSL, which is more in standby because i am currently testing stuff in k8s.

WSL-Version: 1.0.3.0
Kernelversion: 5.15.79.1
WSLg-Version: 1.0.47
MSRDC-Version: 1.2.3575
Direct3D-Version: 1.606.4
DXCore-Version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows Version: 10.0.19045.2486

Processor   AMD Ryzen 9 5900X 12-Core Processor, 3701 MHz
RAM                64 GB

What only helps for me is to kill WSL in Task-Manager and start everything up again. It's annoying.

lawndoc commented 1 year ago

Happens for me, too. WSL freezes completly while consuming 100% CPU.

Same problem, same versions for everything. It looks like our problem is being tracked over here

funduck commented 1 year ago

Windows 11 Dell XPS 9310 WSL version: 1.0.3.0 Kernel version: 5.15.79.1 WSLg version: 1.0.47 MSRDC version: 1.2.3575 Direct3D version: 1.606.4 DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp Windows version: 10.0.22621.1105

I get freezes every day but cannot tell what exactly causes them. I work in WSL in VScode, so I catch freezes always there, not in windows apps. I do not use docker. I tried to collect logs but not sure if there is anything useful since system just freezes and I can't finalize the script for logs. https://drive.google.com/file/d/1ooPJDSywR-ogUjRR9_k6CIqACKIpgMsq/view?usp=sharing

mungojam commented 1 year ago

see https://github.com/microsoft/WSL/issues/9454#issuecomment-1384062403 for the brute force command to shutdown WSL. Before that I always had to reboot

funduck commented 1 year ago

The problem is that whole Windows11 is frozen and I can't do anything except reboot hardware by holding power button for 10 seconds.

samd1993 commented 1 year ago

wsl.exe --shutdown works for me but I am unable to run anything for a long time on this. I wonder if people experiencing this are utilizing multiple cores? Seems to happen to me when I run a CPU intensive program (CPU usage going to 100%)

GeksterOne commented 1 year ago

After almost half a year since Wsl stopped working and lack of reaction from Microsoft side I think it time to state that Wsl project is dead. It time to move on towards linux/mac systems for development. We stopped using Windows/wsl in our projects

samd1993 commented 1 year ago

After almost half a year since Wsl stopped working and lack of reaction from Microsoft side I think it time to state that Wsl project is dead. It time to move on towards linux/mac systems for development. We stopped using Windows/wsl in our projects

Does using Ubuntu on Windows 10 count as this, or did you switch to actual linux machines

GeksterOne commented 1 year ago

mostly macs.

сб, 25 мар. 2023 г., 18:10 Samuel Degregori @.***>:

After almost half a year since Wsl stopped working and lack of reaction from Microsoft side I think it time to state that Wsl project is dead. It time to move on towards linux/mac systems for development. We stopped using Windows/wsl in our projects

Does using Ubuntu on Windows 10 count as this, or did you switch to actual linux machines

— Reply to this email directly, view it on GitHub https://github.com/microsoft/WSL/issues/8824#issuecomment-1483847398, or unsubscribe https://github.com/notifications/unsubscribe-auth/AV6SSTEDYFLTW5SEJRBLJG3W54DE7ANCNFSM6AAAAAAQLMBMSA . You are receiving this because you commented.Message ID: @.***>

schiorean commented 1 year ago

I am the original reporter of this issue and it has been fixed for a while already. WSL is not dead at all, am using it daily at my day job. Your problem is a different problem, please open a new issue.

jacksimpsoncartesian commented 1 year ago

I'm still getting this issue happen to me - I've wiped and reinstalled Windows 3 times, had Dell replace hardware like the battery and hard drive. Issue only happens after I've installed WSL, and then it occurs multiple times a day.

lawndoc commented 1 year ago

Hey all, I have had this problem for well over a year and I finally solved it for myself. For me the bug was when WSL generates the /etc/hosts file inside of the Linux subsystem. The hosts file generator appended a bad control character of some kind after the line that contained my hostname. Removing the character wasn't enough because WSL would regenerate the file, so I had to create /etc/wsl.conf and add

[network]
generateHosts=false

Then removing the bad character fixed it and WSL works as expected.

I don't have this issue on my home computer, so part of me wonders if this issue happens only on domain-joined systems when the hostname line includes a domain computer name. I have no evidence to back this up of course, but I'd be curious to hear from anyone else who this helps whether or not the system with the issue was domain-joined.

befuddled9 commented 1 year ago

This happens to me as well when I have my laptop sleep with an SSH session. I would think that the session would just timeout/die but it hangs.

Appla commented 11 months ago

After upgrading to https://github.com/microsoft/WSL/releases/tag/2.0.12 the issue disappeared

vlinx commented 11 months ago

try

wsl --update --pre-release

xz-viewray commented 10 months ago

Just updated to wsl 2.0.14. Will see if the issue has been fixed.