mintty / wsltty

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

wsltty may cause WSL to hang (Windows 10) #355

Open DanKaplanSES opened 2 months ago

DanKaplanSES commented 2 months ago

Every couple of months my WSL hangs until I restart my computer or kill WSL related processes in the task manager. By "hangs," I mean clicking on the terminal icon on my taskbar does not bring up a window, or, it brings up a window that never shows a prompt. I'll go into more detail at the bottom of this issue, or you can see the details I've already described in the WSL tracker

In the title, I use the word "may" because I'm not hundred percent sure wsltty is responsible, but I do have some evidence. When my WSL hangs:

  1. Killing wslbridge2.exe in the task manager sometimes unfreezes WSL so that the wsl --shutdown command completes.
  2. I can't find wslbridge2.exe in the task manager when my system is "stuck," but all the other WSL process seem to be running.

I know this isn't enough information to troubleshoot, but is there a way to generate wsltty logs or wslbridge2.exe logs the next time this happens so that I may be able to provide enough troubleshooting information to rule wsltty out as the cause?

Thanks!


Here's how I start wsltty: %LOCALAPPDATA%\wsltty\bin\mintty.exe --tabbar=4 -o "KeyFunctions=t:new-window-cwd;w:close;AppID=wsltty" --WSL="Ubuntu" --configdir="%APPDATA%\wsltty" -h always - Notice that if an error were causing this problem, the shortcut is set to keep the window open so I could see it: since the window doesn't open at all or doesn't print anything when it opens, WSL/wsltty seems to be experiencing some sort of deadlock. I also want to note that when I'm in this state, no wsl.exe commands complete: if I run wsl --shutdown, the command never finishes.

mintty commented 2 months ago

clicking on the terminal icon

which means the wsltty icon or the native WSL console icon?

is there a way to generate wsltty logs or wslbridge2.exe logs

I'm afraid no. @Biswa96 ?

Biswa96 commented 2 months ago

I do not use the WSL anymore and ready to give away the wslbridge2 repository if anyone is interested to maintain it.

DanKaplanSES commented 1 month ago

clicking on the terminal icon

which means the wsltty icon or the native WSL console icon?

Sorry, I didn't notice this question until now. I'm clicking on an Ubuntu icon in my taskbar, but I manually changed the icon to look like this. I don't remember what it originally looked like.

If you are asking me if it's a Windows terminal or wsltty, the latter:

Here's how I start wsltty: %LOCALAPPDATA%\wsltty\bin\mintty.exe --tabbar=4 -o "KeyFunctions=t:new-window-cwd;w:close;AppID=wsltty" --WSL="Ubuntu" --configdir="%APPDATA%\wsltty" -h always -

If I haven't provided the information you're looking for, could you word your question a different way because I don't think I understand what you are asking.

mintty commented 1 month ago

Have you updated to wsltty 3.7.6?