-
Notifications
You must be signed in to change notification settings - Fork 822
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
WSL2 (Ubuntu) has partially deleted itself twice #8876
Comments
Any thoughts on this? Any steps or data I should provide for debugging? |
This just happened rigth now to me. Same WSL2 on VSCode, just went for a coffee and when I was back, there was no Ubuntu. Does anyone know why is this happening?? |
I recovered the data with this method: https://superuser.com/questions/1720133/wsl-ubuntu-files-recovery. |
Yea, I find it a bit frustrating this issue was never addressed. I would have been happy to try and debug it with suggestions on what data to provide or things to try. This greatly soured my use of WSL, which I still use for my personal use cases (and luckily have not encountered this there), but this issue completely blocked me from using it on my work computer. The Ubuntu WSL installation simply would not keep and would eventually just up and partially delete itself without warning. This occurred over several complete uninstalls and reinstalls. |
Tagging top contributors for FYI: @craigloewen-msft @OneBlue @jackchammons @benhillis This was never addressed, but I don't have the ability nor inclination to help debug this anymore, so I am closing this issue. However, it should be noted that it undoubtedly still exists unless something specifically addressed it. I stopped recommending WSL as a solution at work, although I do still use it time to time for personal use, and I have luckily not encountered this there, yet. |
Oh I faced this issue once and am currently having it again. The last time, I had to uninstall and re-install wsl and ubuntu. |
Version
Microsoft Windows [Version 10.0.19044.2075]
WSL Version
Kernel Version
5.10.102.1
Distro Version
Ubuntu 22.04
Other Software
The crash/deletion of Ubuntu in WSL2 has happened to occur while using Visual Studio Code 1.71.2 with Remote - WSL v0.66.3. I do not know if this had any effect.
Repro Steps
I do not have any specifically other than "use WSL2 with Ubuntu" on my machine. Yesterday, when using VS Code to work on Code, suddenly the connection to WSL dropped and then terminated all sessions in open Windows Terminal windows. When trying to re-open Ubuntu via
wsl
orubuntu
in PowerShell in Windows Terminal, it just hung with no output and eventually (after several minutes) output a single line about WSL terminating. (I unfortunately don't have a direct copy of this message.) After a reboot of my machine, I was eventually able to get Ubuntu to load up, but several settings and files were missing and/or wrong. For example,~/.bashrc
had suddenly reverted back to some default state, removing everything I had added to it (and most definitely had saved). So I uninstalled Ubuntu and did a completely fresh install from the Windows Store.Today, I had the exact same thing happen to me. I was just using WSL in VS Code, and then suddenly it disconnected. Again it would not load at all until after a reboot and then several minutes. This time, I noticed that basically the entire system had been reset. My
~/.bashrc
file was completely reset, everything in~/
gone, including my GitHub repositories and things in~/.local
.What's weird is that this seemed to happen at almost the same time, which may of course be total coincidence. Honestly, I am unlikely to come across this again unless a specific bug is tracked down because I cannot justify using WSL with this behavior. I've lost code two days in a row for my job. I am happy to help debug this and run any command. I have used WSL rather heavily on other machines, so I'm not sure what's going on.
After Ubuntu/WSL crashes, the screen I get when trying to open up the Ubuntu app (console window) looks like:
It remains like that.
Expected Behavior
Ubuntu/WSL should never crash, and if it does, it should not delete and/or reset files.
Actual Behavior
The system seems to reset itself, as far as the
~/
directory is concerned. It seems that packages I installed withapt-get
remain, but all of my files and settings, including my GitHub repositories and SSH keys are deleted.Diagnostic Logs
I am willing to run whatever logs may be necessary to help debug this, so just let me know.
The text was updated successfully, but these errors were encountered: