WSL icon indicating copy to clipboard operation
WSL copied to clipboard

WSL Freezes Randomly

Open Rskut opened this issue 2 years ago • 71 comments

Windows Version

Microsoft Windows [Version 10.0.19045.3324]

WSL Version

1.2.5.0

Are you using WSL 1 or WSL 2?

  • [X] WSL 2
  • [ ] WSL 1

Kernel Version

Linux version 5.15.90.1-microsoft-standard-WSL2

Distro Version

Ubuntu 20.04.6 LTS (GNU/Linux 5.15.90.1-microsoft-standard-WSL2 x86_64)

Other Software

PhpStorm 2023.2 Build #PS-232.8660.205, built on July 28, 2023 Rancher Desktop v. 1.7.0 and Kubernetes 1.25.6

Repro Steps

None, it just freeze randomly, sometimes after fresh reboot on initial start (does not start at all), sometimes after 7 hours working fine

Expected Behavior

No freeze

Actual Behavior

WSL freezes, so I have to shut it down with "wsl.exe --shutdown" and reboot it with "wsl -d Ubuntu" after it started up it works but it can crash at any time again.

Diagnostic Logs

WslLogs-2023-08-10_13-13-37.zip

Rskut avatar Aug 10 '23 11:08 Rskut

same here, wsl2 takes ages to start. some times become accessible after 2 hrs

abdiwahab88 avatar Aug 11 '23 09:08 abdiwahab88

I also get this. Already running commands just pauses. Then I can't start new commands.

It tends to freeze for me during heavy load. I have a 16 core/32 thread system and for me it generally freezes when I run the Rust compiler test suite.

  1. Clone https://github.com/rust-lang/rust in WSL 2 Ubuntu.
  2. Run ./x test tests/ui

This puts heavy load on all 32 CPU threads. Sometimes WSL freezes in the middle for running the tests. Doing wsl.exe --shutdown and starting again resolves the issue.

I have used WSL 2 for many months. The freezes are a relatively new problem, first seen a few weeks back or so.

Enselic avatar Aug 12 '23 03:08 Enselic

WSL version 1.3.15.0 does not fix the issue.

Rskut avatar Aug 14 '23 07:08 Rskut

Any updates on this issue?. Are the logs helpful or not?

Rskut avatar Aug 30 '23 09:08 Rskut

After updating to the latest version of wsl I have not seen this problem. Not sure if it is luck or if the issue is fixed. I will report here if I see it again.

Enselic avatar Aug 30 '23 16:08 Enselic

I got the freeze again while running the Rust compiler test suite (see above). This is my current WSL version:

PS C:\Users\ensel> wsl --version
WSL-version: 1.2.5.0
Kernelversion: 5.15.90.1
WSLg-version: 1.0.51
MSRDC-version: 1.2.3770
Direct3D-version: 1.608.2-61064218
DXCore-version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows-version: 10.0.22621.2215

Enselic avatar Sep 03 '23 06:09 Enselic

I have the same issue ...

ozdang avatar Sep 14 '23 00:09 ozdang

Doing wsl.exe --shutdown and starting again resolves the issue.

Personally even this command is frozen and I have to kill the process, I'm not sure that we have the same issue behind our freezes

BenoitAnastay avatar Sep 15 '23 18:09 BenoitAnastay

Doing wsl.exe --shutdown and starting again resolves the issue.

Personally even this command is frozen and I have to kill the process, I'm not sure that we have the same issue behind our freezes

Same to me. Frozen completely

Rivgad avatar Sep 16 '23 14:09 Rivgad

Same here. I typically reboot my computer to resolve the problem for a day or two : (

tom-papatheodore avatar Sep 21 '23 13:09 tom-papatheodore

same here, it happens too often even with low demand processes, or nothing running in the background

theHammi01 avatar Oct 07 '23 23:10 theHammi01

same issue here, this is relatively new issue. Had not faced this earlier. Even the wsl --shutdown command froze.

had to do taskkill /f /im wslservice.exe in order to quite the vmmen process.

0xatulpatil avatar Oct 08 '23 04:10 0xatulpatil

Same issue here, definitely makes me want to buy a mac

cxammar avatar Oct 10 '23 15:10 cxammar

I have this issue as well. It tends to happen when compiling lots of code (C++, in my case).

JesseTG avatar Oct 11 '23 01:10 JesseTG

I got this issue often if i am using vim.

xXTraceXx avatar Oct 18 '23 08:10 xXTraceXx

Happens to me also, probably especially when under heavy load...

I run simulations for several hours only to notice that WSL has freezed after 10 hours of calculations...

WSL-Version: 1.2.5.0
Kernelversion: 5.15.90.1
WSLg-Version: 1.0.51
MSRDC-Version: 1.2.3770
Direct3D-Version: 1.608.2-61064218
DXCore-Version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows-Version: 10.0.19045.3448

Distributor ID: Ubuntu
Description:    Ubuntu 20.04.6 LTS
Release:        20.04
Codename:       focal

christianhauschel avatar Oct 18 '23 13:10 christianhauschel

Same here, when compiling big project. wsl --shutdown helps. Started noticing after our company moved to Windows Defender instead of Symantec AV.

zoliweiss avatar Nov 05 '23 16:11 zoliweiss

Same here when building with make -jN. Even it gets frozen only with -j3 (I have +16 cores).

WSL version: 1.2.5.0
Kernel version: 5.15.90.1
WSLg version: 1.0.51
MSRDC version: 1.2.3770
Direct3D version: 1.608.2-61064218
DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows version: 10.0.19045.3636

polhenarejos avatar Nov 08 '23 10:11 polhenarejos

Same here - WSL hangs intermittently, even under light loads.

WSL version: 1.2.5.0
Kernel version: 5.15.90.1
WSLg version: 1.0.51
MSRDC version: 1.2.3770
Direct3D version: 1.608.2-61064218
DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows version: 10.0.19045.2846

UPDATE: my issue is resolved since my WSL auto-updated to version 2.X.

WSL version: 2.0.9.0
Kernel version: 5.15.133.1-1
WSLg version: 1.0.59
MSRDC version: 1.2.4677
Direct3D version: 1.611.1-81528511
DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows version: 10.0.19045.2846

pstaunton avatar Nov 10 '23 13:11 pstaunton

The same with building java projects.

WSL version: 2.0.9.0
Kernel version: 5.15.133.1-1
WSLg version: 1.0.59
MSRDC version: 1.2.4677
Direct3D version: 1.611.1-81528511
DXCore versio: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows version: 10.0.19045.3570

KonstantinZhukov1992 avatar Nov 14 '23 14:11 KonstantinZhukov1992

Same here, noticing it when compiling a lot of code, great job ignoring this issue!

WSL-Version: 2.0.9.0
Kernelversion: 5.15.133.1-1
WSLg-Version: 1.0.59
MSRDC-Version: 1.2.4677
Direct3D-Version: 1.611.1-81528511
DXCore-Version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows-Version: 10.0.22621.2715

pipelinedestroyer avatar Nov 15 '23 16:11 pipelinedestroyer

Me too

WSL-Version: 2.0.9.0 Kernelversion: 5.15.133.1-1 WSLg-Version: 1.0.59 MSRDC-Version: 1.2.4677 Direct3D-Version: 1.611.1-81528511 DXCore-Version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp Windows-Version: 10.0.22631.2715

lity avatar Nov 18 '23 01:11 lity

Similar issue. Usually happens when running an Alpine based devcontainer inside VSCode for a while, couple of hours usually. WSL version: 2.0.9.0 Kernel version: 5.15.133.1-1 WSLg version: 1.0.59 MSRDC version: 1.2.4677 Direct3D version: 1.611.1-81528511 DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp Windows version: 10.0.22631.2715

WslLogs-2023-11-20_21-59-42.zip

rimmer avatar Nov 20 '23 21:11 rimmer

Same issue when build databend

WSL version: 2.0.9.0 Kernel version: 5.15.133.1-1 WSLg version: 1.0.59 MSRDC version: 1.2.4677 Direct3D version: 1.611.1-81528511 DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp Windows version: 10.0.22621.2715

ariesdevil avatar Nov 22 '23 13:11 ariesdevil

I have the same issue

OliverKersting avatar Nov 24 '23 10:11 OliverKersting

I've found the solution. In my case the reason was that the directory with the code was on windows disk. I've copied on linux filesystem and now it works fine

KonstantinZhukov1992 avatar Nov 24 '23 13:11 KonstantinZhukov1992

I get this a lot recently when running my Linux unit test scripts for GCC and Clang.

WSL version: 2.0.9.0 Kernel version: 5.15.133.1-1 WSLg version: 1.0.59 MSRDC version: 1.2.4677 Direct3D version: 1.611.1-81528511 DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp Windows version: 10.0.19045.3693

jwellbelove avatar Dec 04 '23 09:12 jwellbelove

I have exactly same problem, especially when running vscode attached to the WSL instance. wsl --shutdown does NOT help I need to do this: taskkill /f /im wslservice.exe as administrator

adibacco avatar Dec 04 '23 10:12 adibacco

Looks like the common denominator in all cases is the Windows FS access.

zoliweiss avatar Dec 04 '23 11:12 zoliweiss

I hope that Microsoft finds a solution because this bug is around since three/four months and it is very annoying

adibacco avatar Dec 04 '23 11:12 adibacco