WSL icon indicating copy to clipboard operation
WSL copied to clipboard

WSL2 - "The Windows Subsystem for Linux instance has terminated."

Open Some1OnLine opened this issue 6 years ago • 108 comments

  • 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 run strace -o some_command.strace -f some_command some_args, and link the contents of some_command.strace in a gist here).

  • For WSL launch issues, please collect detailed logs.

lxcore_service.zip

Some1OnLine avatar Apr 20 '20 05:04 Some1OnLine

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 avatar Apr 29 '20 11:04 martinfojtik

@martinfojtik Thank you so much, Got the exact same issue, but I didn't thoughts about the mounted folder through VPN. It's kinda obvious when you know it.

ludzzz avatar May 05 '20 06:05 ludzzz

wsl command was failing for me, but after ejecting my external HD it worked fine and WSL has been started.

Welquer avatar May 12 '20 00:05 Welquer

Similarly here.

The Windows Subsystem for Linux instance has terminated.
[process exited with code 4294967295]

I think it might be due to changes to /etc/fstab I've done - is there a way to edit the file without starting WSL? Or maybe it is because of the docker service.

Log capture does not provide any additional information:

logman.exe create trace lxcore_kernel -p "{0CD1C309-0878-4515-83DB-749843B3F5C9}" -mode 0x00000008 -ft 10:00 -o .\lxcore_kernel.etl -ets
logman.exe create trace lxcore_user -p "{D90B9468-67F0-5B3B-42CC-82AC81FFD960}" -ft 1:00 -rt -o .\lxcore_user.etl -ets
logman.exe create trace lxcore_service -p "{B99CDB5A-039C-5046-E672-1A0DE0A40211}" -ft 1:00 -rt -o .\lxcore_service.etl -ets

→ Event Viewer info is barren.

kreczko avatar May 19 '20 09:05 kreczko

same here, i think its my fstab, but no way to edit it without starting wsl.. bit of a catch 22..

wisepotato avatar May 25 '20 20:05 wisepotato

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.

kreczko avatar May 26 '20 08:05 kreczko

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

boblitex avatar May 28 '20 01:05 boblitex

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.

oh god.

wisepotato avatar May 28 '20 07:05 wisepotato

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

i mean you are running an insider preview, this is bound to happen. Wait until actual release and it'll probably be buttery smooth

wisepotato avatar May 28 '20 08:05 wisepotato

how did you manage to do this, having the same issue here.

wsl --set-version Ubuntu-18.04 1
# edit fstab
wsl --set-version Ubuntu-18.04 2

where Ubuntu-18.04 is the distribution I use.

Fun fact: all the mounts in the fstab work if I execute them after the machine is up (sudo mount ...) → feels like a startup order problem.

Had to convert back to WSL 1, edit the fstab, then convert again to WSL 2.

oh god.

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.

kreczko avatar May 28 '20 08:05 kreczko

After I Updated the WSL 2 Linux kernel, the problem fixed.

image

Notice, Need to download and install the latest package on https://docs.microsoft.com/en-us/windows/wsl/wsl2-kernel.

liudonghua123 avatar Jun 08 '20 02:06 liudonghua123

Still facing this issue

nikhildaga avatar Jun 10 '20 23:06 nikhildaga

This is becoming really annoying. 😢 I get this error every time I turn on the PC and open the WSL console (Ubuntu-18.04).

gerardojbaez avatar Jun 17 '20 18:06 gerardojbaez

Facing the same issue when using WSL 2 with Docker Desktop

chynl avatar Jun 17 '20 18:06 chynl

I've seen several issues that seem similar to this and to me the most frustrating things are: 1.) There doesn't appear to be a good way to see anything that is happening to even begin to troubleshoot this. I know we can collect logs but I haven't seen a good way to view anything useful from them without having the source code. 2.) The only responses I have seen from Microsoft were asking to submit logs but no acknowledgement of any issues or replies given after those logs were submitted to help anyone get past the issue.

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?

ttutko avatar Jun 17 '20 19:06 ttutko

Facing the same issue when using WSL 2 with Docker Desktop

Same here

MJLHThomassen-Sorama avatar Jun 18 '20 13:06 MJLHThomassen-Sorama

I can't install the WSL kernel update either, as the installer is assuming I don't have WSL.

hsakkout avatar Jun 19 '20 03:06 hsakkout

2.) The only responses I have seen from Microsoft were asking to submit logs but no acknowledgement of any issues or replies given after those logs were submitted to help anyone get past the issue.

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.

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.

traviss42 avatar Jun 22 '20 03:06 traviss42

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 :(

ttutko avatar Jun 22 '20 21:06 ttutko

I have no idea what happened, but yesterday on a whim, I ran wsl in PowerShell, which seemed to start the instance, and I've been able to use it ever since.

traviss42 avatar Jun 22 '20 22:06 traviss42