WSL icon indicating copy to clipboard operation
WSL copied to clipboard

Failing to translate all drives randomly.

Open StrixLake opened this issue 1 year ago • 11 comments

Windows Version

Microsoft Windows [Version 10.0.22631.4460]

WSL Version

2.3.26.0

Are you using WSL 1 or WSL 2?

  • [x] WSL 2
  • [ ] WSL 1

Kernel Version

5.15.167.4-1

Distro Version

No response

Other Software

No response

Repro Steps

Just starting WSL.

Expected Behavior

Windows directories should be available inside wsl and wsl should start without errors.

Actual Behavior

My PC only has C: and D: drive. Both never been changed, removed or renamed. Running dir inside wsl for c and d in /mnt prints nothing. Sometimes it happens randomly and just fixes itself randomly too. Here is the terminal output when starting wsl.

PS C:\Users\yasha> wsl <3>WSL (23) ERROR: CreateProcessParseCommon:763: Failed to translate C:\Users\yasha <3>WSL (23) ERROR: UtilTranslatePathList:2852: Failed to translate C:\Program Files\PowerShell\7 <3>WSL (23) ERROR: UtilTranslatePathList:2852: Failed to translate C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.6\bin
<3>WSL (23) ERROR: UtilTranslatePathList:2852: Failed to translate C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.6\libnvvp
<3>WSL (23) ERROR: UtilTranslatePathList:2852: Failed to translate C:\Windows\system32
<3>WSL (23) ERROR: UtilTranslatePathList:2852: Failed to translate C:\Windows <3>WSL (23) ERROR: UtilTranslatePathList:2852: Failed to translate C:\Windows\System32\Wbem
<3>WSL (23) ERROR: UtilTranslatePathList:2852: Failed to translate C:\Windows\System32\WindowsPowerShell\v1.0
<3>WSL (23) ERROR: UtilTranslatePathList:2852: Failed to translate C:\Windows\System32\OpenSSH
<3>WSL (23) ERROR: UtilTranslatePathList:2852: Failed to translate C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common
<3>WSL (23) ERROR: UtilTranslatePathList:2852: Failed to translate C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR
<3>WSL (23) ERROR: UtilTranslatePathList:2852: Failed to translate C:\Program Files\dotnet
<3>WSL (23) ERROR: UtilTranslatePathList:2852: Failed to translate C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit
<3>WSL (23) ERROR: UtilTranslatePathList:2852: Failed to translate C:\Program Files\NVIDIA Corporation\Nsight Compute 2024.3.2
<3>WSL (23) ERROR: UtilTranslatePathList:2852: Failed to translate C:\Program Files\PowerShell\7
<3>WSL (23) ERROR: UtilTranslatePathList:2852: Failed to translate C:\Users\yasha\AppData\Local\Microsoft\WindowsApps
<3>WSL (23) ERROR: UtilTranslatePathList:2852: Failed to translate C:\Users\yasha\AppData\Local\Programs\Microsoft VS Code\bin
<3>WSL (23) ERROR: UtilTranslatePathList:2852: Failed to translate C:\Users\yasha.dotnet\tools
<3>WSL (23) ERROR: UtilTranslatePathList:2852: Failed to translate C:\Users\yasha\AppData\Local\Microsoft\WinGet\Packages\Gyan.FFmpeg.Shared_Microsoft.Winget.Source_8wekyb3d8bbwe\ffmpeg-7.1-full_build-shared\bin <3>WSL (23) ERROR: UtilTranslatePathList:2852: Failed to translate C:\Users\yasha\AppData\Local\Programs\Microsoft VS Code\bin <3>WSL (23) ERROR: UtilTranslatePathList:2852: Failed to translate C:\Users\yasha\AppData\Local\Programs\Git\cmd [root@Zephyrus ~]#

Diagnostic Logs

No response

StrixLake avatar Nov 15 '24 05:11 StrixLake

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'.

View similar issues

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!

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

github-actions[bot] avatar Nov 15 '24 05:11 github-actions[bot]

Diagnostic information
Detected appx version: 2.3.26.0

github-actions[bot] avatar Nov 15 '24 05:11 github-actions[bot]

Update: This does not happen when starting wsl from admin terminal.

StrixLake avatar Nov 15 '24 05:11 StrixLake

Thank you for reporting this @StrixLake. Looking at the logs, I can see that WSL is getting access denied when trying to open the disks:

Microsoft.Windows.HyperV.Worker	FallbackError	11-14-2024 21:45:42.850	"	"	"wilResult: 
{
	callContext: 	
	currentContextId: 	0
	currentContextMessage: 	
	currentContextName: 	
	failureCount: 	1
	failureId: 	1
	failureType: 	0
	fileName: 	onecore\vm\dv\storage\plan9\dll\windows\p9fs.cpp
	function: 	
	hresult: 	0x80070005
	lineNumber: 	673
	message: 	
	module: 	vp9fs.dll
	originatingContextId: 	0
	originatingContextMessage: 	
	originatingContextName: 	
	threadId: 	12056
}"	onecore\vm\dv\storage\plan9\dll\windows\p9fs.cpp	673	 	20724	12056	2		00000000-0000-0000-0000-000000000000		

What permissions do you have on those disks ? Do you have any installed programs that could interface with WSL accessing those when non-elevated ?

OneBlue avatar Nov 15 '24 19:11 OneBlue

I did not change any permissions. For Drive C and D, admins have full control and users have read & execute, as seen from drive properties under security tab. I do not have any program installed, to my knowledge, that could interface with WSL accessing those drives. I did have docker desktop installed but I was having this problem before that as well and I have also uninstalled docker since and the problem still persists. I have also tried using different distros as well as uninstalling all distros and importing a tar ball.

Let me know if I can send you any other log file.

StrixLake avatar Nov 15 '24 20:11 StrixLake

Ok interesting. Could you share which permissions you have the drive's root folders ?

OneBlue avatar Nov 18 '24 19:11 OneBlue

All the folders in both the drives have same permissions for admins and users. Creator Owner and System don't have any permissions for C:\Windows, C:\Program files(x86) and C:\Program files but have full permissions for C:\Users and all folders in D:.

StrixLake avatar Nov 19 '24 00:11 StrixLake

Same issue here. We run BeyondTrust Privilege Management, so maybe there is an issue.

<3>WSL (286) ERROR: UtilTranslatePathList:2852: Failed to translate C:\WINDOWS\system32
<3>WSL (286) ERROR: UtilTranslatePathList:2852: Failed to translate C:\WINDOWS
<3>WSL (286) ERROR: UtilTranslatePathList:2852: Failed to translate C:\WINDOWS\System32\Wbem
<3>WSL (286) ERROR: UtilTranslatePathList:2852: Failed to translate C:\WINDOWS\System32\WindowsPowerShell\v1.0\
<3>WSL (286) ERROR: UtilTranslatePathList:2852: Failed to translate C:\WINDOWS\System32\OpenSSH\
<3>WSL (286) ERROR: UtilTranslatePathList:2852: Failed to translate C:\Program Files\dotnet\
<3>WSL (286) ERROR: UtilTranslatePathList:2852: Failed to translate C:\Program Files\Git\cmd
<3>WSL (286) ERROR: UtilTranslatePathList:2852: Failed to translate C:\Program Files\PowerShell\7\
<3>WSL (286) ERROR: UtilTranslatePathList:2852: Failed to translate C:\Program Files\Docker\Docker\resources\bin
<3>WSL (286) ERROR: UtilTranslatePathList:2852: Failed to translate C:\Users\<user>\AppData\Local\Microsoft\WindowsApps
<3>WSL (286) ERROR: UtilTranslatePathList:2852: Failed to translate C:\Users\<user>\AppData\Local\Programs\Microsoft VS Code\bin

jwefers avatar Jan 16 '25 08:01 jwefers

Update: This does not happen when starting wsl from admin terminal.

Same issue here, I'm connecting to the machine over ssh, and launching wsl as a standard user (no admin privileges).

$ ssh <user>@<addr>
$ gsudo --integrity Medium
$ gsudo status
Caller Pid: 14452
Running as:
  User: <host>\<user>
  Sid: S-1-5-21-2497331860-208642046-2092648152-1001
  Is Admin: False
  Integrity Level: Medium (8192)
  <...>
$ wsl
<3>WSL (401) ERROR: CreateProcessParseCommon:763: Failed to translate C:\Users\<user>
<3>WSL (401) ERROR: UtilTranslatePathList:2852: Failed to translate C:\Program Files\Microsoft\jdk-17.
0.13.11-hotspot\bin
<3>WSL (401) ERROR: UtilTranslatePathList:2852: Failed to translate C:\WINDOWS
<3>WSL (401) ERROR: UtilTranslatePathList:2852: Failed to translate C:\WINDOWS\system32
<...>
<3>WSL (401) ERROR: UtilTranslatePathList:2852: Failed to translate C:\Portables\local\rust\cargo\bin

But in the local machine, wsl works normally without privileges. I apologize if deemed unrelated.

WslLogs-2025-01-26_12-28-09.zip

Lucide avatar Jan 26 '25 11:01 Lucide

This same issue happened to me after installing curser with WSL server. Removing cursor environment variable from system path resolved it.

Illangasinghe avatar May 17 '25 07:05 Illangasinghe