wslg icon indicating copy to clipboard operation
wslg copied to clipboard

Can't use WLSg at all, apps freeze or are not responsible

Open alansikora opened this issue 4 years ago • 55 comments

Environment

Windows build number: 10.0.22000.0
Your Distribution version: Ubuntu 21.04
Your WSLg version: Windows Subsystem for Linux WSLg Preview 1.0.26 (is this it?)

Steps to reproduce

Microsoft Edge:

  • sudo apt install software-properties-common apt-transport-https wget
  • wget -q https://packages.microsoft.com/keys/microsoft.asc -O- | sudo apt-key add -
  • sudo add-apt-repository "deb [arch=amd64] https://packages.microsoft.com/repos/edge stable main"
  • sudo apt install microsoft-edge-dev
  • microsoft-edge

It runs full screen, and everything works, the I try exiting full screen/resizing, and I can't input anything anymore. It just hangs and I need to close it.

Firefox:

  • sudo apt install firefox
  • firefox (or MOZ_ENABLE_WAYLAND=1 firefox)

It usually works, but it always freezes before I finish my work, it just stops accepting input then the WSL GUI Window can't be moved or closed. The only way to fix it is wsl --shutdown

Firefox WSL logs:

weston.log pulseaudio.log versions.txt.txt

Others

I also tried to run other GUI apps, they all evetually freeze.

Expected behavior

Not freeze.

Actual behavior

Freezing.

alansikora avatar Jan 25 '22 19:01 alansikora

@alansikora, thanks for reporting the issue. Regarding to the issue with Edge, it sounds close to https://github.com/microsoft/wslg/issues/272, if you haven't tried, try disabling GPU or run in Wayland native mode. For firefox, I have not heard/experienced such issue. If it only freeze firefox, please take core dump of firefox, or if entire WSLg is freezing (including other Linux GUI app), please do below to take core dump of weston running system-distro.

1: From Windows's command prompt, run "wsl --system" (note it's double minus) 2: It launch bash in system-distro, type "tdnf install gdb" 3: then find pid of /usr/bin/weston from "ps -aux" 4: then "gcore [weston's pid]".

Thanks!

hideyukn88 avatar Feb 03 '22 18:02 hideyukn88

I also have the same problem with GitKraken. Every now and then it doesn't respond. I notice this because the context menus usually opened by right click no longer open. At that point the GUI stops responding and if I try to close the window it won't close. Only solution: wsl --shutdown.

I followed the steps described and this is the output shown by the console. Did I do this correctly?

[New LWP 19]
[New LWP 33]
[New LWP 34]
[New LWP 35]
[New LWP 36]
[New LWP 37]
[New LWP 38]
[New LWP 39]
[New LWP 40]
[New LWP 41]
[New LWP 42]
[New LWP 43]
[New LWP 44]
[New LWP 45]
[New LWP 46]
[New LWP 47]
[New LWP 48]
[New LWP 49]
[New LWP 50]
[New LWP 51]
[New LWP 52]
[New LWP 54]
[New LWP 55]
[New LWP 56]
[New LWP 57]
[New LWP 58]
[New LWP 59]
[New LWP 60]
[New LWP 61]
[New LWP 63]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/libthread_db.so.1".
0x00007fb47af9fb6e in epoll_wait () from /lib/libc.so.6
warning: target file /proc/8/cmdline contained unexpected null characters
Saved corefile core.8
[Inferior 1 (process 8) detached]

f-liva avatar Feb 09 '22 15:02 f-liva

Same problem with IntelliJ. I am running Windows 11.

yangli2014 avatar Feb 13 '22 16:02 yangli2014

@f-liva, yes, would you please share the core file with us, thanks!

hideyukn88 avatar Feb 13 '22 16:02 hideyukn88

I am having this same issue with Firefox on WSL on Windows 11

polypixeldev avatar Feb 13 '22 18:02 polypixeldev

core.zip

@hideyukn88 here it is!

f-liva avatar Feb 14 '22 07:02 f-liva

I'm seeing this in VS Code also. Usually my menus stop working first (top bar menus and right click menus), but eventually things will just completely freeze up.

ghost avatar Mar 21 '22 17:03 ghost

I also have the same problem with GitKraken. Every now and then it doesn't respond. I notice this because the context menus usually opened by right click no longer open. At that point the GUI stops responding and if I try to close the window it won't close. Only solution: wsl --shutdown.

I followed the steps described and this is the output shown by the console. Did I do this correctly?

[New LWP 19]
[New LWP 33]
[New LWP 34]
[New LWP 35]
[New LWP 36]
[New LWP 37]
[New LWP 38]
[New LWP 39]
[New LWP 40]
[New LWP 41]
[New LWP 42]
[New LWP 43]
[New LWP 44]
[New LWP 45]
[New LWP 46]
[New LWP 47]
[New LWP 48]
[New LWP 49]
[New LWP 50]
[New LWP 51]
[New LWP 52]
[New LWP 54]
[New LWP 55]
[New LWP 56]
[New LWP 57]
[New LWP 58]
[New LWP 59]
[New LWP 60]
[New LWP 61]
[New LWP 63]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/libthread_db.so.1".
0x00007fb47af9fb6e in epoll_wait () from /lib/libc.so.6
warning: target file /proc/8/cmdline contained unexpected null characters
Saved corefile core.8
[Inferior 1 (process 8) detached]

