microsoft / WSL

Issues found on WSL
https://docs.microsoft.com/windows/wsl
MIT License
17.45k stars 822 forks source link

WSL not opening well #9945

Open HossamAmer12 opened 1 year ago

HossamAmer12 commented 1 year ago

Windows Version

Windows 11 Enterprise 22H2

WSL Version

2

Are you using WSL 1 or WSL 2?

Kernel Version

No response

Distro Version

No response

Other Software

No response

Repro Steps

open wsl window

<3>WSL (10684) ERROR: CreateProcessParseCommon:786: Failed to translate C:\WINDOWS\system32 <3>WSL (10684) ERROR: UtilTranslatePathList:2652: Failed to translate C:\Program Files\WindowsApps\MicrosoftCorporationII.WindowsSubsystemForLinux_1.1.6.0_x64__8wekyb3d8bbwe <3>WSL (10684) ERROR: UtilTranslatePathList:2652: Failed to translate C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\wbin <3>WSL (10684) ERROR: UtilTranslatePathList:2652: Failed to translate C:\Program Files\Eclipse Adoptium\jdk-17.0.6.10-hotspot\bin <3>WSL (10684) ERROR: UtilTranslatePathList:2652: Failed to translate C:\WINDOWS\system32 <3>WSL (10684) ERROR: UtilTranslatePathList:2652: Failed to translate C:\WINDOWS <3>WSL (10684) ERROR: UtilTranslatePathList:2652: Failed to translate C:\WINDOWS\System32\Wbem <3>WSL (10684) ERROR: UtilTranslatePathList:2652: Failed to translate C:\WINDOWS\System32\WindowsPowerShell\v1.0\ <3>WSL (10684) ERROR: UtilTranslatePathList:2652: Failed to translate C:\WINDOWS\System32\OpenSSH\ <3>WSL (10684) ERROR: UtilTranslatePathList:2652: Failed to translate C:\Program Files (x86)\Bitvise SSH Client <3>WSL (10684) ERROR: UtilTranslatePathList:2652: Failed to translate C:\Program Files\PowerShell\7\ <3>WSL (10684) ERROR: UtilTranslatePathList:2652: Failed to translate C:\Users\hossamamer\AppData\Local\Programs\Python\Python310\Scripts\ <3>WSL (10684) ERROR: UtilTranslatePathList:2652: Failed to translate C:\Users\hossamamer\AppData\Local\Programs\Python\Python310\ <3>WSL (10684) ERROR: UtilTranslatePathList:2652: Failed to translate C:\Users\hossamamer\AppData\Local\Microsoft\WindowsApps <3>WSL (10684) ERROR: UtilTranslatePathList:2652: Failed to translate C:\Users\hossamamer\AppData\Local\Programs\Microsoft VS Code\bin <3>WSL (10684) ERROR: UtilTranslatePathList:2652: Failed to translate C:\Users\hossamamer\AppData\Local\Programs\EmEditor Welcome to Ubuntu 22.04.1 LTS (GNU/Linux 5.15.90.1-microsoft-standard-WSL2 x86_64) ### Expected Behavior Nothing happens no logs ### Actual Behavior <3>WSL (10684) ERROR: CreateProcessParseCommon:786: Failed to translate C:\WINDOWS\system32 <3>WSL (10684) ERROR: UtilTranslatePathList:2652: Failed to translate C:\Program Files\WindowsApps\MicrosoftCorporationII.WindowsSubsystemForLinux_1.1.6.0_x64__8wekyb3d8bbwe <3>WSL (10684) ERROR: UtilTranslatePathList:2652: Failed to translate C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\wbin <3>WSL (10684) ERROR: UtilTranslatePathList:2652: Failed to translate C:\Program Files\Eclipse Adoptium\jdk-17.0.6.10-hotspot\bin <3>WSL (10684) ERROR: UtilTranslatePathList:2652: Failed to translate C:\WINDOWS\system32 <3>WSL (10684) ERROR: UtilTranslatePathList:2652: Failed to translate C:\WINDOWS <3>WSL (10684) ERROR: UtilTranslatePathList:2652: Failed to translate C:\WINDOWS\System32\Wbem <3>WSL (10684) ERROR: UtilTranslatePathList:2652: Failed to translate C:\WINDOWS\System32\WindowsPowerShell\v1.0\ <3>WSL (10684) ERROR: UtilTranslatePathList:2652: Failed to translate C:\WINDOWS\System32\OpenSSH\ <3>WSL (10684) ERROR: UtilTranslatePathList:2652: Failed to translate C:\Program Files (x86)\Bitvise SSH Client <3>WSL (10684) ERROR: UtilTranslatePathList:2652: Failed to translate C:\Program Files\PowerShell\7\ <3>WSL (10684) ERROR: UtilTranslatePathList:2652: Failed to translate C:\Users\hossamamer\AppData\Local\Programs\Python\Python310\Scripts\ <3>WSL (10684) ERROR: UtilTranslatePathList:2652: Failed to translate C:\Users\hossamamer\AppData\Local\Programs\Python\Python310\ <3>WSL (10684) ERROR: UtilTranslatePathList:2652: Failed to translate C:\Users\hossamamer\AppData\Local\Microsoft\WindowsApps <3>WSL (10684) ERROR: UtilTranslatePathList:2652: Failed to translate C:\Users\hossamamer\AppData\Local\Programs\Microsoft VS Code\bin <3>WSL (10684) ERROR: UtilTranslatePathList:2652: Failed to translate C:\Users\hossamamer\AppData\Local\Programs\EmEditor Welcome to Ubuntu 22.04.1 LTS (GNU/Linux 5.15.90.1-microsoft-standard-WSL2 x86_64) ### Diagnostic Logs _No response_
simonlock commented 1 year ago

same for me

benhillis commented 1 year ago

/logs

microsoft-github-policy-service[bot] commented 1 year ago

Hello! Could you please provide more logs to help us better diagnose your issue?

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 scipt will output the path of the log file once done.

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

Click here for more info on logging

Thank you!

HossamAmer12 commented 1 year ago

I updated Windows and installed updates. Then, this thing suddenly disappeared

ecastro-capgemini commented 12 months ago

Summary of https://github.com/microsoft/vscode/issues/198285

As for WSL 2.0.9, when you use wsl.exe, you cannot use VSCode on WSL anymore. When you first use (after reboot) VSCode on WSL, you cannot use wsl.exe reliably (you get the infamous Failed to translate list of error messages).

ecastro-capgemini commented 12 months ago

It appears that Windows file system mount points are missing on the buggy wsl.exe sessions, hence the failed to translate error message.

In full functioning VSCode WSL Session, sudo mount -t drvfs d: /mnt/d works (given there is a D: disk), but it fails in wsl.exe session opend at the same time!

I guess that the drvfs subsystem cannot be shared by VSCode and wsl.exe. Et c'est bien dommage

ecastro-capgemini commented 12 months ago

wsl --shutdown does not help. To reset which one of VSCode or wsl.exe will gain correct behavior of drvfs, you need to reboot Windows

ecastro-capgemini commented 12 months ago

I have noted that:

I think that this is the root bug

ecastro-capgemini commented 10 months ago

Seems to be resolved by WSL 2.0.14

> wsl.exe --update