microsoft / WSL

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

WSL (11) ERROR: UtilTranslatePathList:2671: Failed to translate #9360

Closed Newbie012 closed 1 year ago

Newbie012 commented 1 year ago

Version

Microsoft Windows [Version 10.0.22000.1335]

WSL Version

Kernel Version

5.15.79.1-microsoft-standard-WSL2

Distro Version

Release: 20.04

Other Software

Visual Studio Code (1.74.1)

Repro Steps

  1. PS C:\Users\user> wsl.exe --update
  2. Open ubuntu terminal
  3. Get the following output:
<3>WSL (4564) ERROR: UtilTranslatePathList:2671: Failed to translate F:\Users\Eliya\AppData\Local\Programs\Microsoft VS Code\bin
➜  ~

I'm sorry for the poor reproduction steps, it just happened when I ran wsl.exe --update

Expected Behavior

Should not throw an error.

Actual Behavior

Getting <3>WSL (11) ERROR: UtilTranslatePathList:2671: Failed to translate F:\Users\Eliya\AppData\Local\Programs\Microsoft VS Code\bin every time I open a terminal

Diagnostic Logs

Let me know about any information I need to supply.

qdm12 commented 1 year ago

~Got the same translation error <3>WSL (53) ERROR: UtilTranslatePathList:2671: Failed to translate E:\SomePath\ when trying to open a folder in WSL using VSCode.~

EDIT: Actually the error was because E: did not exist on that machine.

Newbie012 commented 1 year ago

@qdm12 and it seems like F does not exist in my machine as well. Is it hardcoded somewhere?

qdm12 commented 1 year ago

It's in my PATH environnement variable defined on Windows. Maybe WSL should just ignore non existant path values ?

Newbie012 commented 1 year ago

Thanks for the tip! although it looks like even after I remove that path and restart WSL, the error persists.

qdm12 commented 1 year ago

Did you close and re-open your shell/terminal? Such that the environment variables get reloaded. Otherwise try a reboot?

Newbie012 commented 1 year ago

@qdm12 Problem solved. Restarting the shell seems to do the trick. Thanks!

romaluca commented 1 year ago

Hi, I have the same problem. I tried to restart the shell and reboot but the problem persists

<3>WSL (723) ERROR: UtilTranslatePathList:2671: Failed to translate Z:\home\gianni\dev\gettse
WinSSitaly commented 1 year ago

I had

<3>WSL (9) ERROR: UtilTranslatePathList:2671: Failed to translate F:\DATI\platform-tools I was fixing it set path | findstr platform-tools inside it find a ... ;F:\DATI\platform-tools; ... so check envinronment variables follow instruction on this link https://docs.oracle.com/en/database/oracle/machine-learning/oml4r/1.5.1/oread/creating-and-modifying-environment-variables-on-windows.html delete the line error or correct it with the correct path in my situation my drive was E: after correct it i fix that error/warning
yaaawww commented 1 year ago

cool, just the path environment variable in windows, just delete it in your windows.

PennRobotics commented 1 year ago

My organization adds network drives to Path via HKCU/Volatile Environment, so I'm not able to remove via the environmental variable to fix this issue. Instead, as @protella mentioned in another issue, I removed Windows Subsystem for Linux via "Apps & features", which reverted to the previous version and removed the error.

huettenhain commented 1 year ago

I have the same issue for a subst drive. I suspect that this might be a way to reproduce the issue; create an entry in

HKLM:SYSTEM\CurrentControlSet\Control\Session Manager\DOS Devices

to subst any path to a new drive name, reboot the device, and launch the WSL prompt.

PennRobotics commented 1 year ago

I had a mystery error where WSL was terminating immediately on startup regardless of wsl.exe flags, and updating to WSL through the Store fixed it, so now I'm stuck needing to fix the UtilTranslatePathList problem.

The error (caused by SMB network drives being added to PATH thru Volatile Environment at login) gets resolved by appending this section to wsl.conf:

[interop]
appendWindowsPath=false
sg552 commented 1 year ago

I met the same problem~ The root cause is D: does not exists when you started windows .

