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

"Failed to translate" errors in CreateProcessParseCommon and UtilTranslatePathList #8723

Closed
1 of 2 tasks
anthonyvdotbe opened this issue Aug 14, 2022 · 38 comments
Closed
1 of 2 tasks

Comments

@anthonyvdotbe
Copy link

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 ([email protected]) (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

@OneBlue
Copy link
Collaborator

OneBlue commented Aug 16, 2022

Thanks for reporting this @anthonyvdotbe.

What kind of folder is E:\Repositories\com.github\jdk ? Is it a symlink / reparse point ?

I'd be curious to see the output of Get-Acl :\Repositories\com.github\jdk\test\jdk | Format-list as well

@anthonyvdotbe
Copy link
Author

Thanks for reporting this @anthonyvdotbe.

Thanks for investigating.

What kind of folder is E:\Repositories\com.github\jdk ? Is it a symlink / reparse point ?

It's a regular folder. However, E: is a mounted BitLocker-encrypted .vhdx file, so that might play a role. And the .vhdx file itself is located in my user folder on C:, where C: is the BitLocker-encrypted system partition.

I'd be curious to see the output of Get-Acl :\Repositories\com.github\jdk\test\jdk | Format-list as well

(ETA is an Active Directory domain)

PS E:\> Get-Acl E:\Repositories\com.github\jdk\test\jdk | Format-list

Path   : Microsoft.PowerShell.Core\FileSystem::E:\Repositories\com.github\jdk\test\jdk
Owner  : ETA\VANELVEA
Group  : ETA\VANELVEA
Access : BUILTIN\Administrators Allow  FullControl
         BUILTIN\Administrators Allow  268435456
         NT AUTHORITY\SYSTEM Allow  FullControl
         NT AUTHORITY\SYSTEM Allow  268435456
         NT AUTHORITY\Authenticated Users Allow  Modify, Synchronize
         NT AUTHORITY\Authenticated Users Allow  -536805376
         BUILTIN\Users Allow  ReadAndExecute, Synchronize
         BUILTIN\Users Allow  -1610612736
Audit  :
Sddl   : O:S-1-12-1-837982814-1106714980-3376534193-400267843G:S-1-12-1-837982814-1106714980-3376534193-400267843D:(A;I
         D;FA;;;BA)(A;OICIIOID;GA;;;BA)(A;ID;FA;;;SY)(A;OICIIOID;GA;;;SY)(A;ID;0x1301bf;;;AU)(A;OICIIOID;SDGXGWGR;;;AU)
         (A;ID;0x1200a9;;;BU)(A;OICIIOID;GXGR;;;BU)

@ghost ghost removed the needs-author-feedback label Aug 17, 2022
@OneBlue
Copy link
Collaborator

OneBlue commented Sep 9, 2022

Thank you @anthonyvdotbe. Out of curiosity, do you see the same errors if you start wsl.exe as administrator ?

@anthonyvdotbe
Copy link
Author

@OneBlue I deleted my JDK setup because of all the BSODs I ran into (#8803 #8805 #8469), so I can't readily answer now. Having the mentioned BSOD issues resolved would help tremendously in providing exact reproduction steps for this issue as well.

@ghost ghost removed the needs-author-feedback label Sep 10, 2022
@flipkickmedia
Copy link

flipkickmedia commented Nov 14, 2022

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\

@OneBlue
Copy link
Collaborator

OneBlue commented Nov 14, 2022

/logs

@ghost
Copy link

ghost commented Nov 14, 2022

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!

@mklueh
Copy link

mklueh commented Nov 20, 2022

Facing the same problem with one of the latest updates.

What I did long before was preventing auto-mounts, because I don't want WSL to have access to my Windows directories

/etc/wsl.conf

[automount]
enabled=false
mountFsTab=true

stdout

<3>WSL (1300) ERROR: CreateProcessParseCommon:782: Failed to translate C:\WINDOWS\system32
<3>WSL (1300) ERROR: UtilTranslatePathList:2671: Failed to translate C:\tools\ruby31\bin
<3>WSL (1300) ERROR: UtilTranslatePathList:2671: Failed to translate C:\Python27\
<3>WSL (1300) ERROR: UtilTranslatePathList:2671: Failed to translate C:\Python27\Scripts
<3>WSL (1300) ERROR: UtilTranslatePathList:2671: Failed to translate C:\Program Files\nodejs\default
<3>WSL (1300) ERROR: UtilTranslatePathList:2671: Failed to translate C:\Program Files\nodejs
<3>WSL (1300) ERROR: UtilTranslatePathList:2671: Failed to translate C:\Windows\system32
<3>WSL (1300) ERROR: UtilTranslatePathList:2671: Failed to translate C:\Windows
<3>WSL (1300) ERROR: UtilTranslatePathList:2671: Failed to translate C:\Windows\System32\Wbem
<3>WSL (1300) ERROR: UtilTranslatePathList:2671: Failed to translate C:\Windows\System32\WindowsPowerShell\v1.0\
<3>WSL (1300) ERROR: UtilTranslatePathList:2671: Failed to translate C:\Windows\System32\OpenSSH\
<3>WSL (1300) ERROR: UtilTranslatePathList:2671: Failed to translate C:\ProgramData\chocolatey\bin
<3>WSL (1300) ERROR: UtilTranslatePathList:2671: Failed to translate C:\Users\MyUser\AppData\Roaming\Python\Python37\Scripts
<3>WSL (1300) ERROR: UtilTranslatePathList:2671: Failed to translate C:\Users\MyUser\AppData\Local\Programs\Python\Python37-32\Scripts\
<3>WSL (1300) ERROR: UtilTranslatePathList:2671: Failed to translate C:\Users\MyUser\AppData\Local\Programs\Python\Python37-32\
<3>WSL (1300) ERROR: UtilTranslatePathList:2671: Failed to translate C:\Users\MyUser\AppData\Local\Microsoft\WindowsApps
<3>WSL (1300) ERROR: UtilTranslatePathList:2671: Failed to translate C:\WINDOWS\system32
<3>WSL (1300) ERROR: UtilTranslatePathList:2671: Failed to translate C:\WINDOWS

@OneBlue
Copy link
Collaborator

OneBlue commented Nov 21, 2022

Thank you @mklueh. Can you share the content of /etc/fstab ?

@flipkickmedia
Copy link

flipkickmedia commented Nov 21, 2022

FWIW this fstab works ok without errors being rendered

LABEL=cloudimg-rootfs   /       ext4    discard,errors=remount-ro 0 1
C: /c drvfs defaults,rw,noatime,dirsync,uid=1000,gid=130,mmap,access=client,msize=262144,trans=virtio,case=off 0 1
C:/Users/tbmst/.cme  /home/tshaw/.cme drvfs defaults,rw,noatime,dirsync,uid=1000,gid=130,mmap,access=client,msize=262144,trans=virtio,case=off 0 1

@OneBlue
Copy link
Collaborator

OneBlue commented Nov 21, 2022

Interesting. Does this reproduce all the time when you open WSL ?

Does starting WSL as administrator / non administrator make a difference ?

@flipkickmedia
Copy link

flipkickmedia commented Nov 21, 2022

Starting wsl as a normal/admin user makes no difference.

I only get these errors whilst I'm setting up the WSL instance. I'm about to do another iteration on the setup script so when I get there I'll post all the logs etc you asked for originally.

@OneBlue
Copy link
Collaborator

OneBlue commented Nov 21, 2022

Oh I see. In that case, it's expected (since until the instance has been restarted, the fstab will not be mounted and so init will fail to translate the Windows path, which explains the warnings).

@flipkickmedia
Copy link

So in this case, after downloading the rootfs, importing it then launching it is where the errors show. I'm sure you're correct but do you think these errors are valid and should be shown?

@mklueh
Copy link

mklueh commented Nov 21, 2022

@OneBlue

/etc/fstab: LABEL=cloudimg-rootfs / ext4 defaults 0 1

But why did this not happen some versions before and just appeared recently? Is there any good reason to show those errors every time now?

@flipkickmedia
Copy link

@mklueh this started happening for me after installing the wsl feature from the app store on a h22 upgraded Windows 11

@mishka81
Copy link

mishka81 commented Nov 22, 2022

Same errors everytime I log in my ubuntu 20.04 instance

PS C:\Users\ms> wsl --version
WSL version: 1.0.0.0
Kernel version: 5.15.74.2
WSLg version: 1.0.47
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.22000.1219`

This appeared after upgrading my "inbox" WSL (kernel version 5.10.102 ) to the Microsoft Store version

@flipkickmedia
Copy link

flipkickmedia commented Nov 22, 2022

I've gotten to the bottom of the issues I was having. This relates to the /etc/fstab failing to have the correct entries after you import the rootfs.

$targetPath="c:\somepathforwslinstance"
$tarGzPath="C:\users\tshaw\Documents\ubuntu-kinetic-wsl-amd64-wsl.rootfs.tar.gz"
$instanceName="testWSL"
wsl --import $instanceName "$targetPath" "${tarGzPath}"
*** do not stop this process or you will hang the WSL subsystem ***
Import in progress, this may take a few minutes.
The operation completed successfully.
wsl --distribution wslTest

No errors.

$ cat /etc/fstab
# UNCONFIGURED FSTAB FOR BASE SYSTEM

So after the import, everything is ok apart from the empty fstab. Let's clear the fstab..

$ echo -e "" >/etc/fstab
$ exit
wsl --distribution testWSL

No errors

$ mount
---8< snip----
drvfs on /mnt/c type 9p (rw,noatime,dirsync,aname=drvfs;path=C:\;uid=0;gid=0;symlinkroot=/mnt/,mmap,access=client,msize=262144,trans=virtio)

So we can see our C: drive mounted despite it not being listed in /etc/fstab.

$ ls /etc/wsl.conf
ls: cannot access '/etc/wsl.conf': No such file or directory

/etc/wsl.conf and .wslconfig do not exist.

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

Id prefer to see an fstab which matches the mounts. I cannot presume to know how /mnt/c is being mounted.

So lets add something into fstab...

$ cat /etc/fstab
LABEL=cloudimg-rootfs   /       ext4    discard,errors=remount-ro 0 1

$ exit

Still no errors.

$ mount
---8< snip ---
drvfs on /mnt/c type 9p (rw,noatime,dirsync,aname=drvfs;path=C:\;uid=0;gid=0;symlinkroot=/mnt/,mmap,access=client,msize=262144,trans=virtio)

So lets add something into /etc/wsl.conf

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

shutdown, load wsl...

<3>WSL (9) ERROR: CreateProcessParseCommon:782: Failed to translate C:\Users\tbmst
<3>WSL (9) ERROR: UtilTranslatePathList:2671: Failed to translate C:\Program Files\Python310\Scripts\
<3>WSL (9) ERROR: UtilTranslatePathList:2671: Failed to translate C:\Program Files\Python310\
<3>WSL (9) ERROR: UtilTranslatePathList:2671: Failed to translate C:\Windows\System32
<3>WSL (9) ERROR: UtilTranslatePathList:2671: Failed to translate C:\Windows
...etc...

adding an interop into /etc/wsl.conf

[interop]
appendWindowsPath = false

This removes most of the errors. The only ones that are left are:

<3>WSL (9) ERROR: CreateProcessParseCommon:782: Failed to translate C:\Users\tbmst
<3>WSL (9) ERROR: CreateProcessEntryCommon:345: getpwnam(tshaw) failed 0

Conclusion

The WSL install from the app store despite explicitly not mounting C: will show errors. I would expect that the wsl.conf is honored when mountFsTab=true and enabled=false and that seems to be where the problem is.

@mklueh
Copy link

mklueh commented Nov 22, 2022

@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"

@flipkickmedia
Copy link

flipkickmedia commented Nov 22, 2022

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

@flipkickmedia
Copy link

flipkickmedia commented Nov 22, 2022

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"

I did the same thing but in my case, the rootfs I imported under the "old" WSL, still works without errors. The newly created instance done using the WSL store version has these problems.

@OneBlue
Copy link
Collaborator

OneBlue commented Nov 24, 2022

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

@OneBlue OneBlue closed this as completed Nov 24, 2022
@flipkickmedia
Copy link

flipkickmedia commented Nov 24, 2022

@OneBlue You still get errors with the setup you provided. This needs to be reopened.

/etc/fstab

#empty

/etc/wsl.conf

[automount]
enabled = false
root = /
options = metadata, mask=22
mountFsTab = true
[network]
generateHosts = true
generateResolvConf = true
[user]
default = tshaw
[interop]
appendWindowsPath = false
enabled = false

C:\Users\tbmst>wsl --distribution cme-kinetic

<3>WSL (9) ERROR: CreateProcessParseCommon:782: Failed to translate C:\Users\tbmst
<3>WSL (9) ERROR: CreateProcessEntryCommon:345: getpwnam(tshaw) failed 0

Where is C:\Users\tbmst path being required in the WSL instance? This is a fresh imported rootfs.

WslLogs-2022-11-24_15-12-29.zip

@bekacodex
Copy link

<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)-[
]

<>

@protella
Copy link

protella commented Dec 16, 2022

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

@flipkickmedia
Copy link

The other thread at #9167 was closed as well.

....completely ignoring any sort of actual development QA process.

In short, there is now an additional dependency that you MUST have an instance of your C: drive mounted in order for WSL to work without errors being shown which is completely undocumented, goes against the documentation for the WSL flags.

@OneBlue please reopen this.

@protella
Copy link

I Uninstalled the store app version until this is addressed. Luckily this allowed wsl to revert to the previous version and everything works again.

Side note, I also attempted to install a fresh distribution and the issue persists there as well. How can this clear QA? It has to have broken things for many users.

@flipkickmedia did you have any details of your work around of having the C: mounted as you mentioned? Are you referring to using the external wsl mount command?

@flipkickmedia
Copy link

I Uninstalled the store app version until this is addressed. Luckily this allowed wsl to revert to the previous version and everything works again.

Side note, I also attempted to install a fresh distribution and the issue persists there as well. How can this clear QA? It has to have broken things for many users.

@flipkickmedia did you have any details of your work around of having the C: mounted as you mentioned? Are you referring to using the external wsl mount command?

Unfortunately not :(

It seems that with this version of WSL, after trying every possible combination of mounts, flags, etc it all still fails. However....if you build a WSL instance, using the old version, then upgrade your WSL, this runs without issue and you don't see the errors.

If you distribute the vhdx file used to build the WSL instance, and import it (details below) you can work round these issues.

On a side note, if you do happen to have a machine with the old version on, create a new WSL instance without the changes and compare the two that might provide some sort of solution whilst Microsoft closes some more tickets without actually fixing the problem.

@OneBlue
Copy link
Collaborator

OneBlue commented Dec 20, 2022

@OneBlue You still get errors with the setup you provided. This needs to be reopened.

/etc/fstab

#empty

/etc/wsl.conf

[automount]
enabled = false
root = /
options = metadata, mask=22
mountFsTab = true
[network]
generateHosts = true
generateResolvConf = true
[user]
default = tshaw
[interop]
appendWindowsPath = false
enabled = false

C:\Users\tbmst>wsl --distribution cme-kinetic

<3>WSL (9) ERROR: CreateProcessParseCommon:782: Failed to translate C:\Users\tbmst
<3>WSL (9) ERROR: CreateProcessEntryCommon:345: getpwnam(tshaw) failed 0

Where is C:\Users\tbmst path being required in the WSL instance? This is a fresh imported rootfs.

WslLogs-2022-11-24_15-12-29.zip

@flipkickmedia: Looking at the logs, it looks like there is something wrong with you /etc/passwd file. Can you share its content ?

This is clearly a different problem than the one this issue was created on so please open a new issue to track this

@Sebazzz
Copy link

Sebazzz commented Feb 10, 2023

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.

@protella
Copy link

protella commented Mar 4, 2023

For anyone still experiencing this issue, I seem to have figured out why it was occurring for me. As I was migrating my distro to a new laptop, I copied over my .wslconfig in my windows profile root directory. Apparently I didn't initially copy over a custom kernel image that I was using on the old machine and things had been working fine until then on the new laptop. I went back and copied down that image (bzImage2 for me) and then as soon as i did a wsl --shutdown and restarted my distro, these errors returned. I commented out the # kernel=C:\\Users\\myuser\\bzImage2 line in .wslconfig and all was well again. I had forgotten I'd done this a while back. Apparently using the old kernel is what broke this after later updates to WSL and how it handles mounts.

@Dweeberly
Copy link

Dweeberly commented Mar 8, 2023

I haven't had time to dig into this, but will report I too am seeing this problem after an update to wsl:

<3>WSL (7916) ERROR: UtilTranslatePathList:2721: Failed to translate \\xxx\public\dnt\tools
<3>WSL (7916) ERROR: UtilTranslatePathList:2721: Failed to translate \\xxx\public\dnt\tools\inetW7\bin
Sleeping for 1 second to let systemd settle
Welcome to Ubuntu 20.04.5 LTS (GNU/Linux 5.15.90.1-microsoft-standard-WSL2 x86_64)

\xxx is a LAN share, that contains nothing I would have ever intentionally associated with WSL (they contain private windows utilities). This is the first thing output (above the "systemd settle" message). They are in the PATH (exe search path) of the hosting environment, but other than that they are not attached/mounted on the host (for example psdrive doesn't show them). Nor are they mentioned in the WSL session's /etc/ftab (nor any /etc/*.conf, I grep for it, nor any $HOME files). Does WSL do anything with the host search path before/during starting an instance?

Note that I read @Sebazzz comment above and this seems to be the case, in that this is a Win10 19044 host, am I seen a new .systemd-env file in my home directory which as a "WAYLAND_DISPLAY" setting. In this case WSL is working and a --shutdown doesn't change anything. Perhaps some Win10/WSL snafu.

@devindang
Copy link

I haven't had time to dig into this, but will report I too am seeing this problem after an update to wsl:

<3>WSL (7916) ERROR: UtilTranslatePathList:2721: Failed to translate \\xxx\public\dnt\tools
<3>WSL (7916) ERROR: UtilTranslatePathList:2721: Failed to translate \\xxx\public\dnt\tools\inetW7\bin
Sleeping for 1 second to let systemd settle
Welcome to Ubuntu 20.04.5 LTS (GNU/Linux 5.15.90.1-microsoft-standard-WSL2 x86_64)

\xxx is a LAN share, that contains nothing I would have ever intentionally associated with WSL (they contain private windows utilities). This is the first thing output (above the "systemd settle" message). They are in the PATH (exe search path) of the hosting environment, but other than that they are not attached/mounted on the host (for example psdrive doesn't show them). Nor are they mentioned in the WSL session's /etc/ftab (nor any /etc/*.conf, I grep for it, nor any $HOME files). Does WSL do anything with the host search path before/during starting an instance?

Note that I read @Sebazzz comment above and this seems to be the case, in that this is a Win10 19044 host, am I seen a new .systemd-env file in my home directory which as a "WAYLAND_DISPLAY" setting. In this case WSL is working and a --shutdown doesn't change anything. Perhaps some Win10/WSL snafu.

Thanks, after deleted invalid ENVIRONMENT, and execute wsl --shutdown, it disappeared.

@bytemarcz
Copy link

bytemarcz commented Apr 13, 2023

After performing a wsl--shutdown this got rid of some problems, I'm still seeing the following though:

<3>WSL (143) ERROR: CreateProcessParseCommon:789: Failed to translate \\wsl.localhost\Ubuntu\home\marzamor start-stop-daemon: wsl-vpnkit is already running

Not sure how or why. All that I do know is that I started to see these problems after running wsl --update because I was trying to install and run an app on WSL Linux. Actually, that app didn't work... unfortunately but somehow now that I updated I ran into all these issues. Some of the initial issues have to deal with mounting C: drive. Again, performing a simple wsl --shutdown and relaunching appears to help but still can't find an explanation as to why this error comes up.

If someone could provide me some context as to why these issues happened, timelines on fix, or any other details that would be appreciated. Just more or less hurts the developers lifecycle and workflow especially if we have work to get done. Make's things really unreliable.

WSL version: 1.2.0.0 Kernel version: 5.15.90.1 WSLg version: 1.0.51 MSRDC version: 1.2.3770 Direct3D version: 1.608.2-61064218 DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp Windows version: 10.0.19044.2728

@Dweeberly
Copy link

Dweeberly commented Apr 13, 2023

@maczamora Sorry to hear that. I have a very similar problem. This ticket and, best I found as of March, all other tickets like this have been closed.

Best solution I've come up with, imperfect as it is, is to simply not allow distributions running under WSL to process your Windows PATH variable. The "passthru" execution was a nice feature but to me not enough to put up with the annoying messages.

To disable it you need to change your distributions /etc/wsl.conf file to include the following:

[interop]
appendWindowsPath = false

See this documentation: https://learn.microsoft.com/en-us/windows/wsl/wsl-config#wslconf

If you really need to access a Windows program from WSL, just add it to your PATH in your login profile.

@ajaxStardust
Copy link

ajaxStardust commented Apr 15, 2023

After performing a wsl--shutdown this got rid of some problems, I'm still seeing the following though:

I too was experiencing this problem

I believe it's worth nothing that the paths reported in the stdout in my situation are the same as in my windows sytem %PATH% environment variable.

After wsl --shutdown / wsl -t Distroname
i reopened the WSL terminal directly w/ admin privs, and did not experience the issue any longer. i have not restarted my system.

WslLogs-2023-04-15_01-52-53.zip

@maribox
Copy link

maribox commented May 28, 2023

I also have this issue.
When I try to open wsl from the mapped network drive, e.g. in Z:\Studium I get:
<3>WSL (403) ERROR: CreateProcessParseCommon:789: Failed to translate Z:\Studium
If I start it in %userprofile% and cd into the folder, though, it works:

ll /mnt/z/studium
total 16K
drwxr-xr-x 2 root root   0 Sep  5  2022 'Semester 1'
...

My fstab:

LABEL=cloudimg-rootfs   /       ext4    discard,errors=remount-ro 0 1
//192.168.0.42/data /mnt/z cifs defaults,credentials=/etc/smbcredentials,vers=3.0 0 0

My wsl.conf:

[automount]
enabled = true
mountFsTab = true
[boot]
systemd=true

My current workaround for this is to create a symbolic link to the network share in Windows and then start wsl from there. Not ideal, but works:
I created the symbolic link %userprofile%\Documents\Studium -> Z:\Studium

~/Documents/Studium/Semester 4 
> wsl
wslname at pcname in /mnt/z/Studium/Semester 4
>

@edannenberg
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests