You can look to the dmesg traces when wsl will unstuck.
It happend to me too and I saw there was some lock with the keystroke in bash
Edit:
It happened to me recently again:
I'm using wsl2 (debian) via the console of vscode and, sometimes, when I type a new command (make) everything get stuck for few seconds. Sometime forever...
Each time it happens I see the same trace in the system logs of linux.
To get this, you can write "dmesg -T" in the console (when it unstuck).
The trace is
"pts pts11: sig=22, tty->pgrp == NULL!"
I still didn't find any solution to this.
Maybe you can use the same "dmesg -T" command to get a hint on what happend to you
wsl ~
a second time. Does it start? If so, add the output ofps n -efH
to the question. That may give you some idea what's going on. You may be able tokill <pid>
the offending processes from another WSL window and get the first one to start again.wsl --shutdown
works but not everytime There are resources to to restart wsl - how2shout.com/how-to/… - superuser.com/questions/1126721/…wsl
command just hangs elevated prompt or not) - reboot is the only one I can recover.