mintty / wsltty

Mintty as a terminal for Bash on Ubuntu on Windows / WSL
Other
3.11k stars 104 forks source link

MintTTY fails to start with dev systemd build; missing bash #316

Open Karel-van-de-Plassche opened 2 years ago

Karel-van-de-Plassche commented 2 years ago

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

Biswa96 commented 2 years ago

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

Karel-van-de-Plassche commented 2 years ago

Missed it, mb

mintty commented 2 years ago

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

Karel-van-de-Plassche commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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 :)

mintty commented 2 years ago

Released 3.6.1.2. Please retest.

puellanivis commented 2 years ago

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

mintty commented 1 year ago

Released 3.6.5; is this still an issue?