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.exe hangs or terminates when starting WSL session: Wsl/Service/CreateInstance/CreateVm/ConfigureGpu/HCS/ERROR_PATH_NOT_FOUND #10918

Open
1 of 2 tasks
coldacid opened this issue Dec 14, 2023 · 14 comments

Comments

@coldacid
Copy link

coldacid commented Dec 14, 2023

Windows Version

Microsoft Windows [Version 10.0.19045.3803]

WSL Version

2.0.9.0, 2.0.14.0

Are you using WSL 1 or WSL 2?

  • WSL 2
  • WSL 1

Kernel Version

5.15.133.1-1

Distro Version

Arch

Other Software

N/A

Repro Steps

  1. Open Windows Terminal
  2. Try any or all of these commands:
    • wsl -d Arch
    • wsl
    • wsl --system
  3. In all cases, wsl.exe will terminate with error message and code "The system cannot find the path specified." and "Error code: Wsl/Service/CreateInstance/CreateVm/ConfigureGpu/HCS/ERROR_PATH_NOT_FOUND" to the terminal, usually after acting hung for up to a minute. (Prior to reboot when first reporting the problem, the error message and code were "Server execution failed" and Wsl/0x80080005, and occurred with wsl --status and wsl --list as well.)

Expected Behavior

  • wsl --system or wsl -d Arch will start a session in either the system distro or the Arch distro I have set up

Actual Behavior

  • wsl.exe is unresponsive for up to a minute before terminating with the stated error message
  • no activity observed in wslservice.exe as if it were suspended, although it is not

Diagnostic Logs

WslLogs-2023-12-13_23-17-45.zip

Copy link

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.

@coldacid coldacid changed the title wsl.exe hangs or terminates with "Server execution failed" (error code Wsl/0x80080005) when starting session or when using --list or --status command line params wsl.exe hangs or terminates when starting WSL session Dec 14, 2023
@coldacid
Copy link
Author

After rebooting the computer, the error message and code have now changed to "The system cannot find the path specified." and Wsl/Service/CreateInstance/CreateVm/ConfigureGpu/HCS/ERROR_PATH_NOT_FOUND instead. wsl --list and wsl --status work properly, but any attempt to start an actual WSL session continues to fail. New logs attached.

WslLogs-2023-12-13_23-47-32.zip

@coldacid
Copy link
Author

Problem persists after upgrade to WSL 2.0.14.0

@coldacid coldacid changed the title wsl.exe hangs or terminates when starting WSL session wsl.exe hangs or terminates when starting WSL session: Wsl/Service/CreateInstance/CreateVm/ConfigureGpu/HCS/ERROR_PATH_NOT_FOUND Dec 14, 2023
@coldacid
Copy link
Author

I enabled the Virtual Machine Platform feature for Windows and rebooted in case that would help (since it is required with some builds of Windows 10), no change.

@OneBlue
Copy link
Collaborator

OneBlue commented Dec 15, 2023

Thank you @coldacid.
Looking at the logs, looks like this is the issue:

379	True	Microsoft.Windows.Lxss.Manager	Error	0	12-13-2023 20:48:16.888	"	"	"code: 	
failurecount: 	1
file: 	D:\a\1\s\src\windows\common\hcs.cpp
function: 	
hr: 	0x80070003
linenumber: 	231
message: 	""HcsWaitForOperationResult for HcsModifyComputeSystem failed ({""""ResourcePath"""":""""VirtualMachine/Devices/Plan9/Shares"""",""""RequestType"""":""""Add"""",""""Settings"""":{""""Name"""":""""drivers"""",""""AccessName"""":""""drivers"""",""""Path"""":""""C:\\WINDOWS\\System32\\DriverStore\\FileRepository"""",""""Port"""":50001,""""Flags"""":33}} - error string: (null))""
threadid: 	13012
type: 	0
wslVersion: 	2.0.9.0"	D:\a\1\s\src\windows\common\hcs.cpp			14624	13012	2		00000000-0000-0000-0000-000000000000		

Can you confirm if the C:\WINDOWS\System32\DriverStore\FileRepository folder exists on your machine ?

@coldacid
Copy link
Author

@OneBlue it does exist, and well populated to boot.

@coldacid
Copy link
Author

Attaching directory list for C:\WINDOWS\System32\DriverStore\FileRepository and an updated diagnostics zip reflecting the updated WSL version and Windows feature changes.
WslLogs-2023-12-15_18-51-53.zip
FileRepository.dir.txt

@coldacid
Copy link
Author

coldacid commented Jan 2, 2024

@OneBlue any other possibilities?

@joshglens
Copy link

joshglens commented Jan 5, 2024

I didn't have the exact same error, but found that disabling Hyper-V in Turn Windows features on or off worked for hanging WSL. Based on what I've seen, in some cases it only worked after turning it back on. To thoroughly test this, I would recommend trying the following:

  1. Try running WSL
  2. Restart computer
  3. Disable Hyper-V in Windows features
  4. Restart
  5. Try running WSL
  6. Enable Hyper-V in Windows features
  7. Restart
  8. Try running WSL
  9. See if there are any optional Updates for windows available
  10. Restart
  11. Try running WSL

Best of luck! WSL is unfortunately still very finnicky.

@coldacid
Copy link
Author

coldacid commented Jan 5, 2024

@joshglens thanks but it didn't make a difference.

@OneBlue
Copy link
Collaborator

OneBlue commented Jan 10, 2024

Thank you @coldacid. I'm added more logging to our logging script to help root cause. Could you please run (elevated powershell):

Invoke-WebRequest -UseBasicParsing "https://raw.githubusercontent.com/microsoft/WSL/master/diagnostics/collect-wsl-logs.ps1" -OutFile collect-wsl-logs.ps1
Set-ExecutionPolicy Bypass -Scope Process -Force
.\collect-wsl-logs.ps1 -LogProfile storage

[reproduce the issue in another terminal while log collection is running]
[stop log collection]

And share the resulting zip file ?

@coldacid
Copy link
Author

@OneBlue sorry for the delay, didn't see that you had replied.

WslLogs-2024-01-15_22-32-48.zip

@god-jester
Copy link

@coldacid an in-place reinstall fixed it for me (ISO for 22621 generated with uupdump). Your issue is the only Google result for Wsl/Service/CreateInstance/CreateVm/ConfigureGpu/HCS/ERROR_PATH_NOT_FOUND - and this was the only fix that worked.

@coldacid
Copy link
Author

coldacid commented Feb 5, 2024

@OneBlue anything come up with that last log dump?

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

No branches or pull requests

4 participants