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

WSL2 update hangs up without any log info #10943

Closed
1 of 2 tasks
EmperorTransisthor opened this issue Dec 21, 2023 · 6 comments
Closed
1 of 2 tasks

WSL2 update hangs up without any log info #10943

EmperorTransisthor opened this issue Dec 21, 2023 · 6 comments

Comments

@EmperorTransisthor
Copy link

Windows Version

Microsoft Windows [Version 10.0.19045.3803]

WSL Version

2.0.14.0

Are you using WSL 1 or WSL 2?

  • WSL 2
  • WSL 1

Kernel Version

5.15.133.1-microsoft-standard-WSL2

Distro Version

Ubuntu 22.04

Other Software

No response

Repro Steps

Run powershell (without admin priviledges)
Run command $ wsl --update

Expected Behavior

Display error: "Can't update Windows Subsystem Linux, Powershell needs elevated priviledges. Please run Powershell as admin."

Actual Behavior

Powershell tells that wsl is now updating to version X
Nothing happens, and process is running in the background using 5% of CPU power.

Diagnostic Logs

No response

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.

@jtabox
Copy link

jtabox commented Dec 22, 2023

Maybe I'm misunderstanding your issue completely, in this case I apologize, but the error message you're getting is quite clear? It tells you to run the update with admin privileges, which you aren't doing according to your reproduction steps above. Have you tried running wsl --update from an admin command prompt or powershell?
Also, according to the 2nd reproduction step, it looks like you're running wsl from inside wsl? You write Run command $ wsl --update, does the $ mean you're running the wsl command from a Linux shell?

@OneBlue
Copy link
Collaborator

OneBlue commented Dec 22, 2023

@EmperorTransisthor: Are you seeing any error or is wsl --update hanging ? Admin access is indeed required to update WSL so what you're seeing is the expected behavior.

@EmperorTransisthor
Copy link
Author

Maybe I'm misunderstanding your issue completely, in this case I apologize, but the error message you're getting is quite clear?

The thing is, that I get no error message at all. Correct me, if I'm wrong, but in my opinion it is an issue, because it is misleading. Only after I killed operation with ^C, it got unstucked and told me there was an error and gave me logs, from where I got feedback that it got stuck due to access denies, thus missing elevated priviledges.

Have you tried running wsl --update from an admin command prompt or powershell?

Yes, actually this issue on github is more of a potential defect, not a serious issue. I got my wsl successfully updated after running powershell with admin priviledges.

Also, according to the 2nd reproduction step, it looks like you're running wsl from inside wsl? You write Run command $ wsl --update, does the $ mean you're running the wsl command from a Linux shell?

Sorry for misunderstanding, if '$' prefix is not used for citing cmd/powershell commands. I've got used to citing scripts I use with '$' prefix. I run it in powershell without admin rights, and typed in wsl --update

@OneBlue no, I don't see any error at all. From my point of view, this is an issue due to it's lack of any feedback given to user, therefore misleading behaviour which can make user believe, that update is ongoing (which was in my case btw), however it is not. Solution would be to check if command is running with sufficient priviledges and if not, raise error "insufficient priviledges". What's your take on that?

@OneBlue
Copy link
Collaborator

OneBlue commented Jan 3, 2024

Interesting. Could you capture a dump of wsl.exe when it is in that "stuck" state and share it here ?

@EmperorTransisthor
Copy link
Author

EmperorTransisthor commented Jan 11, 2024

Interesting. Could you capture a dump of wsl.exe when it is in that "stuck" state and share it here ?

I would love to, but unfortunately it got overwritten by new wsl-install-logs...
I think I will try to reproduce it myself when WSL update is possible and send dump to you.

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

3 participants