XWayland hangs at 100% of CPU (causing gnome-shell to hang)
This is happening in Ubuntu 21.04 (running in vmware player) quite easily, just move around a Firefox-x11 (or any other x11 window) around, hitting the shell edges and you'll get all freezing with Xwayland process at 100%.
Hangs seems to have this trace:
0x000055b9abfb69b1 in xwl_screen_post_damage (xwl_screen=0x55b9ac423dd0) at ../../../../../hw/xwayland/xwayland.c:869
869 ../../../../../hw/xwayland/xwayland.c: No such file or directory.
(gdb) bt
#0 0x000055b9abfb69b1 in xwl_screen_post_damage (xwl_screen=0x55b9ac423dd0) at ../../../../../hw/xwayland/xwayland.c:869
#1 block_handler (data=0x55b9ac423dd0, timeout=<optimized out>) at ../../../../../hw/xwayland/xwayland.c:1037
#2 0x000055b9ac0ecf3e in BlockHandler (pTimeout=pTimeout@entry=0x7ffdc8574204) at ../../../../dix/dixutils.c:388
#3 0x000055b9ac119a52 in WaitForSomething (are_ready=0) at ../../../../os/WaitFor.c:201
#4 0x000055b9ac0e8297 in Dispatch () at ../../../../dix/dispatch.c:421
#5 0x000055b9ac0ec5a4 in dix_main (argc=16, argv=0x7ffdc85743e8, envp=<optimized out>) at ../../../../dix/main.c:276
#6 0x00007f5ab299d565 in __libc_start_main (main=0x55b9abfb5a80 <main>, argc=16, argv=0x7ffdc85743e8, init=<optimized out>,
fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffdc85743d8) at ../csu/libc-start.c:332
#7 0x000055b9abfb5abe in _start ()
(gdb) info local
xwl_window = 0x55b9acbf18f0
next_xwl_window = 0x7ffdc8574150
commit_window_list = {next = 0x55b9acbf1910, prev = 0x55b9acbf1910}
xwl_window = <optimized out>
next_xwl_window = <optimized out>
commit_window_list = {next = <optimized out>, prev = <optimized out>}
(gdb) print commit_window_list
$1 = {next = 0x55b9acbf1910, prev = 0x55b9acbf1910}
(gdb) print commit_window_list->next
$2 = (struct xorg_list *) 0x55b9acbf1910
(gdb) print commit_window_list->next->next
$3 = (struct xorg_list *) 0x7ffdc8574170
(gdb) print commit_window_list->next->next->next
$4 = (struct xorg_list *) 0x55b9acbf1910
(gdb) print commit_window_list->next->next->next->next
$5 = (struct xorg_list *) 0x7ffdc8574170
(gdb) print commit_window_list->next->next->next->next->next
$6 = (struct xorg_list *) 0x55b9acbf1910
(gdb) print commit_window_list->next->next->next->next->next->next
$7 = (struct xorg_list *) 0x7ffdc8574170
Funny enough that this doesn't happen when running from sources, while it's quite easy to replicate otherwise.