Skip to content

[Bug]: wsl fails when Distrod instance has been already launched, disturbing many Windows apps (e.g. Docker Desktop, Visual Studio Code) #91

Open
@kissge

Description

@kissge

Describe the bug

Normally running wsl in Windows starts Linux shell, but it fails when the Linux instance with Distrod has been already launched. This means: you cannot open two tabs in Windows Terminal. Furthermore, apps running on the host Windows like Docker Desktop and Visual Studio Code (via Connect to WSL) stops working as they cannot communicate with the distros.

I've been experiencing this issue since today. Maybe recent WSL2 update brought this issue.

Same issue was reported in microsoft/WSL#10752

Steps to reproduce

  1. Set up any Linux distro using Distrod wizard.
  2. Open PowerShell and run wsl -d Distrod to start the distro.
  3. Open another PowerShell tab and run wsl -d Distrod again.

Expected behavior

Expected:

Linux shell starts.

Actual:

PS C:\Users\John> wsl -d Distrod
<3>WSL (183) ERROR: No such file or directory @D:/a/1/s/src/linux/mountutil\mountutilcpp.h:17 (MountEnum)
<3>WSL (183) ERROR: CreateProcessParseCommon:708: Failed to translate C:\Users\John
<3>WSL (183) ERROR: No such file or directory @D:/a/1/s/src/linux/mountutil\mountutilcpp.h:17 (MountEnum)
<3>WSL (183) ERROR: UtilTranslatePathList:2853: Failed to translate C:\Windows\system32
<3>WSL (183) ERROR: No such file or directory @D:/a/1/s/src/linux/mountutil\mountutilcpp.h:17 (MountEnum)
<3>WSL (183) ERROR: UtilTranslatePathList:2853: Failed to translate C:\Windows
<3>WSL (183) ERROR: No such file or directory @D:/a/1/s/src/linux/mountutil\mountutilcpp.h:17 (MountEnum)
<3>WSL (183) ERROR: UtilTranslatePathList:2853: Failed to translate C:\Windows\System32\Wbem
<3>WSL (183) ERROR: No such file or directory @D:/a/1/s/src/linux/mountutil\mountutilcpp.h:17 (MountEnum)
<3>WSL (183) ERROR: UtilTranslatePathList:2853: Failed to translate C:\Windows\System32\WindowsPowerShell\v1.0\
<3>WSL (183) ERROR: No such file or directory @D:/a/1/s/src/linux/mountutil\mountutilcpp.h:17 (MountEnum)
<3>WSL (183) ERROR: UtilTranslatePathList:2853: Failed to translate C:\Windows\System32\OpenSSH\
<3>WSL (183) ERROR: No such file or directory @D:/a/1/s/src/linux/mountutil\mountutilcpp.h:17 (MountEnum)
<3>WSL (183) ERROR: UtilTranslatePathList:2853: Failed to translate C:\Program Files\dotnet\
<3>WSL (183) ERROR: No such file or directory @D:/a/1/s/src/linux/mountutil\mountutilcpp.h:17 (MountEnum)
<3>WSL (183) ERROR: UtilTranslatePathList:2853: Failed to translate C:\Program Files\Docker\Docker\resources\bin
<3>WSL (183) ERROR: No such file or directory @D:/a/1/s/src/linux/mountutil\mountutilcpp.h:17 (MountEnum)
<3>WSL (183) ERROR: UtilTranslatePathList:2853: Failed to translate C:\Users\John\AppData\Local\Microsoft\WindowsApps
<3>WSL (183) ERROR: No such file or directory @D:/a/1/s/src/linux/mountutil\mountutilcpp.h:17 (MountEnum)
<3>WSL (183) ERROR: UtilTranslatePathList:2853: Failed to translate C:\Users\John\AppData\Local\Programs\Microsoft VS Code\bin
<3>WSL (183) ERROR: No such file or directory @D:/a/1/s/src/linux/mountutil\mountutilcpp.h:17 (MountEnum)
<3>WSL (183) ERROR: UtilTranslatePathList:2853: Failed to translate C:\Users\John\AppData\Local\Microsoft\WinGet\Packages\Gyan.FFmpeg_Microsoft.Winget.Source_8wekyb3d8bbwe\ffmpeg-6.0-full_build\bin
distrod 0.1.7

USAGE:
    -zsh [OPTIONS] <SUBCOMMAND>

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information

OPTIONS:
    -l, --log-level <log-level>    Log level in the env_logger format. Simple levels: trace, debug, info(default), warn,
                                   error

SUBCOMMANDS:
    create
    disable
    enable
    exec
    help       Prints this message or the help of the given subcommand(s)
    start
    stop

Windows version

Version 22H2 (OS Build 22621.2715)

$ wsl.exe --version
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.2715

Linux kernel version

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

Distro

Arch Linux

How did you install that distro?

Installed by Distrod wizard

Logs

As far as I can tell, the failed attempt is not logged even with trace log level.

additional comment

  • After disabling Distrod by sudo /opt/distrod/bin/distrod disable, the distro started to work again.
  • Other non-Distrod distros don't appear to have the same issue. (I tested with wsl --install Ubuntu)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions