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

Error Wsl/Service/CreateInstance/0xd000020c with code 4294967295 (0xffffffff) #11255

Closed
1 of 2 tasks
dashqua opened this issue Mar 6, 2024 · 58 comments
Closed
1 of 2 tasks
Assignees

Comments

@dashqua
Copy link

dashqua commented Mar 6, 2024

Windows Version

Microsoft Windows [Version 10.0.22631.3235]

WSL Version

2.1.4.0

Are you using WSL 1 or WSL 2?

  • WSL 2
  • WSL 1

Kernel Version

CYGWIN_NT-10.0-22631 version 3.4.5-1.x86_64 (runneradmin@fv-az420-156) (gcc version 11.3.0 (GCC) ) 2023-01-19 19:09 UTC

Distro Version

Ubuntu-22.04

Other Software

No response

Repro Steps

  • Opening my Ubuntu setup in Windows Terminal (Preview)
    I believe the command of the shortcut is C:\WINDOWS\system32\wsl.exe -d Ubuntu

Expected Behavior

I was expecting to be connected to my Ubuntu setup; I attach here an example of what it looked like
pbm

The user is 'thomas', my user's home directory contains a tree of directories and files. As you can see, .bashrc and my PS1 were also altered. I cannot recall the WSL version I was using before this issue, as I tried to install the version 2 at some point but I am not sure I succedded at the time.

Actual Behavior

When I replicate the aboe steps, instead of seeing my WSL setup, I get the following error

Error: 0xd000020c
Error code: Wsl/Service/CreateInstance/0xd000020c

[process exited with code 4294967295 (0xffffffff)]
You can now close this terminal with Ctrl+D, or press Enter to restart.

Diagnostic Logs

WslLogs-2024-03-06_20-03-40.zip

Copy link

github-actions bot commented Mar 6, 2024

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Open similar issues:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

@dashqua
Copy link
Author

dashqua commented Mar 6, 2024

I had already seen some of the links proposed by the bot, but abyways none of them is helpful for me.
I hope I was clear in my post, please ask me more details if needed.

@raydavis
Copy link

raydavis commented Mar 6, 2024

I've been using WSL Ubuntu successfully for years, but as of this morning it fails with the above error.

Error: 0xd000020c
Error code: Wsl/Service/CreateInstance/0xd000020c

Current directory:
C:\Users\k

Command to be executed:
"C:\WINDOWS\SYSTEM32\wsl.exe"

ConEmuC: Root process was alive less than 10 sec, ExitCode=xFFFFFFFF(4294967295).
Press Enter or Esc to close console...

"wsl.exe --status" reports no problem.

PS C:\Users\k> wsl.exe --version
WSL version: 2.1.4.0
Kernel version: 5.15.146.1-2
WSLg version: 1.0.60
MSRDC version: 1.2.5105
Direct3D version: 1.611.1-81528511
DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows version: 10.0.19045.3930

PS C:\Users\k> wsl.exe --status
Default Distribution: Ubuntu
Default Version: 2

@dashqua
Copy link
Author

dashqua commented Mar 6, 2024

I have not used WSL in a month on this machine, but if was working fine last time I checked. This is what I get:

C:\Users\thomas>wsl --version
WSL version: 2.1.4.0
Kernel version: 5.15.146.1-2
WSLg version: 1.0.60
MSRDC version: 1.2.5105
Direct3D version: 1.611.1-81528511
DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows version: 10.0.22631.3235

C:\Users\thomas>wsl --status
Default Distribution: Ubuntu-22.04
Default Version: 2

C:\Users\thomas>

@dpiccoloCSC
Copy link

Following. I have the same exact issue. I use WSL (ubuntu) periodically, at least once a week if no more. It used to work without any issues, but since today I'm also getting the "Wsl/Service/CreateInstance/0xd000020c" error.

@benhillis
Copy link
Member

