Skip to content
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

WSL 2 uninstalled itself #6059

Closed
Polda18 opened this issue Oct 8, 2020 · 15 comments
Closed

WSL 2 uninstalled itself #6059

Polda18 opened this issue Oct 8, 2020 · 15 comments
Labels
failure-to-launch failure to launch

Comments

@Polda18
Copy link

Polda18 commented Oct 8, 2020

Environment

Windows build number: Microsoft Windows [Version 10.0.20226.1000]
Your Distribution version: Linux Ubuntu (cannot post exact version)
Whether the issue is on WSL 2 and/or WSL 1: WSL 2 (as I installed it after I upgraded to Windows Insider)

Steps to reproduce

Well, I installed some updates and while I didn't use the WSL much, I definitely was able to at least see that Linux was still installed like just few days ago (although, I was unable to launch the Linux terminal inside Windows Terminal app). Now I tried it again to see that Linux has disappeared and was replaced with Microsoft Azure Cloud Shell (that thing definitely wasn't there before). I still can run WSL directly, but it doesn't do anything. I think I have lost my Ubuntu installation somehow.

WSL logs:
None, or I cannot retrieve them somehow (or don't know about them).

Expected behavior

Start up Linux shell.

Actual behavior

Does nothing.

@licanhua
Copy link
Collaborator

licanhua commented Oct 8, 2020

what's the output of wsl -l -v.
1, if you see Ubuntu is in the list, then you can try to install small distro like Debian to make sure WSL 2 is fine on your machine.
2. if you didn't see Ubuntu, backup the folder(my distro is Ubuntu20.04) like C:\Users\your\AppData\Local\Packages\CanonicalGroupLimited.Ubuntu20.04onWindows_79rhkp1fndgsc\LocalState, then install the distro again, then recover the LocalState.

@Polda18
Copy link
Author

Polda18 commented Oct 8, 2020

Calling wsl just hangs the process. So I literally have no idea.
image
Might as well need to reinstall WSL with the Ubuntu distro all together.

@licanhua
Copy link
Collaborator

licanhua commented Oct 8, 2020

We don't know what's the problem until collect-wsl-logs

@Polda18
Copy link
Author

Polda18 commented Oct 9, 2020

I accidentally sent bug report in wrong category. The thing is that I have Windows in Czech language, that makes it more difficult to pick the correct category sometimes. Now I have to wait until data collection is available again :(

@Polda18
Copy link
Author

Polda18 commented Oct 9, 2020

Okay, sent.

@licanhua
Copy link
Collaborator

licanhua commented Oct 9, 2020

I saw the two logs you submitted, but I didn't find anything interesting in WSL.
There is no crash in the logs, so there is no issue I know may link to your issue.

You can first check if lxssmanager service is running, if not, start it.
if yes, try to restart it. I would expect it hangs there.

If it hangs, I don't know what your problem is, so I just list some generic solutions:

  1. limited resources on cpu, disk and memory. You can check it from task manager and likely you may hit problem if any of problem is too busy
  2. Hyper-V problem introduced by Windows update. Sometime disable Virtual machine platform, reboot, then re-enable it may helps.
  3. WSL itself. disable Windows subsystem for Linux feature, then enable it.
  4. Hyper-V conflicts with VirtualBox or VMWare. I don't have experience on it, but I saw several cases user resolved WSL problem after they uninstalled VirtualBox/VMWare.

@Polda18
Copy link
Author

Polda18 commented Oct 9, 2020

Well, uninstalling VMware isn't and option for me since I use virtual machines with various OS, including Windows 98 and MS-DOS v6.22, and I actually have development version of VMware that supports Hyper-V.

The first 3 may actually help, so I'll try these out tomorrow.

@Polda18
Copy link
Author

Polda18 commented Oct 15, 2020

So I tried number 1 and 3. From number 1 I cannot clearly say that that's the issue since CPU doesn't seem to be busy with wsl running. It just stops midway and hangs. Number 3 - tried to disable it and reenable it again and same issue.

Well, here's one thing: If I run wsl --set-default-version 2, it actually performs the action without any issue:

PS C:\Users\Marek Poláček> wsl --set-default-version 2
For information on key differences with WSL 2 please visit https://aka.ms/wsl2

Anything else just hangs the process. Didn't try out the number 4 for obvious reason that I need VMware for other virtual machines (I have Windows 98, MS-DOS and Windows 2000 virtual machine with VMware), and also didn't try out number 2 because I can't remember how can I do that :(

@licanhua
Copy link
Collaborator

Try restart lxssmanager first from task manager.

image

number 2:
turn off feature Virtual Machine Platform, reboot the machine, turn on it, reboot the machine.

hang is because of lxssmanager, but --set-default-version doesn't use lxss service.

@Polda18
Copy link
Author

Polda18 commented Oct 15, 2020

Well, now it hangs on stopping 🤔

@Polda18
Copy link
Author

Polda18 commented Oct 15, 2020

I have found other issues on the service hanging on stopping as well (#1086 and #2933) and it does seem to be a bug in latest Insider Build snapshot. Still not fixed though... I don't know how can I fix it. As a workaround, I'll have to use Ubuntu virtual machine I installed in VMware until this is fixed.

@Polda18
Copy link
Author

Polda18 commented Oct 15, 2020

I might have found the culprit:
image

It seems that BOINC client I installed to help with projects development is holding the lxss processes.

@jsteenri
Copy link

Any advice on whether suggestion 3 in this comment is safe with respect to existing data in WSL?

Also #4144 may be interest to those following this thread.

@johnaoss
Copy link

Had this too, issue seemingly resolved itself after several reboots over the course of a week or so.

Copy link
Contributor

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
failure-to-launch failure to launch
Projects
None yet
Development

No branches or pull requests

5 participants