Mapping a lot of windows at once using wl_shm gets Xwayland killed
When Xwayland cannot use glamor and GBM (typically when GL is implemented in software with LLVM as when running in a virtual machine), it falls back to
wl_shm to pass its buffers around.
In that case, if the X11 clients creates a whole lot of X11 windows at once, flooding the Wayland compositor as in xorg/xserver#1222, Wayland will abort taking down
Xwayland with the following error:
request could not be marshaled: can't send file descriptor
This message originates from
-1 as it hits the error case with
EAGAIN (typically the Wayland compositor cannot cope and the socket got full).
Trying to reconnect (as with xorg/xserver!756) will flood the Wayland compositor even more so this is unlikely to help in that particular case.
After some discussions on irc on #wayland with @emersion, @jadahl and @DemiMarie, Jonas suggested a possible solution for now would be to have an unbound output buffer for Wayland clients (which is different from #159) as the needs for clients are different from the ones for the server, it is not the same issue.
FWIW, I tried @mstoeckl's https://gitlab.freedesktop.org/mstoeckl/wayland/-/commits/variable-connection branch but to no avail, it still fails with
sendmsg() called from
wl_connection_flush() so maybe that branch doesn't account for all cases.