WSL icon indicating copy to clipboard operation
WSL copied to clipboard

WSL can upgrade itself while the user is working, killing all their running distro

Open gknispel-australdx opened this issue 6 months ago • 3 comments

Windows Version

Microsoft Windows [Version 10.0.26100.4351]

WSL Version

2.5.9.0

Are you using WSL 1 or WSL 2?

  • [x] WSL 2
  • [x] WSL 1

Kernel Version

6.6.87.2-microsoft-standard-WSL2

Distro Version

all

Other Software

No response

Repro Steps

Work in running WSL2 distro (and maybe also WSL1, I have one installed but was only running WSL2 distro at the time it happened) ; sometimes WSL decides to update itself and this results in all your running distro being suddenly killed without warning => you loose your current unsaved work.

Expected Behavior

Such event described in "repro steps" not happening at least without ample warning (if this includes a timeout, said timeout shall be large enough, like 16 hours)

Actual Behavior

The event described in "repro steps" happening: all your distro are suddenly killed for WSL to update itself.

Diagnostic Logs

The update event being not in my control, I'm unable to reproduce the bug on demand, therefore I did not have log collection running at the time.

gknispel-australdx avatar Jun 18 '25 12:06 gknispel-australdx

Logs are required for review from WSL team

If this a feature request, please reply with '/feature'. If this is a question, reply with '/question'. Otherwise please attach logs by following the instructions below, your issue will not be reviewed unless they are added. These logs will help us understand what is going on in your machine.

How to collect WSL logs

Download and execute collect-wsl-logs.ps1 in an administrative powershell prompt:

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

The script will output the path of the log file once done.

If this is a networking issue, please use collect-networking-logs.ps1, following the instructions here

Once completed please upload the output files to this Github issue.

Click here for more info on logging If you choose to email these logs instead of attaching to the bug, please send them to [email protected] with the number of the github issue in the subject, and in the message a link to your comment in the github issue and reply with '/emailed-logs'.

github-actions[bot] avatar Jun 18 '25 12:06 github-actions[bot]

/feature

gknispel-australdx avatar Jun 18 '25 12:06 gknispel-australdx

Diagnostic information
Found '/feature', adding tag 'feature'

github-actions[bot] avatar Jun 18 '25 12:06 github-actions[bot]

Thank you reporting this @gknispel-australdx.

To give some context here, WSL never "decides" to update itself. The only case where WSL triggers an update and when wsl --update is invoked.

In your case, the update was most likely trigger either by the store, and another program that depends on WSL.

Closing since the update is triggered by another program.

OneBlue avatar Jun 18 '25 22:06 OneBlue

Once completed please upload the output files to this Github issue.

Hi,

Could you send this feedback to the script developer: Please strip/anonymyze the Windows user name and Windows owner name from HKCU.txt and windows-version.txt files? I know Microsoft cares about user privacy, but this one might have slipped through accidentally.

Thanks.

mailinglists35 avatar Jun 26 '25 12:06 mailinglists35