New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
File explorer crashes when opening WSL folders in Windows 11 #7782
Comments
I wonder if this is related to an issue I'm seeing as well #7773 |
I think it is, I get your same problem when opening files using any windows software on wsl files (also this behaviour is kind of randomic, it works about 1/3 of the times) |
I'm experiencing this on Windows 11 for a week or two now as well, with the WSL Preview version. Seemingly randomly but mostly after a few hours of working, the WSL drive becomes completely incessible from Windows (only the WSL terminal still works). AFAIK only a reboot can resolve it, really annoying. |
I'm having trouble reproducing this locally. If somebody could help narrow down how things get to this state it would be very helpful. |
|
@benhillis: Opening a non-trivial project in Visual Studio from the WSL filesystem and then running the debugger is a trigger for me ~75% of the time. The build typically runs normally and then the debugger attach and symbol loading have a massive slow-down. After, just about any activity via the The last time it happened, I noticed the following, though I'm not sure if it has any significance:
Environment:
|
Same problem. Works 1 in 3 times. If crashes can only be fixed by reboot. |
This has happened to me as well. What worked for me was to do a The hang continues to happen, but I was able to launch |
Another thing to point out is that whenever you first start the wsl, file explorer (or vscode or 9p for that matter) works all the time (at least for me), these crashes only happens after a while. |
For me it's roughly the same, it seems mostly working in a PhpStorm project residing on the WSL drive just randomly causes this every few minutes. Also at that point the same behaviour as #7787 and #7371 occurs |
@jsquire - Could you enable 9p logging in your distro so I can see what's going on?
And share the log file after you repro? Thanks! |
Hello! Could you please provide more logs to help us better diagnose your issue? You can find instructions on how to attach logs here, please make sure to post the link to the Feedback Hub item in this chat so we can see it. Thank you! |
Happy to. Is it safe to assume that the EDIT: @benhillis: I'd appreciate your insight. |
It should be something like this in /etc/wsl.conf file: [fileServer]
enabled=true
logFile=/mnt/c/MyFiles/9p.log automount and fileServer are two different sections. |
It seems to only happen if you have installed WSL through Microsoft Store - https://www.microsoft.com/store/productId/9P9TQF7MRM4R. Until it's fixed, it's useless. I spent lot of time with reinstalling the Windows. In my case, IDE was also freezing as it couldn't access files, very annoying. |
can confirm, it's really annoying. I also have WSL installed both via apps and features (long time ago) and through the microsoft store. I can't risk uninstalling it (I don't want my files on WSL to be removed). |
I haven't lost anything, I just had to toggle WSL feature https://pureinfotech.com/uninstall-wsl2-windows-10/. But it's not smooth change, if I wouldn't have everything backed up, I wouldn't risk it either. |
I requested to document it some days ago here MicrosoftDocs/WSL#1365 (comment) |
As mentioned above simply uninstalling the WSL Preview app from the Store and letting it fallback to the WSL version supplied with Windows 11 has resolved this issue for me. |
@benhillis: I captured logs over several hang/reboot cycles and uploaded one via Feedback Hub as requested. It was logged as bug #37313951. Unfortunately, the logs showed nothing unusual - just accepted/connected/disconnected info messages. During the hangs, To attempt to unblock myself for now, I've shifted to the Win11 built-in WSL feature and uninstalled the preview app as has been suggested by others. |
Looks like uninstalling the app from the Microsoft store also solved the issue for me. |
I've got this happening on my 'normal' Windows 11 machine also can confirm same behaviour on a new Windows 11 insiders build. Installed Windows Subsystem for Linux Preview from the store and had the same issues with I thought this was only a Ubuntu thing as using a Fedora distro I wasn't having any issues and I can have the issue happen on Ubuntu which makes it unusable I can then switch over to Fedora and use the file explorer. |
Uninstalling reinstall didn't resolve this for me. I even tried removing the Windows store app and going via the usual method with that issue persisting. I'm on OS build 22509.1011. I haven't done that same trouble shooting on my 'normal' release Win 11 but the same issue with I started using Fedora and so far haven't had the same issue on that distribution, is it an Ubuntu specific thing? |
Scratch that! Still happens with my Fedora instance |
The workaround is to remove the WSL version installed from the store as explained here: |
If you look at the |
Thanks @marco-pm, unfortunately I don't see anything in the logs that would explain this issue. Besides the Feedback hub logs, the 9p verbose logs would be really useful here. Quoting @Biswa96, the way to enable the logs is to add:
to Then share the resulting |
Done.
After the issue arose, the logging simply stopped. No errors, no more entries. |
Thanks @marco-pm. Can you share both the 9p logs and the rest of the wsl logs from the same repro ? |
This may be weirdly related to the 500 series NVIDIA driver. I was having this issue (and various other ones that stem from it) consistently and daily. I recently downgraded to 472.12 and cannot duplicate the problem any longer. Worth checking if you have an NVIDIA card. |
I don't think the problem is GPU related, I've got an AMD card (RX 580). Maybe you have problem replicating it because this bug is really unpredictable, I also have difficulties replicating this bug consistently. |
Like others, I'm struggling a bit to reproduce the bug and collect the logs. |
Thanks everybody for your help so far, I'm actively working on getting a local repro. |
Thanks @benhillis, I have the same problem here. And it is not only the file explorer. It's generally if you're trying to execute an Windows binary from WSL. Could be Explorer.exe could be Notepad.exe, it really doesn't matter. It keeps crashing and only a reboot is capable of getting back to normal. The only thing that really helped is uninstalling the Store version. This issue is definitely somehow connected to the Store version as the issues began after I installed it and completely went away after I uninstalled the store version. |
Since reverting to the bundled Windows feature version, I've noticed that the hang behavior does not present, but accessing the WSL filesystem from Windows does seem to degrade over time. This was also an issue in the Windows Store version, but I had assumed it was related to the hang. In my scenario, I've got source code in the WSL file system that I'm editing with Visual Studio. When I first start working in a directory, running and debugging takes place with the same general performance as doing so for items in the Windows filesystem. Over time, it takes several (~5-10) minutes for Visual Studio to fully launch the test host and attach the debugger. If I nuke the directory, recreate, and clone the repository, performance is normal for a bit and then degrades again. To be fair, I cannot rule out Visual Studio 2022 and/or Windows 11 as the culprit here; I did not have these issues with the same scenario using Win10 / VS2019 / and the bundled WSL - they started after a clean format + rebuild with Win11. To date, I have not yet gotten around to reinstalling VS2019 to see if the experience is equivalent. |
I don't know if this may help identify the cause and if others are experiencing the same: when the problem occurs, not only the WSL filesystem becomes inaccessible from File Explorer, but also:
|
Having the same issue. My theory is that this might be caused by filesystem activity inside WSL while using the same files from windows. e.g. having filesystem watches for continuous rebuilds of code inside WSL while files are open in the IDE on windows, or doing git commands from commandline while IDE is open. |
Maybe I found a good repro.
|
May be you are right, I was having vscode open and used git commands. |
Sadly I am experiencing that issue quite often. After a number of opening and closing files using vscode from WSL, the interop between Windows and WSL fails. At this time the Ubuntu 20.04 distro, installed from Microsoft Store, can't be accessed from Windows. However, it can access /mnt/c/ mount. Obviously, vscode is not working in that distro. However, this is quite interesting, I also have the latest daily distro of Ubuntu 22.04 for WSL. I don't have any problem there. At this time, from Windows PowerShell I can do:
But when doing this, powershell hangs:
Same behavior happens when trying to access those locations with explorer.exe
|
This issue is happening a lot with me since December. I'm using Windows 11. Today I received an automatic
|
Sadly I am experiencing this issue quite often too. |
Same to report here. I'd been about an hour into things after after install tonight before it wasn;t happy. I have not been able to truly use it since. I was able to move a couple files now whenever I click on anything to do with Linux I crash and need to force restart. |
EDIT: The issue also seems to happen with Ubuntu 22.04. So my initial comment was wrong I was having exactly the same problems with the WSL2 store version and Ubuntu 21.10. The problem did not get fixed even after multiple clean installs of Win11. However, after another recent clean install, I installed a daily build for Ubuntu 22.04 as suggested by @okibcn and do not have the problems anymore. |
Well, I wasn´t saying that 22.04 would be error-free. I was just illustrating the fact that when the error happens, it affects only one distro, not all of them. If you want to get rid of the issue so far the only workaround is to uninstall the WSL Preview from the MS Store and continue using the older WSL2 installed as part of Windows Feature set. |
I'm also having this issue with WSL1. If I start WSL, Ubuntu 22.04 it dies with
I've tried to restart WSL, but it fails:
|
I two months ago did try excluding causes by trying to reproduce the issue on Alpine, and had it for both the non-store and the store preview version. |
Thanks a lot to everyone who posted logs and helped with this investigation. We have identified the root cause of this issue in #7883 (see this comment for the detailed explanation). Closing this as duplicate. |
If you're suing Avira (or potentially another anti-virus software) This fixed the issue for me. So we don't have to blame MS, we have to blame the anti virus guys... |
Version
Windows 11 [10.0.22000.348]
WSL Version
Kernel Version
5.10.74.3
Distro Version
Ubuntu 20.04
Other Software
wsl --version
Repro Steps
Just opening the "Ubuntu" folder in File Explorer.
Expected Behavior
Should open the folder.
Actual Behavior
1 out of 3 times File Explorer just become unresponsible and crashes, using the WSL terminal in the meantime works without any issue.
Diagnostic Logs
No response
The text was updated successfully, but these errors were encountered: