-
Notifications
You must be signed in to change notification settings - Fork 852
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 - "The Windows Subsystem for Linux instance has terminated." #5110
Comments
I have the same problem. My Ubuntu distro stopped working, If I convert it to WSL1 it starts working, but when I move it back to wls 2, I can't start it again. EDIT: I founded what caused the problem in my distro. I have mounted folder which require "sshfs" and is in a VPN network. I couldn't start Ubuntu because my VPN wasn't started. |
@martinfojtik Thank you so much, Got the exact same issue, but I didn't thoughts about the mounted folder through VPN. |
wsl command was failing for me, but after ejecting my external HD it worked fine and WSL has been started. |
Similarly here.
I think it might be due to changes to Log capture does not provide any additional information:
→ Event Viewer info is barren. |
same here, i think its my fstab, but no way to edit it without starting wsl.. bit of a catch 22.. |
Had to convert back to WSL 1, edit the fstab, then convert again to WSL 2. |
how did you manage to do this, having the same issue here. WSL 2 sounded very promising with the performance dreams but I don't know if all this stress is worth it |
oh god. |
i mean you are running an insider preview, this is bound to happen. Wait until actual release and it'll probably be buttery smooth |
wsl --set-version Ubuntu-18.04 1
# edit fstab
wsl --set-version Ubuntu-18.04 2 where Fun fact: all the mounts in the fstab work if I execute them after the machine is up (
Yeah, debugging functionality in WSL still needs to improve. But at least I can FUSE mount now in WSL 2 which completes the last of my requirements for development on WSL. |
After I Updated the WSL 2 Linux kernel, the problem fixed. Notice, Need to download and install the latest package on https://docs.microsoft.com/en-us/windows/wsl/wsl2-kernel. |
Still facing this issue |
This is becoming really annoying. 😢 I get this error every time I turn on the PC and open the WSL console (Ubuntu-18.04). |
Facing the same issue when using WSL 2 with Docker Desktop |
I've seen several issues that seem similar to this and to me the most frustrating things are: I've now had this happen to me twice where I had a great working wsl setup then all of a sudden it just stopped working with this same error. I can export it and re-import it and the same thing happens (this leads me to believe it's some sort of state in the file system but I have no idea how to track down what saved state to modify in the exported tar file to get it to work after re-import). The second time I should have known better than to mess with things but I saw there was a new kernel update, I installed it, then terminated the distro to get the new kernel version to take affect and it never started up again. Is there any way to see something like dmesg type output from when an instance (distribution) tries to transition from "Stopped" to Running? |
Same here |
I can't install the WSL kernel update either, as the installer is assuming I don't have WSL. |
This happened to me twice as well, and I'm tired of starting over. I want to WSL2, but I can't use it if it breaks and I lose everything each week. I could even live with this for a while if there was a way to recover from the failure. But as it stands it is not clear if anyone is looking into it, or if there is anything we can do to help solve the problem. |
To add some more information to the madness that I am experiencing as well as some of you have also been experiencing: I exported my broken wsl2 distro then imported it again under a different name to try some things out. Of course, the copy did not work. I then tried to convert it to wsl1 which hung. After a reboot, my original wsl2 distro was still broken but I was able to convert the copy to version 1. After conversion to version 1, the copy was able to start. I removed an entry from /etc/fstab as some people seemed to indicate issues with mounting drives fixed their problem. I then tried converting to version 2. After conversion to version 2, it wouldn't start and was broken again. I decided to go convert back to version 1 and just live with that for now until hopefully we get some answers so I kicked off the conversion to version 1 (of the copy, the original distro was still left alone). While the copy was converting back to version 1, I clicked to open a new tab in windows terminal with the intention of opening powershell core. I accidentally clicked on my original broken wsl2 distro though and IT STARTED. I'm so thoroughly confused :( |
I have no idea what happened, but yesterday on a whim, I ran |
Windows 10 Home Insider Preview. Build 20150.rs_prerelease.200612-1734 Today, after turning on my PC and opening Windows Terminal, the Ubuntu console got stuck on an empty screen (nothing showed up). I closed it and opened an instance of PowerShell, I executed This is a clean boot, no program was opened before opening the Windows Terminal, so plenty of memory were available. No VPN, no Docker for Windows (installed only inside WSL2). This is becoming really annoying. No word from Windows or the WSL team, not even a workaround or an explanation of the issue/cause. The only solution, for now, is to restart the PC until WSL2 is able to start. At this point, I'm considering switching to a dual-boot with Ubuntu and use that as my development machine while this issue is solved. I post this on this thread because I feel it is a related issue. |
I had the same problem after switching to WSL2. I launched the bash on Ubuntu shortcut and there was still some setup to be done. After it did that I am able to launch it from the terminal again. Yay! |
I had the same issue. And I tried to run again the command |
exiting docker, opening a new wsl window and restarting docker gets me out of this loop |
I've found that if I wait a few minutes and try opening the terminal again (maybe a couple more times), it works. |
I am having the same issue suddenly after restarting my machine. Trace files attached. |
same issue for me. Restarted last night after applying updates and cannot launch a previously working distro. creating a new distro works as expected. docker running or not running makes no difference Microsoft Windows [Version 10.0.19041.388] |
sometimes wsl will stuck, and after some minutes, when i try to enter new terminal, it will show |
The default one you set is that. Is it convenient to tell |
Is it convenient to provide the list you obtained |
i download it from microsoft store😰 |
I usually wait for Ubuntu releases until it is at least xx.04.1 or higher. Earlier releases tend to be a bit buggy. At least that has been my experience over the years. May need to add some libraries, too. It's pretty much a bare-bones install image on the Store. I'm on 20.04.4 LTS and see none of the termination errors I saw before. I'm also using WSL Preview, also from the store, and I don't use Docker. These kinds of termination errors seem to occur more frequently when using Docker than without. |
My version is also 20.04.4 |
Seeing the same crashes? Are you using Docker? On my WSL installation, I use a script on the Linux side to start a few services. I also keep a couple scripts on the Windows side to terminate WSL, restart the service associated with WSL, and then call the script on the Linux side to start services again. I don't use it often but perhaps it might help you. Following is the Windows side script that terminates and restarts WSL.
Following is the script that starts WSL (it has elements for use with both a third-party XServer and Windows' standard.
Following is the script on the Linux side.
|
I am indeed using docker desktop |
Make sure that Docker Desktop is fully updated as well as WSL. Also check to make sure that the default is set to WSL2. Other than that, not sure what else can help. As I said, I don't use Docker for my configuration. |
I haven't seen that "WARNING: Waiting for service. 'LxssManager (LxssManager)'..." error for a very long time. And, fortunately, that error has nothing to do with Docker. Whenever you see that error, use Windows Task Manager to find the PID of the service. Use Resource Monitor to find the same process PID. End Process Tree for the process PID. Then start the LxssManager service and run WSL again. |
https://github.com/microsoft/WSL2-Linux-Kernel/releases/tag/linux-msft-wsl-5.15.57.1 The first 5.15 kernel series was released Aug 2nd, and running Regarding the changelog:
Would that be related to our long awaited fix? Also, did anyone try the PATH workaround in the discussion? #7869 |
shibal wsl |
Hi! I had the same issue, the below steps solved it for me 👍
|
Not sure I am having the same issue, but I am getting this same error from vscode and also when I try to execute any command in new shell, i.e.:
But in the terminal where I started wsl I am logged in and everything seems to work.
Also I have xrdp running in my wsl distro and I am connected there (KDE UI) and everything seems to work normally.
So I am really confused what is going on 🤯 |
I ran |
Well, "fixing" computer issues by restarting it is always an option, but when you have a lot of open work it is a nuisance 🤷♂️ |
This is the way. |
But symbolic link share is not restored, so all applications are freezed and you must reboot whole computer. I think this problem is somehow connected with filesystem activity or files count... It freezes more often when doing git commit, copying files etc. |
Do you realize, that this is like telling someone whose wifi driver is sometimes starting to drop packets to fix the issue by rebooting his laptop? 🙄 |
Well, truth be told, if this is Dell hardware a reboot actually can be a correct answer. For some Dell hardware I supported over the years, one had first to turn off the device, unplug the device from power for 15 seconds, and then plug it back in and boot up the computer again. Had much experience with Dell hardware in a College computer Math Lab that had issues with dropping packets until that was done. All of the computers would do it. Had to do this about every couple of weeks or so with the 3Com hubs and switches that were in use at the time. And it was similar with the Wifi hardware. I don't what it was about the Dells at that time, but it was a regular occurrence. They all were Optiplex models, but I no longer recall the specific model numbers. Some Dell Inspirons would do the same with their Wifi hardware. It did not matter what settings were used. Even worse, some Dell models were certified for Ubuntu, but the Wifi hardware always had issues with dropping packets until rebooted (in which case it would be fine for a few days before problems would start up again), and we never could get hibernation to work properly on those systems supposedly certified for Ubuntu Linux! Long rant about the way things were, but I also have found that when there are troubles with WSL, shutting it down and starting it up again would fix the troubles with interoperability. After some updates, the problem came back with a vengeance, and I found I had to run the command several times a day. So, I just wrote a couple of scripts so that when it occurs, I just double click a shortcut to the main script, click to allow elevation, and let it shutdown WSL, restart the service, and then restart WSL and run a few services from the Linux side (such as CUPS, saned, and systemwide DBus). This is the script I now am using (until changes to WSL require modification):
The Start WSL script is as follows (the script can be adjusted for either use of WSLg or the third party XServer I was using):
And on the Linux side of WSL, I use the following script (with several available options) named start-wsl-services in /usr/bin/:
|
Quick solution:
(2):
|
For most of the issues. I just apply what we call a "Microsoft" solution. Restart of WSL. Run powershell as admin >> Close and open VScode again and it's solved. |
As I like to say: Microsoft problems require Microsoft solutions. |
Quitting Docker Desktop fixed it for me. |
Your Windows build number: (Type
ver
at a Windows Command Prompt)Microsoft Windows [Version 10.0.19041.207]
What you're doing and what's happening: (Copy&paste the full set of specific command-line steps necessary to reproduce the behavior, and their output. Include screen shots if that helps demonstrate the problem.)
I moved/exported/Imported my WSL2 Debian Distro from an old Computer (AMD A10) to a newer AMD FX8350 based Computer that has a lot more memory, using WSL --import. The export and import was successful but now the distro fails to start with the message "The Windows Subsystem for Linux instance has terminated."
One thing I noticed is that if I convert the Distro from WSL v2 to WSL v1 the distro starts and im able to get into most of it. But a lot of things in the distro dont work. As soon as I convert it back to WSL v2 it fails again. Both the old and new computer are the same build of Windows 10
What's wrong / what should be happening instead:
The distro should start.
Strace of the failing command, if applicable: (If
some_command
is failing, then runstrace -o some_command.strace -f some_command some_args
, and link the contents ofsome_command.strace
in a gist here).For WSL launch issues, please collect detailed logs.
lxcore_service.zip
The text was updated successfully, but these errors were encountered: