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 does not start anymore when upgrading from 2.0.1 to 2.0.2 #10560

Closed
1 of 2 tasks
felipecrs opened this issue Sep 28, 2023 · 29 comments
Closed
1 of 2 tasks

WSL does not start anymore when upgrading from 2.0.1 to 2.0.2 #10560

felipecrs opened this issue Sep 28, 2023 · 29 comments
Assignees

Comments

@felipecrs
Copy link

felipecrs commented Sep 28, 2023

Windows Version

Microsoft Windows [Version 10.0.22631.2338]

WSL Version

This command does not work

Are you using WSL 1 or WSL 2?

  • WSL 2
  • WSL 1

Kernel Version

5.10.102.1 (from WSL status)

Distro Version

Ubuntu 22.04

Other Software

No response

Repro Steps

Test.mp4

Expected Behavior

To upgrade properly.

Actual Behavior

The upgrade process finishes, but calling the wsl.exe seems to call the old system one.

Diagnostic Logs

No response

@fargiolas
Copy link

fargiolas commented Sep 28, 2023

Same here, please if you have a workaround do share it. It seems it reverted to an old version, I can still use it but cannot update and e.g. wslg is not there anymore. Many cmd line options are missing (--system, --version, --update --pre-release to name a few)

@fargiolas
Copy link

fargiolas commented Sep 28, 2023

If I try --update it says:
The package installation failed because a version of the service exists outside of APPX packaging. Please contact your software vendor.

Please this is kind of urgent, any help would be much appreciated

@felipecrs
Copy link
Author

felipecrs commented Sep 28, 2023

The workaround for me is to run:

wsl --update

After it's broken, so that wsl returns back to 2.0.1.

@felipecrs
Copy link
Author

Ops:

wsl --update
Installing: Windows Subsystem for Linux
Windows Subsystem for Linux has been installed.wsl --version
WSL version: 2.0.1.0
Kernel version: 5.15.123.1-1
WSLg version: 1.0.58
MSRDC version: 1.2.4485
Direct3D version: 1.608.2-61064218
DXCore version: 10.0.25880.1000-230602-1350.main
Windows version: 10.0.22631.2338wsl echo "from wsl"
Failed to attach disk 'C:\Users\felip\AppData\Local\Packages\CanonicalGroupLimited.Ubuntu_79rhkp1fndgsc\LocalState\ext4.vhdx' to WSL2: The process cannot access the file because it is being used by another process.
Error code: Wsl/Service/CreateInstance/MountVhd/HCS/ERROR_SHARING_VIOLATION

@fargiolas
Copy link

The workaround for me is to run:

wsl --update

After it's broken, so that wsl returns back to 2.0.1.

not working here, see the error above

@felipecrs
Copy link
Author

Ops:

❯ wsl --update
Installing: Windows Subsystem for Linux
Windows Subsystem for Linux has been installed.

❯ wsl --version
WSL version: 2.0.1.0
Kernel version: 5.15.123.1-1
WSLg version: 1.0.58
MSRDC version: 1.2.4485
Direct3D version: 1.608.2-61064218
DXCore version: 10.0.25880.1000-230602-1350.main
Windows version: 10.0.22631.2338

❯ wsl echo "from wsl"
Failed to attach disk 'C:\Users\felip\AppData\Local\Packages\CanonicalGroupLimited.Ubuntu_79rhkp1fndgsc\LocalState\ext4.vhdx' to WSL2: The process cannot access the file because it is being used by another process.
Error code: Wsl/Service/CreateInstance/MountVhd/HCS/ERROR_SHARING_VIOLATION

After rebooting the Windows, it works for me again with version 2.0.1.

@fargiolas
Copy link

Unfortunately reboot doesn't do anything here, still get the APPX error if I try to upgrade, or get it from the store. Help!

@felipecrs
Copy link
Author

Try to uninstall WSL from Programs and Features, then wsl --update again.

@fargiolas
Copy link

fargiolas commented Sep 28, 2023

--status says:

Default Distribution: Ubuntu
Default Version: 2

WSL automatic updates are on.

The WSL 2 kernel file is not found. To update or restore the kernel please run 'wsl --update'.

@felipecrs I'd like to get some official feedback before doing anything as I have data in wsl. I have backups but it would still be a shame to reconfigure everything.

@craigloewen-msft
Copy link
Member

If you're able to, please hold onto your state for now! We would like to see if we can get logs or feedback on this.

If you're unable to, please try reinstalling WSL manually by downloading the latest .msixbundle from our release page and then double clicking on it.

Your distro data should be preserved.

@fargiolas
Copy link

fargiolas commented Sep 28, 2023

@craigloewen-msft thanks for looking into this! I guess I could wait maybe until tomorrow morning CEST time, it's not the first time I upgrade to a pre-release (or even my own builds, not on this machine though) and it always went fine, it must be something specific to this version.

@marcorotondi
Copy link

marcorotondi commented Sep 28, 2023

If you're able to, please hold onto your state for now! We would like to see if we can get logs or feedback on this.

If you're unable to, please try reinstalling WSL manually by downloading the latest .msixbundle from our release page and then double clicking on it.

Your distro data should be preserved.

Confirm that download installer and run it wsl is installed fine and works as aspect

@fargiolas
Copy link

If you're able to, please hold onto your state for now! We would like to see if we can get logs or feedback on this.
If you're unable to, please try reinstalling WSL manually by downloading the latest .msixbundle from our release page and then double clicking on it.
Your distro data should be preserved.

Confirm that download installer and run it wsl is installed fine and works as aspect

Might as well wait a bit at this point, just for reference did you download and install latest installer (2.0.2) or latest known to work (2.0.1)?

@marcorotondi
Copy link

If you're able to, please hold onto your state for now! We would like to see if we can get logs or feedback on this.
If you're unable to, please try reinstalling WSL manually by downloading the latest .msixbundle from our release page and then double clicking on it.
Your distro data should be preserved.

Confirm that download installer and run it wsl is installed fine and works as aspect

Might as well wait a bit at this point, just for reference did you download and install latest installer (2.0.2) or latest known to work (2.0.1)?

I download 2.0.2 only change was ip address changed

@felipecrs
Copy link
Author

Try to uninstall WSL from Programs and Features, then wsl --update again.

As far as I know this won't cleanup your data. But of course, the risk is yours.

@felipecrs
Copy link
Author

If you're able to, please hold onto your state for now! We would like to see if we can get logs or feedback on this.

I can easily reproduce the issue here, and I can provide any information you want. You can even share a Teams meeting link in case you want to see my screen or whatever. :)

@fargiolas
Copy link

If you're able to, please hold onto your state for now! We would like to see if we can get logs or feedback on this.

If you're unable to, please try reinstalling WSL manually by downloading the latest .msixbundle from our release page and then double clicking on it.

Needed this fixed for work so I followed your advice, I can confirm installing from the latest bundle solves it! Just gave me a warning about binding a new ip address. Now kernel is the correct one and wsl is updated. Let me know if I can still provide any feedback to help you with this issue.

From what I can tell from wsl-install-logs.txt there wasn't any problem with the first update.

@obriat obriat mentioned this issue Sep 29, 2023
2 tasks
@tristanbarcelon
Copy link

tristanbarcelon commented Sep 29, 2023

My symptoms were slightly different. I was able to update from latest stable to 2.0.0 when it was released. Updating to 2.0.1 failed. Tried a couple of days after and it installed 2.0.2. I can run it just fine but some commands were broken. For example, --version and manage commands weren't being recognized at all. I downloaded latest msixbundle and re-installed. So far so good.

@felipecrs
Copy link
Author

felipecrs commented Sep 29, 2023

For example, --version and manage commands weren't being recognized at all.

Well, that is exactly what I showed in the video. So I think your symptoms are the same. :)

EDIT: Nevermind, the phrase above is a mistake. By the way, I think it was working in your case after upgrading to 2.0.2 because it was in fact using the system's version of WSL instead of the store one.

@felipecrs
Copy link
Author

I downloaded latest msixbundle and re-installed. So far so good.

Do you mean the MSI? https://github.com/microsoft/WSL/releases/download/2.0.2/wsl.2.0.2.0.x64.msi

@fargiolas
Copy link

I downloaded latest msixbundle and re-installed. So far so good.

Do you mean the MSI? https://github.com/microsoft/WSL/releases/download/2.0.2/wsl.2.0.2.0.x64.msi

msixbundle is the multiarch package, guess they're the same if you're in x64

@felipecrs
Copy link
Author

Oh, got it. Thanks.

@felipecrs
Copy link
Author

After updating with the MSIXBUNDLE file (succesfully, no errors, through the App Installer), wsl --version still shows 2.0.1.

@fargiolas, mind sending the output of wsl --version?

@felipecrs
Copy link
Author

felipecrs commented Sep 29, 2023

Oh. Nevermind. After wsl --shutdown, now it shows correctly:

wsl --version                                                                                                                       14:40:51
WSL version: 2.0.1.0
Kernel version: 5.15.123.1-1
WSLg version: 1.0.58
MSRDC version: 1.2.4485
Direct3D version: 1.608.2-61064218
DXCore version: 10.0.25880.1000-230602-1350.main
Windows version: 10.0.22631.2338wsl --shutdown                                                                                                                      14:41:38wsl --version                                                                                                                       14:41:53
WSL version: 2.0.2.0
Kernel version: 5.15.123.1-1
WSLg version: 1.0.58
MSRDC version: 1.2.4485
Direct3D version: 1.608.2-61064218
DXCore version: 10.0.25880.1000-230602-1350.main
Windows version: 10.0.22631.2338

And WSL seems to be working fine now.

@craigloewen-msft
Copy link
Member

We believe we have a fix for this. This was only during the upgrade and only affected for users running wsl --update. We'll close this issue when it's available.

@OneBlue
Copy link
Collaborator

OneBlue commented Sep 29, 2023

Solved with 2.0.3

@OneBlue OneBlue closed this as completed Sep 29, 2023
@felipecrs
Copy link
Author

I would try to confirm the fix but...

wsl --version                                                                                                                       13:32:18
WSL version: 2.0.2.0
Kernel version: 5.15.123.1-1
WSLg version: 1.0.58
MSRDC version: 1.2.4485
Direct3D version: 1.608.2-61064218
DXCore version: 10.0.25880.1000-230602-1350.main
Windows version: 10.0.22631.2338wsl --update --pre-release                                                                                                          13:32:15
Checking for updates.
The most recent version of Windows Subsystem for Linux is already installed.

@OneBlue
Copy link
Collaborator

OneBlue commented Sep 30, 2023

I would try to confirm the fix but...

❯ wsl --version                                                                                                                       13:32:18
WSL version: 2.0.2.0
Kernel version: 5.15.123.1-1
WSLg version: 1.0.58
MSRDC version: 1.2.4485
Direct3D version: 1.608.2-61064218
DXCore version: 10.0.25880.1000-230602-1350.main
Windows version: 10.0.22631.2338

❯ wsl --update --pre-release                                                                                                          13:32:15
Checking for updates.
The most recent version of Windows Subsystem for Linux is already installed.

New GH releases can take a bit of time to become visible via the API. You should be able to update now

@OneBlue OneBlue reopened this Sep 30, 2023
@OneBlue OneBlue closed this as completed Sep 30, 2023
@felipecrs
Copy link
Author

Ok, I upgraded to 2.0.3 and everything worked well.

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

7 participants
@fargiolas @tristanbarcelon @OneBlue @marcorotondi @felipecrs @craigloewen-msft and others