How to recur this issue:

  1. stop PC
  2. power off the mobile hard disk ( which is D: in my PC)
  3. restart PC, into windows ( there are some PATH variable in my windows )
  4. power up the mobile hard disk
  5. start WSL, I found the error message

solution: make sure all the PATH are available and then restart wsl.

$ wsl --shutdown $ wsl

arun07as commented 1 year ago

I had encountered a similar issue, but in my case, I was getting this error for all windows paths such as C:\Windows\System32.

Simply restarting the terminal did not work for me.

Restarting wsl seemed to fix it for me ( run wsl --shutdown in PowerShell and then reopen your wsl terminal )

silverham commented 1 year ago

I had same error, seems due to my work's antivirus software Symantec Endpoint Protection, A workaround was to install Ubuntu WSL from the windows store and run via "ubuntu.exe" in the start menu.

RufusJWB commented 1 year ago

I had a mystery error where WSL was terminating immediately on startup regardless of wsl.exe flags, and updating to WSL through the Store fixed it, so now I'm stuck needing to fix the UtilTranslatePathList problem.

The error (caused by SMB network drives being added to PATH thru Volatile Environment at login) gets resolved by appending this section to wsl.conf:

[interop]
appendWindowsPath=false

Thank you very much. This solved the problem for me!

MatrixC7 commented 1 year ago

I had a mystery error where WSL was terminating immediately on startup regardless of wsl.exe flags, and updating to WSL through the Store fixed it, so now I'm stuck needing to fix the UtilTranslatePathList problem.

The error (caused by SMB network drives being added to PATH thru Volatile Environment at login) gets resolved by appending this section to wsl.conf:

[interop]
appendWindowsPath=false

It works and here is a simple one-line command for adding that to the end of wsl.conf!

echo -e "[interop]\nappendWindowsPath = false" | sudo tee -a /etc/wsl.conf
imranpollob commented 1 year ago

Remove the environment variable that causing the problem. Check the user variable and system variable paths. Then reopen the terminal. If you use appendWindowsPath=false then you will lose the ability to call the programs defined in system variable. In my case vscode's code keyword stopped working. So, I reverted that.

CHerSun commented 1 year ago

Remove the environment variable that causing the problem. Check the user variable and system variable paths. Then reopen the terminal. If you use appendWindowsPath=false then you will lose the ability to call the programs defined in system variable. In my case vscode's code keyword stopped working. So, I reverted that.

problem is - I do need a PATH to remote share, mounted as Z, in Windows. While WSL dislikes that.

felpsg commented 11 months ago
  1. The issue arises from the Windows and WSL environment path variables conflicting or the WSL attempting to access unavailable paths.
  2. A solution is to prevent WSL from appending the Windows PATH to the WSL PATH.
  3. To implement this solution, you need to edit the wsl.conf file located in the /etc/ directory in your WSL instance.
  4. Add the following lines to the wsl.conf file:

[interop] appendWindowsPath=false

antgustech commented 10 months ago

I have used WSL for some time. After a reboot today, I got these errors and I can no longer use my C disk

wsl: A localhost proxy configuration was detected but not mirrored into WSL. WSL in NAT mode does not support localhost proxies.
<3>WSL (649) ERROR: UtilTranslatePathList:2853: Failed to translate C:\Program Files\Eclipse Adoptium\jdk-11.0.20.101-hotspot\bin
<3>WSL (649) ERROR: UtilTranslatePathList:2853: Failed to translate C:\Windows\system32
<3>WSL (649) ERROR: UtilTranslatePathList:2853: Failed to translate C:\Windows
<3>WSL (649) ERROR: UtilTranslatePathList:2853: Failed to translate C:\Windows\System32\Wbem
<3>WSL (649) ERROR: UtilTranslatePathList:2853: Failed to translate C:\Windows\System32\WindowsPowerShell\v1.0\
...
<3>WSL (649) ERROR: CreateProcessEntryCommon:493: chdir(/mnt/c/winworkspace) failed 2
-bash: /mnt/c/Windows/System32/wsl.exe: No such file or directory

It seems that my C drive is no longer mounted.

mount -l | grep drvfs Shows nothing. df -h Does not show my C drive

I have tried mounting it with sudo mount -t drvfs C: /mnt/c/ But it fails with:

<4>WSL (715) WARNING: mount: waiting for virtio device drvfs
<3>WSL (715) ERROR: MountWithRetry:307: mount(drvfs, /mnt/c, 9p, 0x00000000, cache=mmap,msize=262144,trans=virtio,aname=drvfs;path=C:;symlinkroot=/mnt/) failed: No such file or directory

How can I solve this? My C drive works just fine in windows as usual.

WinSSitaly commented 10 months ago

check if c is a subfolder of mnt ls /mnt

if present check if empty or what is inside you can try to delete the folder c not what is inside

if not present cd /mnt sudo makedir c sudo mount -t drvfs C: /mnt/c/

or try to create a different folder in mount cd /mnt sudo makedir myfolder then try to mount in that folder sudo mount -t drvfs C: /mnt/myfolder/

antgustech commented 10 months ago

check if c is a subfolder of mnt ls /mnt

if present check if empty or what is inside you can try to delete the folder c not what is inside

if not present cd /mnt sudo makedir c sudo mount -t drvfs C: /mnt/c/

or try to create a different folder in mount cd /mnt sudo makedir myfolder then try to mount in that folder sudo mount -t drvfs C: /mnt/myfolder/

ls /mnt

Does show c but it looks empty. I tried deleting it and creating a new c directory and mounting but I still get:

WSL at   angu2023-11-14 13:18:23  /mnt   
➜ sudo mkdir c
WSL at   angu2023-11-14 13:18:32  /mnt   
➜ ls
c  wsl  wslg
WSL at   angu2023-11-14 13:18:33  /mnt   
➜ sudo mount -t drvfs C: /mnt/c/
<4>WSL (1602) WARNING: mount: waiting for virtio device drvfs
<3>WSL (1602) ERROR: MountWithRetry:307: mount(drvfs, /mnt/c, 9p, 0x00000000, cache=mmap,msize=262144,trans=virtio,aname=drvfs;path=C:;symlinkroot=/mnt/) failed: No such file or directory

Creating a new directory with a different name also gives the same result sadly.

A colleague of mine also reported having the same issue as me after a reboot today.

WinSSitaly commented 10 months ago

uname -a in windows wsl -version ver

antgustech commented 10 months ago

uname -a in windows wsl -version ver

Linux DESKTOP-XXXXX 5.15.133.1-microsoft-standard-WSL2 #1 SMP Thu Oct 5 21:02:42 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

WSL version: 2.0.9.0
Kernel version: 5.15.133.1-1
WSLg version: 1.0.59
MSRDC version: 1.2.4677
Direct3D version: 1.611.1-81528511
DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows version: 10.0.22621.2428
Throne3d commented 10 months ago

I had what was likely this same issue just now, and the related potential resolutions I found didn't seem to solve the issue:

I believe this started after upgrading to Windows 23H2, and happened on both 2.0.8 and 2.0.9. I tried uninstalling WSL entirely (deregistering the distro, removing the distro + WSL items from Windows Programs, removing the optional feature, rebooting, and then re-running wsl --install) but it showed the same issue on a fresh install of Ubuntu, weirdly enough.

I think this is the relevant part of dmesg when the issue presents itself (for C:), which seems to match with several other threads I've seen about mounting issues, but doesn't seem to explain this specific issue:

[    2.995549] /usr/bin/wslpath:
[    2.995555] C:\Users\EdwardJones

[    3.002935] [13:03:50.670] <3>WSLGd: LogException:75:
[    3.002948] Exception: Invalid argument @../main.cpp:117 (TranslateWindowsPath)

[    3.137008] 9pnet_virtio: no channels available for device drvfs
[    3.143810] WSL (2) WARNING: mount: waiting for virtio device drvfs
[    3.246239] 9pnet_virtio: no channels available for device drvfs
[    3.347613] 9pnet_virtio: no channels available for device drvfs
[    3.450334] 9pnet_virtio: no channels available for device drvfs
[    3.552722] 9pnet_virtio: no channels available for device drvfs
[    3.655365] 9pnet_virtio: no channels available for device drvfs
[    3.758037] 9pnet_virtio: no channels available for device drvfs
[    3.860596] 9pnet_virtio: no channels available for device drvfs
[    3.962834] 9pnet_virtio: no channels available for device drvfs
[    4.065597] 9pnet_virtio: no channels available for device drvfs
[    4.167849] 9pnet_virtio: no channels available for device drvfs
[    4.271759] 9pnet_virtio: no channels available for device drvfs
[    4.373593] 9pnet_virtio: no channels available for device drvfs
[    4.475863] 9pnet_virtio: no channels available for device drvfs
[    4.578869] 9pnet_virtio: no channels available for device drvfs
[    4.681303] 9pnet_virtio: no channels available for device drvfs
[    4.784107] 9pnet_virtio: no channels available for device drvfs
[    4.889478] 9pnet_virtio: no channels available for device drvfs
[    4.992848] 9pnet_virtio: no channels available for device drvfs
[    5.095910] 9pnet_virtio: no channels available for device drvfs
[    5.198619] 9pnet_virtio: no channels available for device drvfs
[    5.201325] WSL (2) ERROR: MountWithRetry:307: mount(drvfs, /mnt/c, 9p, 0x00000400, cache=mmap,msize=262144,trans=virtio,aname=drvfs;path=C:\;uid=1000;gid=1000;symlinkroot=/mnt/

Similarly, when trying to manually mount the drive, I get a "No such file or directory" error, even though /mnt/c still exists:

$ sudo mount -t drvfs C: /mnt/c
<4>WSL (588) WARNING: mount: waiting for virtio device drvfs
<3>WSL (588) ERROR: MountWithRetry:307: mount(drvfs, /mnt/c, 9p, 0x00000000, cache=mmap,msize=262144,trans=virtio,aname=drvfs;path=C:;symlinkroot=/mnt/) failed: No such file or directory

Potential mitigation: Another issue suggested trying

[wsl2]
virtio9p=false

in ~/.wslconfig on Windows, then rebooting WSL (wsl --shutdown first) to debug the issue in more detail, which seems to have solved it for me for now, but I don't know if there are other implications here (I can't see this flag documented in Advanced settings configuration in WSL). 🤔

Throne3d commented 10 months ago

Possibly related to #10727? They seem to be having a similar issue, and say it was caused by running shutdown (I don't remember doing that, but I did perform some Ubuntu upgrades which forces WSL to shut down, so maybe that's related?).

antgustech commented 10 months ago

[wsl2] virtio9p=false

I also tried this option but it didnt seem to do much for me.

Windows paths issue - disabling windows paths does hide some of the errors up top around translating paths, but still shows the C: mount failing, and the underlying C: drive still isn't mounted

Disabling the windows path thingy did reduce the number of errors but I still could not access c.

EDIT:

Now it seems to work again. I think adding the virtio9p=false option solved it!

psymbio commented 10 months ago

Currently, I get this error:

<3>WSL (1186) ERROR: No such file or directory @D:/a/1/s/src/linux/mountutil\mountutilcpp.h:17 (MountEnum)
<3>WSL (1186) ERROR: No such file or directory @D:/a/1/s/src/linux/mountutil\mountutilcpp.h:17 (MountEnum)
<3>WSL (1186) ERROR: UtilTranslatePathList:2853: Failed to translate C:\Program Files\Common Files\Oracle\Java\javapath
<3>WSL (1186) ERROR: No such file or directory @D:/a/1/s/src/linux/mountutil\mountutilcpp.h:17 (MountEnum)
<3>WSL (1186) ERROR: UtilTranslatePathList:2853: Failed to translate C:\Windows\system32
<3>WSL (1186) ERROR: No such file or directory @D:/a/1/s/src/linux/mountutil\mountutilcpp.h:17 (MountEnum)
<3>WSL (1186) ERROR: UtilTranslatePathList:2853: Failed to translate C:\Windows
<3>WSL (1186) ERROR: No such file or directory @D:/a/1/s/src/linux/mountutil\mountutilcpp.h:17 (MountEnum)
<3>WSL (1186) ERROR: UtilTranslatePathList:2853: Failed to translate C:\Windows\System32\Wbem
<3>WSL (1186) ERROR: No such file or directory @D:/a/1/s/src/linux/mountutil\mountutilcpp.h:17 (MountEnum)
<3>WSL (1186) ERROR: UtilTranslatePathList:2853: Failed to translate C:\Windows\System32\WindowsPowerShell\v1.0\
<3>WSL (1186) ERROR: No such file or directory @D:/a/1/s/src/linux/mountutil\mountutilcpp.h:17 (MountEnum)
<3>WSL (1186) ERROR: UtilTranslatePathList:2853: Failed to translate C:\Windows\System32\OpenSSH\
<3>WSL (1186) ERROR: No such file or directory @D:/a/1/s/src/linux/mountutil\mountutilcpp.h:17 (MountEnum)
<3>WSL (1186) ERROR: UtilTranslatePathList:2853: Failed to translate C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common

The solution of shutting down wsl and restarting didn't seem to work for me and

wsl --shutdown
wsl

And I'm not entirely sure where to edit this configuration:

[wsl2]
virtio9p=false

This is what worked for me: https://github.com/microsoft/WSL/issues/10752#issuecomment-1813818652

amahpour commented 10 months ago

I'm seeing this across multiple distros now when starting up WSL 2. I even attempted to install a new distro and got this:

Installing, this may take a few minutes...
<3>WSL (9) ERROR: CreateProcessParseCommon:708: Failed to translate C:\WINDOWS\system32
<3>WSL (9) ERROR: UtilTranslatePathList:2853: Failed to translate C:\Program Files\Microsoft MPI\Bin\
<3>WSL (9) ERROR: UtilTranslatePathList:2853: Failed to translate C:\Program Files\Semeru\jdk-17.0.7.7-openj9\bin
<3>WSL (9) ERROR: UtilTranslatePathList:2853: Failed to translate C:\Program Files\Python310\Scripts\
<3>WSL (9) ERROR: UtilTranslatePathList:2853: Failed to translate C:\Program Files\Python310\
<3>WSL (9) ERROR: UtilTranslatePathList:2853: Failed to translate C:\WINDOWS\system32

Any recommendations on how to troubleshoot this?

psymbio commented 10 months ago

@amahpour did you try: https://github.com/microsoft/WSL/issues/10752#issuecomment-1813818652

amahpour commented 10 months ago

@amahpour did you try: #10752 (comment)

I looked at that comment but I don't have distrod installed.

davidwkelley commented 10 months ago

The same problem started happening for me yesterday. I don't have distrod installed.

[2023-11-17 06:36:54.111] Extension version: 0.81.8 [2023-11-17 06:36:54.111] L10N bundle: undefined [2023-11-17 06:36:54.120] authorityHierarchy: wsl+Ubuntu-22.04 [2023-11-17 06:36:54.120] WSL extension activating for a local WSL instance [2023-11-17 06:36:54.133] Resolving wsl+Ubuntu-22.04, resolveAttempt: 1 [2023-11-17 06:36:54.134] NodeExecServer run: C:\Windows\System32\wsl.exe --status [2023-11-17 06:36:54.710] WSL feature installed: true (wsl --status) [2023-11-17 06:36:54.710] NodeExecServer run: C:\Windows\System32\wsl.exe --list --verbose [2023-11-17 06:36:55.339] 1 distros found [2023-11-17 06:36:55.339] Starting VS Code Server inside WSL (wsl2) [2023-11-17 06:36:55.339] Windows build: 22621. Multi distro support: available. WSL path support: enabled [2023-11-17 06:36:55.340] Scriptless setup: false [2023-11-17 06:36:55.442] NodeExecServer run: C:\Windows\System32\wsl.exe -d Ubuntu-22.04 -e sh -c [ -f '/tmp/vscode-distro-env.BH9erW' ] && cat '/tmp/vscode-distro-env.BH9erW' || echo '' [2023-11-17 06:36:55.562] WSL daemon log file: [2023-11-17 06:36:55.562] Probing if server is already installed: if [ -d ~/.vscode-server/bin/1a5daa3a0231a0fbba4f14db7ec463cf99d7768e ]; then printf 'install-found '; fi; if [ -f /etc/alpine-release ]; then printf alpine-; fi; uname -m [2023-11-17 06:36:55.562] NodeExecServer run: C:\Windows\System32\wsl.exe -d Ubuntu-22.04 -e sh -c if [ -d ~/.vscode-server/bin/1a5daa3a0231a0fbba4f14db7ec463cf99d7768e ]; then printf 'install-found '; fi; if [ -f /etc/alpine-release ]; then printf alpine-; fi; uname -m [2023-11-17 06:36:56.328] Probing result: install-found x86_64 [2023-11-17 06:36:56.328] Server install found in WSL [2023-11-17 06:36:56.328] NodeExecServer run: C:\Windows\System32\wsl.exe -d Ubuntu-22.04 sh -c '"$VSCODE_WSL_EXT_LOCATION/scripts/wslServer.sh" 1a5daa3a0231a0fbba4f14db7ec463cf99d7768e stable code-server .vscode-server --host=127.0.0.1 --port=0 --connection-token=1125128467-865813447-1427837231-4081809046 --use-host-proxy --without-browser-env-var --disable-websocket-compression --accept-server-license-terms --telemetry-level=all' [2023-11-17 06:36:56.338] Using shell environment from invoking shell: /tmp/vscode-distro-env.BH9erW [2023-11-17 06:36:57.022] <3>WSL (807) ERROR: CreateProcessParseCommon:708: Failed to translate C:\Users\sasdck\AppData\Local\Programs\Microsoft VS Code [2023-11-17 06:36:57.022] <3>WSL (807) ERROR: UtilTranslatePathList:2853: Failed to translate c:\Users\sasdck.vscode\extensions\ms-vscode-remote.remote-wsl-0.81.8 [2023-11-17 06:36:57.022] <3>WSL (807) ERROR: UtilTranslatePathList:2853: Failed to translate C:\Windows\system32 [2023-11-17 06:36:57.022] <3>WSL (807) ERROR: UtilTranslatePathList:2853: Failed to translate C:\Windows [2023-11-17 06:36:57.022] <3>WSL (807) ERROR: UtilTranslatePathList:2853: Failed to translate C:\Windows\System32\Wbem [2023-11-17 06:36:57.022] <3>WSL (807) ERROR: UtilTranslatePathList:2853: Failed to translate C:\Windows\System32\WindowsPowerShell\v1.0\ [2023-11-17 06:36:57.022] <3>WSL (807) ERROR: UtilTranslatePathList:2853: Failed to translate C:\Windows\System32\OpenSSH\ [2023-11-17 06:36:57.022] <3>WSL (807) ERROR: UtilTranslatePathList:2853: Failed to translate C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR [2023-11-17 06:36:57.022] <3>WSL (807) ERROR: UtilTranslatePathList:2853: Failed to translate C:\Program Files\PowerShell\7\ [2023-11-17 06:36:57.022] <3>WSL (807) ERROR: UtilTranslatePathList:2853: Failed to translate C:\Users\sasdck\AppData\Local\Microsoft\WindowsApps [2023-11-17 06:36:57.022] <3>WSL (807) ERROR: UtilTranslatePathList:2853: Failed to translate C:\Users\sasdck\AppData\Local\Programs\Microsoft VS Code\bin [2023-11-17 06:36:57.022] <3>WSL (807) ERROR: UtilTranslatePathList:2853: Failed to translate c:\Users\sasdck\AppData\Roaming\Code\User\globalStorage\ms-vscode-remote.remote-containers\cli-bin [2023-11-17 06:36:57.022] sh: 1: /scripts/wslServer.sh: not found [2023-11-17 06:36:57.044] For help with startup problems, go to https://code.visualstudio.com/docs/remote/troubleshooting#_wsl-tips [2023-11-17 06:37:04.713] Download in background is enabled

davidwkelley commented 10 months ago

This looks to have fixed the problem for me:

[wsl2]
virtio9p=false
antgustech commented 10 months ago

[wsl2] virtio9p=false

I also tried this option but it didnt seem to do much for me.

Windows paths issue - disabling windows paths does hide some of the errors up top around translating paths, but still shows the C: mount failing, and the underlying C: drive still isn't mounted

Disabling the windows path thingy did reduce the number of errors but I still could not access c.

EDIT:

Now it seems to work again. I think adding the virtio9p=false option solved it!

I just changed my JAVA_HOME env variable in windows and rebooted and now the problem is back with WSL not mounting C again!

dsmeg

...
[    0.534077] Adding 4194304k swap on /dev/sdb.  Priority:-2 extents:1 across:4194304k
[    0.630554] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[    0.722565] FS-Cache: Duplicate cookie detected
[    0.722936] FS-Cache: O-cookie c=00000004 [p=00000002 fl=222 nc=0 na=1]
[    0.723229] FS-Cache: O-cookie d=00000000a8308391{9P.session} n=000000005341b773
[    0.723557] FS-Cache: O-key=[10] '34323934393337333633'
[    0.723774] FS-Cache: N-cookie c=00000005 [p=00000002 fl=2 nc=0 na=1]
[    0.724044] FS-Cache: N-cookie d=00000000a8308391{9P.session} n=00000000c527fa99
[    0.724450] FS-Cache: N-key=[10] '34323934393337333633'
[    0.725880] FS-Cache: Duplicate cookie detected
[    0.726167] FS-Cache: O-cookie c=00000004 [p=00000002 fl=222 nc=0 na=1]
[    0.726460] FS-Cache: O-cookie d=00000000a8308391{9P.session} n=000000005341b773
[    0.726811] FS-Cache: O-key=[10] '34323934393337333633'
[    0.727037] FS-Cache: N-cookie c=00000006 [p=00000002 fl=2 nc=0 na=1]
[    0.727310] FS-Cache: N-cookie d=00000000a8308391{9P.session} n=00000000c3ab33c2
[    0.727639] FS-Cache: N-key=[10] '34323934393337333633'
[    0.819246] scsi 0:0:0:2: Direct-Access     Msft     Virtual Disk     1.0  PQ: 0 ANSI: 5
[    0.822989] sd 0:0:0:2: Attached scsi generic sg2 type 0
[    0.823525] sd 0:0:0:2: [sdc] 2147483648 512-byte logical blocks: (1.10 TB/1.00 TiB)
[    0.823901] sd 0:0:0:2: [sdc] 4096-byte physical blocks
[    0.824172] sd 0:0:0:2: [sdc] Write Protect is off
[    0.824400] sd 0:0:0:2: [sdc] Mode Sense: 0f 00 00 00
[    0.824707] sd 0:0:0:2: [sdc] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    0.826300] sd 0:0:0:2: [sdc] Attached SCSI disk
[    0.847031] EXT4-fs (sdc): mounted filesystem with ordered data mode. Opts: discard,errors=remount-ro,data=ordered. Quota mode: none.
[    1.114761] /usr/bin/wslpath:
[    1.114764] C:\Users\XXX

[    1.116064] [14:34:08.910] <3>WSLGd: LogException:75:
[    1.116066] Exception: Invalid argument @../main.cpp:117 (TranslateWindowsPath)

[    1.330346] clocksource: tsc: mask: 0xffffffffffffffff max_cycles: 0x2116e309a19, max_idle_ns: 440795270503 ns
[    1.333432] clocksource: Switched to clocksource tsc
[   49.131588] hv_balloon: Max. dynamic memory size: 16032 MB

Funny enough though, mounting gives a different error than before:

 sudo mount -t drvfs C: /mnt/c
<3>WSL (127) ERROR: UtilConnectVsock:585: connect port 50002 failed 110
antgustech commented 10 months ago

I have now tried reinstalling WSL but it does not work, same result as before, c not mounting.

dancristiancecoi commented 10 months ago

Potential mitigation: Another issue suggested trying

[wsl2]
virtio9p=false

in ~/.wslconfig on Windows, then rebooting WSL (wsl --shutdown first) to debug the issue in more detail, which seems to have solved it for me for now, but I don't know if there are other implications here (I can't see this flag documented in Advanced settings configuration in WSL). 🤔

This worked for me and my coworkers, thank you! I did have to reboot my laptop for this to take full effect (just wsl --shutdown wasn't sufficient).

antgustech commented 10 months ago

I finally found the solution. It fails when I open via (win 11) terminal. But if I close everything and just open the "old" powershell prompt and type WSL, then it actually works again!

I do not understand why and at this moment I'm to afraid to ask.

avila-m-6 commented 9 months ago

Potential mitigation: Another issue suggested trying

[wsl2]
virtio9p=false

in ~/.wslconfig on Windows, then rebooting WSL (wsl --shutdown first) to debug the issue in more detail, which seems to have solved it for me for now, but I don't know if there are other implications here (I can't see this flag documented in Advanced settings configuration in WSL). 🤔

This worked for me and my coworkers, thank you! I did have to reboot my laptop for this to take full effect (just wsl --shutdown wasn't sufficient).

It worked for me w/o full reboot. Maybe you needed to wait 8s?

antgustech commented 9 months ago

Now after reboot the problem came back. But I managed to fix it by doing the following steps, maybe it will help someone else:

Set up wslconfig with

[wsl2]
virtio9p=false
  1. Reboot windows
  2. Start Windows run (WINDOWS + R)
  3. Type pwshand hold CTRL+SHIFT to start powershell in admin mode.
  4. Type wsl –shutdown to exit wsl and then type wslto start it again

Steps 1-4 must be done after every reboot it seems, very annoying. I guess it could be put in a powershell command and place it on the desktop, maybe it could be made to run during startup or something.

Throne3d commented 9 months ago

It looks like virtio9p has been disabled by default in the latest release: https://github.com/microsoft/WSL/releases/tag/2.0.11 - I guess that's related to this! It seems like this issue is being worked on actively, in that case =)

antgustech commented 8 months ago

This problem still exists for both me and my colleague in 2.0.14.0

binarybasher commented 5 months ago

First time trying to use wsl I ran into the same issues.

I checked my paths, removed missing folders from my path statements and still the issue existed. I shutdown wsl and tried it again, same thing...

I then installed ubuntu: wsl --install ubuntu set a password (prompted) and I was dropped to the shell prompt... hooray!

I ctrl-d to exit and then typed: wsl Same error...

I then set ubuntu as the default distro: wsl --set-default ubuntu Followed by trying it again: wsl Perfect! I was dropped the shell without any errors relating to path...

I suspect the default distro was causing the issue, errors with path appear to be a diversion.

Hope this helps somebody.

wesdevpro commented 5 months ago

First time trying to use wsl I ran into the same issues.

I checked my paths, removed missing folders from my path statements and still the issue existed. I shutdown wsl and tried it again, same thing...

I then installed ubuntu: wsl --install ubuntu set a password (prompted) and I was dropped to the shell prompt... hooray!

I ctrl-d to exit and then typed: wsl Same error...

I then set ubuntu as the default distro: wsl --set-default ubuntu Followed by trying it again: wsl Perfect! I was dropped the shell without any errors relating to path...

I suspect the default distro was causing the issue, errors with path appear to be a diversion.

Hope this helps somebody.

The above solution worked for me after following this method https://github.com/microsoft/WSL/issues/9360#issuecomment-1810102617. However some reason I have to keep remounting the driver every time I exit wsl or restart my system. Anyone know how to fix this permanently with out using any band aid fixes?

antgustech commented 5 months ago

I am still having the issue, however restarting WSL from powershell after each reboot still seems to work until the next reboot.

Ch1llNoodle commented 5 months ago

This method might have helped😎link

Open SystemPropertiesAdvanced.exe
Click Environment variables
Double-click Path under "System variables"
Delete this entry
wesdevpro commented 5 months ago

Why is this issue closed? @Newbie012

wesdevpro commented 5 months ago

This method might have helped😎link

Open SystemPropertiesAdvanced.exe
Click Environment variables
Double-click Path under "System variables"
Delete this entry

This method does not work for me as I did not find a path that points to a dir on my external drive

Edw590 commented 4 months ago

I had to uninstall the distribution I had installed. Uninstalled from Settings and with the following commands (first command to list, second to uninstall). Then I installed it again and it works.

wslconfig /l
wslconfig /u [Distro]
wesdevpro commented 4 months ago

I had to uninstall the distribution I had installed. Uninstalled from Settings and with the following commands (first command to list, second to uninstall). Then I installed it again and it works.

wslconfig /l
wslconfig /u [Distro]

This doesn't work for me. I get the following error now:

<3>WSL (302) ERROR: CreateProcessParseCommon:711: Failed to translate E:\...\..\..