microsoft / WSL

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

Intermittent WSL2 Filesystem Lag #11269

Open jayden-arrai opened 6 months ago

jayden-arrai commented 6 months ago

Windows Version

Version 10.0.22631.3155 (Windows 11 Pro - Version 23H2)

WSL Version

2.0.14.0

Are you using WSL 1 or WSL 2?

Kernel Version

5.15.133.1-1

Distro Version

Fedora Linux 39

Other Software

PyCharm 2024.1 EAP (Professional Edition) - Build #PY-241.14024.28, built on February 29, 2024 Also occurred on PyCharm 2023.3 Also noticed the issue once in Windows Explorer.

Repro Steps

I haven't discovered a way to reproduce the issue, since it seems to randomly happen and then respond after an unknown amount of time, but probably less than a minute.

Expected Behavior

Shorter lag, or no lag.

Actual Behavior

Occasionally while I'm working in PyCharm the WSL lags, and then PyCharm must have a timeout that triggers, and it closes all files open through the WSL. If PyCharm didn't close the files it wouldn't be an issue, but unsaved work is lost when this happens. Pycharm is probably not the cause, it is just the way I notice the issue. During one of the times it was lagging, I opened windows explorer and surfed to the Linux, and windows explorer had the busy loading animation for the top left icon. If it is open and I'm in a folder in the Linux and switch to another folder, then the file listing pane gets a busy animation icon.

Diagnostic Logs

Used collect-wsl-logs.ps1 to gather these logs, but they're 60 MB, so I couldn't attach them here. https://files.arrai.com/windows_wsl_logs_jayden/WslLogs-2024-03-07_15-13-49.zip

github-actions[bot] commented 6 months ago

Hi I'm an AI powered bot that finds similar issues based off the issue title.

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. Thank you!

Open similar issues:

Closed similar issues:

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

jayden-arrai commented 6 months ago

I haven't noticed any slowing down issues. The wsl seems to be fine after it has recovered from the lag.

maxboone commented 6 months ago

@jayden-arrai chiming in as I'm following some issues on the topic w.r.t. stalling WSL on ARM64, do you have an ARM64 device or is it x86_64?

jayden-arrai commented 6 months ago

x86_64

jayden-arrai commented 6 months ago

I should also mention that I have a similar system to 2 other guys at work. One isn't doing much work in the WSL at the moment. If it is happening on the other guys machine, it hasn't lagged for a long enough time for Pycharm to consider the files on the WSL to have gone away, and close them.

As per an idea from our Sys Admin, I disabled antivirus, but that didn't seem to help, so it is re-enabled.

trashg0blin commented 5 months ago

I've also experienced similar issues where the source file can be any random folder or file from a drvfs mounted folder/drive.

OneBlue commented 5 months ago

@pmartincic: This looks like the p9rdr issue you've been investigating.

jayden-arrai commented 5 months ago

Updating to WSL version: 2.1.5.0 did not solve this issue.

Omega359 commented 4 months ago

I am experiencing this as well, however it only started happening when IT forced a windows 10 -> windows 11 upgrade onto my laptop. From what I can see the fs pauses are usually between 20-30 seconds and during that time any app accessing files in the ubuntu 22.04 essentially freeze including cargo, ls, etc. Kernel is 5.15.146.1-microsoft-standard-WSL2