WSL: "Failed to translate" errors in CreateProcessParseCommon and UtilTranslatePathList

Version

WSL version: 0.65.3.0 Kernel version: 5.15.57.1 WSLg version: 1.0.41 MSRDC version: 1.2.3213 Direct3D version: 1.601.0 DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp Windows version: 10.0.22000.856

WSL Version

  • WSL 2
  • WSL 1

Kernel Version

Linux version 4.4.0-22000-Microsoft (Microsoft@Microsoft.com) (gcc version 5.4.0 (GCC) ) #653-Microsoft Wed Apr 27 16:06:00 PST 2022

Distro Version

Debian 11

Other Software

A functioning JDK build/test setup

Repro Steps

make TEST='test/jdk/tools/launcher/ClassPathWildCard.sh' test

Expected Behavior

No WSL errors occur

Actual Behavior

The following occurs on stderr:

<3>WSL (206) ERROR: CreateProcessParseCommon:731: Failed to translate E:\Repositories\com.github\jdk\build\windows-x86_64-server-release\test-support\jtreg_test_jdk_tools_launcher_ClassPathWildCard_sh\scratch\0
<3>WSL (206) ERROR: UtilTranslatePathList:2509: Failed to translate e:\repositories\com.github\jdk\build\windows-x86_64-server-release\images\jdk
<3>WSL (206) ERROR: UtilTranslatePathList:2509: Failed to translate e:\repositories\com.github\jdk\build\windows-x86_64-server-release\images\jdk
<3>WSL (206) ERROR: UtilTranslatePathList:2509: Failed to translate E:\Repositories\com.github\jdk\test\jdk
<3>WSL (206) ERROR: UtilTranslatePathList:2509: Failed to translate e:\repositories\com.github\jdk\build\windows-x86_64-server-release\images\test\jdk\jtreg\native
sh: 0: Can't open /mnt/e/Repositories/com.github/jdk/test/jdk/tools/launcher/ClassPathWildCard.sh

Diagnostic Logs

strace-ff.zip WslLogs-2022-08-14_10-40-46.zip strace-no-ff.log

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 38

Most upvoted comments

@OneBlue

This issue still exists. I just updated WSL to the store version per the startup text recommendation in WSL. After this, my Ubuntu2004 installation now won’t mount /mnt/c or /mnt/d. Manaually attempting to mount them throws this message (the same one that’s found in dmesg).

mount -t drvfs c: /mnt/c/
<3>WSL (236) ERROR: MountWithRetry:306: mount(drvfs, /mnt/c, 9p, 0x00000000, cache=mmap,msize=262144,trans=virtio,aname=drvfs;path=c:;symlinkroot=/) failed: Invalid argument

This has broken my vscode integration as well and my entire development workflow depended on these translations being functional. Is there a workaround? I’ve tried several of the above methods in this thread.

As I mentioned in #4122:

I believe this also occurs when you have run wsl --update on an older Windows 10 installation (like 21H2). It apparently installs a Windows 11 WSL update which uses a different way of communication between host and WSL, so the drives cannot be mounted.

@mklueh I updated my comment, if you use

[automount]
enabled = false
root = /
options = `"metadata, mask=22`"
mountFsTab = true

you will see errors. This is a bug. Specifically, if you enabled=false under automount.

To give some context on this:

If the drives are not mounted, WSL cannot translate between Windows and Linux path. If that’s what you want, you can set:

[interop]
appendWindowsPath = false

in /etc/wsl.conf and the warnings will go away.

If automount is disabled but you have manual mounts in /etc/fstab, the distribution needs to restarted for path translation to work.

Closing since this should cover both scenarios.

My fairly old wsl2 setup also failed to mount the windows drives at some point. running wsl --update in a windows admin shell fixed the issue.

<3>WSL (70) ERROR: CreateProcessParseCommon:782: Failed to translate D:\Kali Linux UIUX <3>WSL (70) ERROR: UtilTranslatePathList:2671: Failed to translate D:\Programma\Java\bin <3>WSL (70) ERROR: UtilTranslatePathList:2671: Failed to translate D:\Fullter\src\bin <3>WSL (70) ERROR: UtilTranslatePathList:2671: Failed to translate D:\Fullter\flutter_windows_3.3.7-stable\flutter\bin <3>WSL (70) ERROR: UtilTranslatePathList:2671: Failed to translate D:\Fullter\flutter\bin <3>WSL (70) ERROR: UtilTranslatePathList:2671: Failed to translate D:\Programma\Vs Code\Microsoft VS Code\bin Failed to mount D:, see dmesg for more details.

┏━(Message from Kali developers) ┃ ┃ This is a minimal installation of Kali Linux, you likely ┃ want to install supplementary tools. Learn how: ┃ ⇒ https://www.kali.org/docs/troubleshooting/common-minimum-setup/ ┃ ┗━(Run: “touch ~/.hushlogin” to hide this message) ┌──(code-x13㉿WIN-6G2CFD61UB7)-[~]

<<WHAT IS MY D: >>

@flipkickmedia

The problem seems simple enough, where someone has setup their WSL installation using the app store, their fstab will not have the correct entries so any additional mounts added after will fail.

In my case I tried to get rid of the standard mounts so WSL can’t interfere with the actual Windows system. I believe I did nothing except for disabling the auto mounts. And I’m also not sure if I’ve installed it via Windows Store. At least none of the Ubuntu “Apps” in the store says “Installed already”

Im seeing this in WSL2 when attempting to unmount the WSL partition. I also had a BSOD during a termination/unregistration of a newly imported instance after an unmount.

The vhdx for this WSL instance is also in a none standard location.

C:\Users\tbmst>wsl --version
WSL version: 0.70.4.0
Kernel version: 5.15.68.1
WSLg version: 1.0.45
MSRDC version: 1.2.3575
Direct3D version: 1.606.4
DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows version: 10.0.22621.819
Start-Process "wsl" -ArgumentList "--distribution $wslInstanceName --user root umount -l /mnt/c 2>/dev/null; umount -l /c 2>/dev/null"  -Wait -NoNewWindow | Out-Null
....unmounting /mnt/c /c
<3>WSL (9) ERROR: CreateProcessParseCommon:779: Failed to translate C:\WINDOWS\system32
<3>WSL (9) ERROR: UtilTranslatePathList:2683: Failed to translate C:\Program Files (x86)\ActiveState Komodo IDE 12\
<3>WSL (9) ERROR: UtilTranslatePathList:2683: Failed to translate C:\webbin\python-3.10.2\Scripts\
<3>WSL (9) ERROR: UtilTranslatePathList:2683: Failed to translate C:\webbin\python-3.10.2\
<3>WSL (9) ERROR: UtilTranslatePathList:2683: Failed to translate C:\WINDOWS\system32
<3>WSL (9) ERROR: UtilTranslatePathList:2683: Failed to translate C:\WINDOWS

The ACL for C:\Windows\system32

PS C:\Users\tbmst> Get-Acl C:\Windows\system32 | Format-list

Path   : Microsoft.PowerShell.Core\FileSystem::C:\Windows\System32
Owner  : NT SERVICE\TrustedInstaller
Group  : NT SERVICE\TrustedInstaller
Access : CREATOR OWNER Allow  268435456
         NT AUTHORITY\SYSTEM Allow  268435456
         NT AUTHORITY\SYSTEM Allow  Modify, Synchronize
         BUILTIN\Administrators Allow  268435456
         BUILTIN\Administrators Allow  Modify, Synchronize
         BUILTIN\Users Allow  -1610612736
         BUILTIN\Users Allow  ReadAndExecute, Synchronize
         NT SERVICE\TrustedInstaller Allow  268435456
         NT SERVICE\TrustedInstaller Allow  FullControl
         APPLICATION PACKAGE AUTHORITY\ALL APPLICATION PACKAGES Allow  ReadAndExecute,
         Synchronize
         APPLICATION PACKAGE AUTHORITY\ALL APPLICATION PACKAGES Allow  -1610612736
         APPLICATION PACKAGE AUTHORITY\ALL RESTRICTED APP PACKAGES Allow  ReadAndExecute,
         Synchronize
         APPLICATION PACKAGE AUTHORITY\ALL RESTRICTED APP PACKAGES Allow  -1610612736
Audit  :
Sddl   : O:S-1-5-80-956008885-3418522649-1831038044-1853292631-2271478464G:S-1-5-80-95600888
         5-3418522649-1831038044-1853292631-2271478464D:PAI(A;OICIIO;GA;;;CO)(A;OICIIO;GA;;;
         SY)(A;;0x1301bf;;;SY)(A;OICIIO;GA;;;BA)(A;;0x1301bf;;;BA)(A;OICIIO;GXGR;;;BU)(A;;0x
         1200a9;;;BU)(A;CIIO;GA;;;S-1-5-80-956008885-3418522649-1831038044-1853292631-227147
         8464)(A;;FA;;;S-1-5-80-956008885-3418522649-1831038044-1853292631-2271478464)(A;;0x
         1200a9;;;AC)(A;OICIIO;GXGR;;;AC)(A;;0x1200a9;;;S-1-15-2-2)(A;OICIIO;GXGR;;;S-1-15-2
         -2)

And then again when logging into the WSL instance

PS C:\Users\tbmst> wsl --distribution cme-kinetic
<3>WSL (9) ERROR: CreateProcessParseCommon:779: Failed to translate C:\Users\tbmst
<3>WSL (9) ERROR: UtilTranslatePathList:2683: Failed to translate C:\Program Files\PowerShell\7
<3>WSL (9) ERROR: UtilTranslatePathList:2683: Failed to translate C:\Program Files (x86)\ActiveState Komodo IDE 12\
<3>WSL (9) ERROR: UtilTranslatePathList:2683: Failed to translate C:\webbin\python-3.10.2\Scripts\
<3>WSL (9) ERROR: UtilTranslatePathList:2683: Failed to translate C:\webbin\python-3.10.2\
<3>WSL (9) ERROR: UtilTranslatePathList:2683: Failed to translate C:\WINDOWS\system32
<3>WSL (9) ERROR: UtilTranslatePathList:2683: Failed to translate C:\WINDOWS
<3>WSL (9) ERROR: UtilTranslatePathList:2683: Failed to translate C:\WINDOWS\System32\Wbem
<3>WSL (9) ERROR: UtilTranslatePathList:2683: Failed to translate C:\WINDOWS\System32\WindowsPowerShell\v1.0\