GitKraken does this for me too

BenjaminThomson avatar Mar 23 '22 01:03 BenjaminThomson

@slagbat @f-liva, do you mean right click context menu is the one in below screen shot? I looked at core dump at https://github.com/microsoft/wslg/issues/643#issuecomment-1038761051, but unfortunately, I didn't find any clue.

@Poly-Pixel, @alansikora, I can't reproduce the issue with firefox or Edge either.

image

hideyukn88 avatar Mar 23 '22 02:03 hideyukn88

+1 facing the same issue on Win11 while running Firefox

ashikns avatar Mar 23 '22 03:03 ashikns

@slagbat @f-liva, do you mean right click context menu is the one in below screen shot? I looked at core dump at #643 (comment), but unfortunately, I didn't find any clue.

@Poly-Pixel, @alansikora, I can't reproduce the issue with firefox or Edge either.

image

For me, I can use GitKraken for a short period of time and then it'll just stop working. I won't be able to move or resize the window or use any of its features. This also happens with Chrome too so I think it's just a general issue for me.

Update:

@hideyukn88 GitKraken just crashed on me so I tried to do a core dump but it's frozen doing that too! Sorry, I know that's probably no help at all!

BenjaminThomson avatar Mar 23 '22 04:03 BenjaminThomson

To me this seems to be a random effect which only occur on mouse right-clicks. I use Firefox, Eclipse and Smartgit in WSL-ubuntu. When the problem occures, all currently open wsl windows freeze and cannot be closed. The only way to get rid of them is to restart wsl. I use ubuntu 20 and windows 11.

mquenzer avatar Mar 25 '22 08:03 mquenzer

I gave up WSLg and use Kali Linux Win-KeX and it works much better than wslg.

yangli2014 avatar Mar 25 '22 13:03 yangli2014

On further investigation this does only seem to happen to me when I right click for the context menu in Gitkraken and then select an option on said menu with a left click. Then everything freezes on all WSL GUI apps!

BenjaminThomson avatar Apr 01 '22 00:04 BenjaminThomson

@slagbat, when everything freezes, would you please share the core file following instruction at https://github.com/microsoft/wslg/issues/643#issuecomment-1029279488? Thanks!

hideyukn88 avatar Apr 01 '22 01:04 hideyukn88

I have the same problem. I tried to take a core dump, but it hangs... I tried to kill the core dump and restart it without any result.

In a first "wsl --system" session:

# ps -aux | grep weston
wslg        11  0.9  0.3 948232 60832 ?        Dl   09:39   0:23 /usr/bin/weston --backend=rdp-backend.so --xwayland --socket=wayland-0 --shell=rdprail-shell.so --logger-scopes=log,rdp-backend,rdprail-shell --log=/mnt/wslg/weston.log
wslg        22  0.0  0.0  15320  7692 ?        S    09:39   0:00 /usr/libexec/weston-rdprail-shell

# gcore 11 <-- It hangs...

I closed the terminal and reopen a new "wsl --system" session:

# gcore 11
warning: process 11 is already traced by process 3806
ptrace: Operation not permitted.
You can't do that without a process to debug.
The program is not being run.
gcore: failed to create core.11

# ps -aux | grep 3806
root      3806  0.0  0.1  23664 18540 ?        S    10:17   0:00 /usr/bin/gdb --nx --batch --readnever -ex set pagination off -ex set height 0 -ex set width 0 -ex attach 11 -ex gcore core.11 -ex detach -ex quit

# kill 3806

# ps -aux | grep 3806
root      3806  0.0  0.1  23664 18540 ?        S    10:17   0:00 /usr/bin/gdb --nx --batch --readnever -ex set pagination off -ex set height 0 -ex set width 0 -ex attach 11 -ex gcore core.11 -ex detach -ex quit

# kill -9 3806

# ps -aux | grep 3806

# gcore 11 <-- It hangs...

ferjul17 avatar May 13 '22 08:05 ferjul17

This issue has become the biggest blocker for continuing using WSLG for me. How can I contribute to debugging the root cause of this? It happens to me every time I try to resize my windows that are running in almost 4k resolution. I feel like there must be some overflow, race condition or bandwidth issue.

manvankaliber avatar May 31 '22 14:05 manvankaliber

WSLG is also freezing for me from time to time, mostly using JetBrains's PhpStorm, but when it freezes, it is all WSLG apps and not only JetBrain (e.g. Files as well). Also gcore [weston pid] hangs with no output.

ParhamG avatar Jun 14 '22 13:06 ParhamG

@ParhamG, would you please share output from dmesg? thanks!

hideyukn88 avatar Jun 14 '22 14:06 hideyukn88

@slagbat, when everything freezes, would you please share the core file following instruction at #643 (comment)? Thanks!

@hideyukn88 ...

I've tried this again with the same result as before and that is getting the gcore output is frozen on the command line. Here's a screenshot for good measure:

image

I don't know if this important but I also has an XWayland process running:

image

BenjaminThomson avatar Jun 15 '22 07:06 BenjaminThomson