WSL Freeze When Accessing Windows Drives
Windows Version
Microsoft Windows [Version 10.0.19044.2728]
WSL Version
1.1.3.0
Are you using WSL 1 or WSL 2?
- [X] WSL 2
- [ ] WSL 1
Kernel Version
5.15.90.1-microsoft-standard-WSL2
Distro Version
Archlinux
Other Software
tmux gcc cmake bash
Repro Steps
I attempted to run the Codon build on files located on the Windows drive (linked to the /home/ directory from the /mnt/c drive).
Expected Behavior
It doesn't freeze.
Actual Behavior
I've attempted this about 8 times, all with the same behavior. Some times have been through a podman container, others have been in a bare WSL terminal. The build gets to compiling anywhere from 1000 to 3030 files (out of 3292 files) when it freezes. At this point, I can open new WSL terminals in the same distro, and examine the WSL local files, but any attempt to look at the Windows native files (such as ls /mnt/c or cd /mnt/c) causes the terminal to hang.
In some cases, ls /mnt causes a hang, in others ls /mnt/c causes the hang.
Diagnostic Logs
WslLogs-2023-03-24_12-55-39.zip
These logs are from after the freeze is encountered, and I ran ls /mnt then ls /mnt/c which caused the hang to occur.
To follow up, running "wsl --shutdown" will allow new WSL distros to start with proper drive access. A reboot isn't necessary.
I have the same issue
Same issue even after reinstalling wsl2.
Same here, any updates?
Same here, Windows version: 10.0.19045.3693, WSL 2.0.9.0, Ubuntu 20.04.6 LTS, Kernel version: 5.15.133.1-1 Ubuntu terminal is frozen with command "cd /mnt/c". but when i open new terminal, it is still alive. But if type "cd /mnt/c", the terminal freeze. It means WSL2 is still alive, but lost access or hangs to specific drive. Only one drive which I run code is frozen after a period(2-30mins).
[Update] I switch from WSL2 to WSL1. It works for me. (I understand everyone can not change version, though..) Find distribution name, then set wsl version to 1.
wsl -l -v
wsl --set-version Ubuntu-20.04 1
Same issue even after reinstalling wsl2.
- Tried reinstalling wsl2 in windows10, working fine the first day. Start from second day, same issue presists. Tried multiple versions of wsl
- Wiped the system disk and did a fresh reinstall of Windows 11, working smoothly for the first week. Started again after the second week.
Switched to ubuntu...
Temporarily solution: Softlink the required windows drive directories to home directory of wsl seems a work around.
Also experiencing this issue for WSL2 on Windows 11 for Ubuntu 18.04.06 LTS.
@JingbiaoMei is there a guide you followed to softlink the windows drive? The closest answer I found online was https://stackoverflow.com/a/76181147
Same here on Windows 11. The softlink workaround didn't work for me
Also experiencing this issue for WSL2 on Windows 11 for Ubuntu 18.04.06 LTS.
@JingbiaoMei is there a guide you followed to softlink the windows drive? The closest answer I found online was https://stackoverflow.com/a/76181147
@nbopardi Sorry for the late reply. I used the ln -s command. This has been worked smoothly for me for over a month now, even when accessing millions of image files
For me, I found that I had enabled TPM in the BIOS but Windows did not recognize it. Then I turned off AMD CPU's PBO and after restarting, TPM was recognized. Then I updated the WSL2 version and I haven't had any issues with file system access since then.
The above content works for me at least, for reference only.
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!