Thanks for your patience, everybody. We've been unable to reproduce this locally, but I have some additional steps that will help us debug this. Could you please set the below reg key, then re-run log collection? This will put the lxcore driver into verbose logging mode which should help identify why init is falling over.

  1. Set this reg key
    reg add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lxss /v PrintLogLevel /t REG_DWORD /d 3 /f
  2. Collect logs (https://aka.ms/wsllogs)
  3. Delete Key:
    reg delete HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lxss /v PrintLogLevel /f

@benhillis benhillis self-assigned this Mar 6, 2024
@benhillis benhillis added the bug label Mar 6, 2024
@pc-guan
Copy link

pc-guan commented Mar 7, 2024

rollback to lower version or try the command:
wsl --uninstall

@hdc-dragonfly
Copy link

I faced this yesterday, I have no clue what is going on here, It was working fine until yesterday. I'm just a "advanced user" I did fully reset WSL, DISM, SFC. System restore didn't help either but it seems to have crashed yesterday with some windows updates...
but even rolling back the updates didn't help.

KB5034848
KB5034467
KB5034765

The weird thing is that Docker seems to be working normally by the way

@mhacklAimit
Copy link

also had the same, docker was not working till I switched docker to use wsl2
ubuntu still has the problem
now installed debian, debian is working fine.

for me the problem started yesterday, but my update history says my last update was installed on 15/02, the only update I had yesterday were some windows defender rules

@dipling78
Copy link

dipling78 commented Mar 7, 2024

Same issue here since today with WSL 2.1.4.0 on Win10 22H2 (10.0.19045.4046), last MS updates were installed on Feb 28th.

Edit: on my machine only Ubuntu-18.04 on WSL1 made troubles - after migrating the distribution to WSL2 (via wsl --set-version Ubuntu-18.04 2) I'm able to utilize it again. The Ubuntu-22.04 distribution works both in WSL1 and WSL2 mode (I converted it to WSL1 to verify).

@dpiccoloCSC
Copy link

Ok, I gave up. I ended up disabling WSL 1 (ubuntu 18) and installing WSL 2 Ubuntu 22.04.

@bboysil
Copy link

bboysil commented Mar 7, 2024

Did a "wsl --update", tried to start "wsl"; the error in question came up: "Error code: Wsl/Service/CreateInstance/0xd000020c"

@hdc-dragonfly
Copy link

Did a "wsl --update", tried to start "wsl"; the error in question came up: "Error code: Wsl/Service/CreateInstance/0xd000020c"

same here. No way to use WSL1 anymore

@DesktopECHO
Copy link

DesktopECHO commented Mar 7, 2024

Same here.

I was in an active WSL1 session that suddenly died.

I go have a look in the Store app -- Windows Subsystem for Linux showing "Modified minutes ago"

Rude!

@hdc-dragonfly
Copy link

Same here.

I was in an active WSL1 session that suddenly died.

I go have a look in the Store app -- Windows Subsystem for Linux showing "Modified minutes ago"

Rude!

Can you share the link with us?

By the way, did anyone try

wsl --install --enable-wsl1

?

@benhillis
Copy link
Member

I'm still looking for an updated trace with these instructions, could one of you please share with me?

#11255 (comment)

@DesktopECHO
Copy link

@benhillis
Copy link
Member

@DesktopECHO - thank you, to confirm you set the below reg key prior to starting the trace? I'm not seeing any more traces.
reg add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lxss /v PrintLogLevel /t REG_DWORD /d 3 /f

You may actually need to restart after setting that key. Could you try that?

@DesktopECHO
Copy link

I set the registry key, but I did not restart. Not near this box right now, will have to pick this back up later today.

@raydavis
Copy link

raydavis commented Mar 7, 2024

@benhillis I followed your instructions and produced the attached logs. Hope they help!

WslLogs-2024-03-07_08-58-56.zip

@firewave
Copy link

firewave commented Mar 7, 2024

Happens with WSL1 Kali Linux but not with WSL1 Ubuntu 20.04.

WslLogs-2024-03-07_18-25-48.zip

@dashqua
Copy link
Author

dashqua commented Mar 7, 2024

Thanks for your patience, everybody. We've been unable to reproduce this locally, but I have some additional steps that will help us debug this. Could you please set the below reg key, then re-run log collection? This will put the lxcore driver into verbose logging mode which should help identify why init is falling over.

1. Set this reg key
   `reg add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lxss /v PrintLogLevel /t REG_DWORD /d 3 /f`

2. Collect logs (https://aka.ms/wsllogs)

3. Delete Key:
   `reg delete HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lxss /v PrintLogLevel /f`

@benhillis Here are the results of the log script with the reg key set:
WslLogs-2024-03-07_19-37-28.zip

Some important (and puzzling) things to mention:

  • If I ran wsl.exe, I can start WSL on an Ubuntu session that is NOT the one I was using before.
  • If I try to launch my WSL session via Windows Terminal Preview (as I always do, see below picture) I get the aforementioned error...
    Screenshot 2024-03-07 194235

According to several users, the bug appeared close to yesterday, and may be due to a recent update of WSL. I hope this can be quickly fixed.

Same here.
I was in an active WSL1 session that suddenly died.
I go have a look in the Store app -- Windows Subsystem for Linux showing "Modified minutes ago"
Rude!

Can you share the link with us?

By the way, did anyone try

wsl --install --enable-wsl1

?

This is what I get with the command you suggested:

PS C:\Users\thomas> wsl --install --enable-wsl1
Ubuntu is already installed.
Launching Ubuntu...
Error: 0xd000020c
Error code: Wsl/Service/CreateInstance/0xd000020c
Press any key to continue...

@benhillis
Copy link
Member

@dashqua - thanks! It looks like you have two different distros, a WSL1 and a WSL2. The WSL2 is working and the WSL1 is not. Unfortunately the reg key is not causing any more logging to show up for WSL1, so I suspect the init user mode process is just crashing very early. I have a theory about what might be happening, but I would need somebody with a repro to try out a private version of the WSL msi to test. Let me know if anybody is open to that and I can coordinate with you.

Thanks for the help! Once we sort out what's wrong we'll get this added to our test matrix so this doesn't happen again...

@dashqua
Copy link
Author

dashqua commented Mar 7, 2024

@benhillis Happy to see that you take the problem seriously. I have to admit I did not understand all the jargon you employed, but I understand you need a volunteer to experiment something before coming back to me. I just want to make sure the issue is solved and my data is intact.

@hdc-dragonfly
Copy link

So this one worked for me after unregistering every wsl1 distro

You may try it with a registered distro

wsl --install --enable-wsl1

@wjristow
Copy link

wjristow commented Mar 8, 2024

I've been using WSL for years without ever running into anything like this, but I ran into this same problem this morning. I eventually worked around it by essentially uninstalling and re-installing. I was already on WSL2, and I'm still on it after the workaround. Not sure if there is anything new here that I have, in that it seems most of the frustration in the comments above are people who were using WSL1 and are now being forced to move to WSL2. That said, if anyone else was frustrated by this in the wsl2 world, here is what I did:

wsl --unregister Ubuntu

followed by:

wsl --install Ubuntu

@benhillis
Copy link
Member

@wjristow - we're working on resolving this ASAP, sorry for the frustration. I want to advise people to avoid doing what you suggest though since it will result in data loss. We hope to have this resolved here shortly.

@wjristow
Copy link

wjristow commented Mar 8, 2024

Ahhh, thanks for the update and warning @benhillis !

I did lose some environment/setup things using the approach I described, and I wish that hadn't happened. I hope I haven't lost anything more.

@boulund
Copy link

boulund commented Mar 8, 2024

I just experienced this issue as well. I was using my WSL2 Ubuntu this morning, but when I came back after lunch it won't start.

@firewave
Copy link

firewave commented Mar 8, 2024

I have a theory about what might be happening, but I would need somebody with a repro to try out a private version of the WSL msi to test. Let me know if anybody is open to that and I can coordinate with you.

@benhillis Do you still someone to test this? I would be open to do so.

@benhillis
Copy link
Member

benhillis commented Mar 8, 2024

@firewave - if you're down to try a few private MSI's shoot me an email, it would really help! My address is .

@dashqua
Copy link
Author

dashqua commented Mar 8, 2024

To everybody joining the thread: please provide as much info as you can. You can get the powershell log script above, and I also encourage you to attach screenshots to second your post.

Hopefully, with a growing number of users reporting problems, a fix may appear soon!

@JRMatey-NIST
Copy link

I have the same error on Ubuntu 20.04 + WSL 1. Ubuntu 22.04 + WSL 1 is working.

NAME STATE VERSION
* Ubuntu-20.04 Stopped 1
Ubuntu-22.04 Running 1

  • In retrospect, I should have more faithfully backed up my Ubuntu WSL instances using wsl export; I will do so in the future ☹️. At the moment I am reluctant to do anything to the failing 20.04 until this is resolved -- for fear of data loss. It would be really useful to recover my 20.04 instance -- it has configuration information for which I have inadequate backup.
  • Does anyone know if using wsl --set-version to convert a version 1 to a version 2 will recover a 20.04 instance that is failing under version 1?
  • What about doing a rollback of wsl? https://devblogs.microsoft.com/commandline/install-wsl-with-a-single-command-now-available-in-windows-10-version-2004-and-higher/ -- wsl --update rollback

Happy to run diagnostics if that will help resolve the problem. Here is some information:

On my primary machine (fips enabled) where 20.04, wsl-1 is failing:

WSL version: 2.1.4.0
Kernel version: 5.15.146.1-2
WSLg version: 1.0.60
MSRDC version: 1.2.5105
Direct3D version: 1.611.1-81528511
DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows version: 10.0.19045.4046

On a second machine (not fips) where 20.04, wsl-1 works:

WSL version: 2.0.9.0
Kernel version: 5.15.133.1-1
WSLg version: 1.0.59
MSRDC version: 1.2.4677
Direct3D version: 1.611.1-81528511
DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows version: 10.0.19045.4046

@MitchBradley
Copy link

I had the same problem with a Debian distro that uses WSL1. Installing 2.0.15 fixed it. I also tried 2.1.0, 2.1.1, and 2.1.3 but they all failed the same as 2.1.4

I can try to get some logs if you don't already have enough of them to inspect.

@Prototyped
Copy link

I too needed to downgrade to the last stable release msi on this GitHub project (2.0.14) from 2.1.4 installed by the Microsoft Store automatically (Windows 10 Pro 22H2) to get my Debian distro on WSL1 working again. Seems like 2.1.x introduced a regression.

@dashqua
Copy link
Author

dashqua commented Mar 10, 2024

I too needed to downgrade to the last stable release msi on this GitHub project (2.0.14) from 2.1.4 installed by the Microsoft Store automatically (Windows 10 Pro 22H2) to get my Debian distro on WSL1 working again. Seems like 2.1.x introduced a regression.

Can you give us the commands you used? Also, did you witness any data loss?

@MitchBradley
Copy link

FWIW, the procedure I used to downgrade/test various versions was

  • Go to https:/microsoft/WSL/releases
  • Choose a release
  • From the Assets, download the .msi file like wsl.2.0.15.0.x64.msi
  • Open that file to install WSL
  • To test, run "wsl" from PowerShell. I have only one disto (Debian Buster release 10 using WSL 1) configured

2.0.15 worked; others in the 2.1 series immediately failed with 0xd000020c. There was no data loss as far as I can tell. Debian has been behaving the same as before since the downgrade.

@dashqua
Copy link
Author

dashqua commented Mar 10, 2024

FWIW, the procedure I used to downgrade/test various versions was

* Go to https:/microsoft/WSL/releases

* Choose a release

* From the Assets, download the .msi file like wsl.2.0.15.0.x64.msi

* Open that file to install WSL

* To test, run "wsl" from PowerShell.  I have only one disto (Debian Buster release 10 using WSL 1) configured

2.0.15 worked; others in the 2.1 series immediately failed with 0xd000020c. There was no data loss as far as I can tell. Debian has been behaving the same as before since the downgrade.

@MitchBradley Thanks for your detailed answer. I have followed EXACTLY what you suggested (took the 2.0.15 release) and I am happy to tell you that I recovered my WSL session.

My problem seems resolved. I let this thred open in case the developpers want to say something. Also, people are welcome to give explanation about what's happening with WSL. Cheers

@willemsjon
Copy link

willemsjon commented Mar 10, 2024

FWIW, the procedure I used to downgrade/test various versions was

  • Go to https:/microsoft/WSL/releases
  • Choose a release
  • From the Assets, download the .msi file like wsl.2.0.15.0.x64.msi
  • Open that file to install WSL
  • To test, run "wsl" from PowerShell. I have only one disto (Debian Buster release 10 using WSL 1) configured

2.0.15 worked; others in the 2.1 series immediately failed with 0xd000020c. There was no data loss as far as I can tell. Debian has been behaving the same as before since the downgrade.

Just wanted to say, I was having the same problem and this fixed it for me. Thanks a bunch!

@Fahmiin-Abdullah
Copy link

FWIW, the procedure I used to downgrade/test various versions was

  • Go to https:/microsoft/WSL/releases
  • Choose a release
  • From the Assets, download the .msi file like wsl.2.0.15.0.x64.msi
  • Open that file to install WSL
  • To test, run "wsl" from PowerShell. I have only one disto (Debian Buster release 10 using WSL 1) configured

2.0.15 worked; others in the 2.1 series immediately failed with 0xd000020c. There was no data loss as far as I can tell. Debian has been behaving the same as before since the downgrade.

Lifesaver! This fixed it for me at the moment

@benhillis
Copy link
Member

I have a working theory but I would need somebody who's able to repro this to try a private version of WSL. Is anybody able to assist?

@MitchBradley
Copy link

If you can give me an msi or some such I will test it, especially if you give me good instructions for what you want me to do. I am a software developer so I won't need much handholding, but mostly I do embedded stuff so I don't live and breathe Windows arcana.

@benhillis
Copy link
Member

benhillis commented Mar 11, 2024

@MitchBradley - awesome, that would be greatly appreciated. If you could shoot me an email I'll send you the binary.

@MitchBradley
Copy link

Email sent

@boulund
Copy link

boulund commented Mar 11, 2024 via email

@benhillis
Copy link
Member

Thanks for your patience everyone, this was a tricky one but @OneBlue and I were finally able to get a repro locally. I have a fix for this and will roll out an updated WSL package ASAP.

Sorry for the disruption this caused.

@MitchBradley
Copy link

Tricky ones are fun after the fact. Good job.

@benhillis
Copy link
Member

Fixed with https:/microsoft/WSL/releases/tag/2.1.5. Sorry again for the pain here - I will introduce a test to make sure something like this can't happen again.

@MitchBradley
Copy link

Fix confirmed. Thanks.

@electrofloat
Copy link

Fixed with https:/microsoft/WSL/releases/tag/2.1.5. Sorry again for the pain here - I will introduce a test to make sure something like this can't happen again.

How could this be fixed when the latest commit on any branch happened 5 days ago?

@crramirez
Copy link
Contributor

@electrofloat the code is not in this repo. WSL is not open source

@electrofloat
Copy link

Ahh... microsoft... What was I thinking...

@crozone
Copy link

crozone commented Mar 13, 2024

2.1.5 fixed both my machines, thanks for the quick turnaround!

@Preciel
Copy link

Preciel commented Mar 13, 2024

Glad this helped a lot of users... Though this version broke my WSL when I had no issues it seems...

image

@mizoru
Copy link

mizoru commented Aug 25, 2024

I have started getting this same error on 2.2.4.0 of WSL 1

wsl
Error: 0xd000020c
Error code: Wsl/Service/CreateInstance/0xd000020c
wsl --version
WSL version: 2.2.4.0
Kernel version: 5.15.153.1-2
WSLg version: 1.0.61
MSRDC version: 1.2.5326
Direct3D version: 1.611.1-81528511
DXCore version: 10.0.26091.1-240325-1447.ge-release
Windows version: 10.0.19045.4780

Downgrading to 2.1.5.0 or 2.0.15.0 didn't help

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

No branches or pull requests