Closed ccarlsonpb closed 8 months ago
I have the same problem here.
When running or debugging React/Dotnet with VsCode over WSL the program stops to work. VsCode display an Reconnecting modal and the command line over WSL freezes.
If I open a prompt (powershell) and run docker ps
, the command not respond until some automatic "restart" occours.
If I open the Task Manager, VMMEM consume a higth CPU and use all configured memory to it (6GB).
I canΒ΄t get the steps to reproduce too. :-(
I have similar issues. And it is very difficult to reproduce. It crashed my host (Windows) 3 times.
Anyway, this is just a comment here. Hopefully, this can give some clue that the support team can find the root cause.
Thanks very much to the team who make WSL2.
So, a week or two ago I tried this workaround - an entry in %USERPROFILE%\.wslconfig
[wsl2]
memory=8GB
processors=3
This is on my machine with 16GB RAM, 4 cores and it seems to have helped quite a bit. I think I haven't had the crashing issue since I made this change. To me it seems like WSL2 is too greedy by default and ends up starving the host of all available resources, which creates a deadlock and ends up killing WSL2 itself.
@ccarlsonpb Thank you for the info. I will try out your workaround.
If somebody is able to reproduce this, could you please run with the WSL debug console on? I'd be curious about what's happening in the log when WSL terminates.
Add this line to %userprofile%.wslconfig
[wsl2]
debugConsole=true
Note: this will make the VM boot slower so you'll want to disable this after you're done.
I can reproduce a similar behaviour with transferring encrypted and deduplicated data via borg to another computer via ssh. This reproduces termination without message while synchronizing the borg cache.. Where can I obtain the generated logs?
This issue has been automatically closed since it has not had any activity for the past year. If you're still experiencing this issue please re-file this as a new issue or feature request.
Thank you!
Environment
Windows build number: Win32NT 10.0.20170.0 Microsoft Windows NT 10.0.20170.0
Your Distribution version: Release: 18.04
Whether the issue is on WSL 2 and/or WSL 1: Linux version 4.19.104-microsoft-standard (oe-user@oe-host) (gcc version 8.2.0 (GCC)) #1 SMP Wed Feb 19 06:37:35 UTC 2020
Steps to reproduce
Originally filed as a vscode issue here https://github.com/microsoft/vscode/issues/106139, but seems like it's an issue with WSL itself. Basically, every couple of days or so, I will begin a project-wide search operation in vs code, and this will cause WSL to terminate. All of my open terminals will close, docker for windows will say that WSL has stopped, etc. Basically, vs code is the catalyst, but the entirety of WSL shuts down.
So far, I have only been able to trigger this crash by using the project search feature of vs code, but I can't intentionally reproduce the crash; Searching works fine for days at a time, but eventually I will begin a search and then WSL will crash.
Expected behavior
I'm expecting WSL not to terminate on its own.
Actual behavior
WSL randomly terminates.