wsltty icon indicating copy to clipboard operation
wsltty copied to clipboard

MintTTY fails to start with dev systemd build; missing bash

Open Karel-van-de-Plassche opened this issue 1 year ago • 11 comments

Heads up for the upcoming "Windows Store" version of WSL2 with systemd. mintty.exe fails to start (in Arch) with "failed to run bash":

image

Tested with

PS C:\Windows\system32> wsl --list
Windows Subsystem for Linux Distributions:
Arch (Default)
Ubuntu-20.04
rocky8

Windows build 22000, preview version of WSL: image

Latest Rolling Release version with bash installed of Arch Linux as main distro:

[I] karel@super-win-arch ~ (master)>ll /bin/bash
-rwxr-xr-x 1 root root 927K Jan  8  2022 /bin/bash

PS. I don't know enough if this is user error or not; I did try to re-install the latest wsltty Windows package

Karel-van-de-Plassche avatar Sep 26 '22 09:09 Karel-van-de-Plassche

Please see this thread https://github.com/mintty/wsltty/issues/302

Biswa96 avatar Sep 26 '22 12:09 Biswa96

Missed it, mb

Karel-van-de-Plassche avatar Sep 26 '22 12:09 Karel-van-de-Plassche

According to the other issue, this should work if you start it the second time, right?

mintty avatar Sep 26 '22 13:09 mintty

Same trace as the linked issue:

PS C:\Users\karel\AppData\Local\wsltty\bin> .\wslbridge2.exe
assertion "hRes == 0" failed: file "GetVmId.cpp", line 194, function: HRESULT GetVmId(GUID*, GUID*)
      1 [main] wslbridge2 1825 cygwin_exception::open_stackdumpfile: Dumping stack trace to wslbridge2.exe.stackdump

Downloaded wslbridge2 build artifact from Visual Studio 2022 from master 25 days ago

WSL no longer gives an error:

PS C:\Users\karel\AppData\Local\wsltty\bin> .\wslbridge2.exe
PS C:\Users\karel\AppData\Local\wsltty\bin>

Confirmed WSL from store works correctly:

image

Confirmed this is my Arch disk system:

[I] karel@super-win-arch ~ (master)>ll /bin/bash
-rwxr-xr-x 1 root root 927K Jan  8  2022 /bin/bash

Running mintty in powershell still fails. Digging deeper, still suspecting user error

image

Karel-van-de-Plassche avatar Sep 26 '22 13:09 Karel-van-de-Plassche

Using the corrected link https://github.com/Biswa96/wslbridge2/releases/tag/v0.9 cygwin pre-compiled code, preview build (launching from store) launches correctly:

image

mintty does not start yet without error image

All the other supplied programs in C:\Users\$USER\AppData\Local\wsltty\bin run without message/error/problems. After running them all for fun, still getting the above error. Running as admin does not work. Might be different issue after all, so re-opening, passing back to you :)

Using WSL2 with fresh Ubuntu from the store (I think)

Karel-van-de-Plassche avatar Sep 26 '22 13:09 Karel-van-de-Plassche

Can confirm that going:

-> start WSL using the store -> IN THAT terminal run ./wslbridge2.exe without error -> IN THAT terminal run mintty.exe crashes without error (and does not start mintty)

Karel-van-de-Plassche avatar Sep 26 '22 13:09 Karel-van-de-Plassche

Seems the WSL change is now live. I re-installed MintTTY from the .exe. Can confirm that I now get the same error on my W11 PC. Added stackdump of crash in wslbridge2.exe. wslbridge2.exe.stackdump.txt

Karel-van-de-Plassche avatar Oct 13 '22 12:10 Karel-van-de-Plassche

Can confirm that a re-install with overwriting with either of the files found in https://github.com/Biswa96/wslbridge2/releases/tag/v0.9 does not work; Should I be installing all of cygwin to get a valid installation with /bin/bash maybe? Or can bash be packaged into the wsl mintty installer?

Running wsl.exe in a powershell still works, so this is not blocking me at the moment. Guessing, thanks for the help so far :)

Karel-van-de-Plassche avatar Oct 21 '22 08:10 Karel-van-de-Plassche

Released 3.6.1.2. Please retest.

mintty avatar Nov 08 '22 22:11 mintty

😐 Patch Tuesday has complicated things. Things are working very poorly, but none of it seems to be related to the issues here.

puellanivis avatar Nov 09 '22 02:11 puellanivis