XWayland: mapping a lot of windows leads to crash
Ubuntu 21.04, Gnome Shell Wayland Session, Xwayland 21.1.1
Mapping a lot of windows leads to crash, please see attached reproducer windowSpawnDoS.c
For me it starts from ~260 windows.
journalctl
Sep 23 18:33:49 vbox gnome-shell[1297]: (EE) Sep 23 18:33:49 vbox gnome-shell[1297]: Fatal server error: Sep 23 18:33:49 vbox gnome-shell[1297]: (EE) request could not be marshaled: can't send file descriptor(EE) Sep 23 18:33:49 vbox gsd-xsettings[1633]: gsd-xsettings: Fatal IO error 11 (Resource temporarily unavailable) on X server :1. Sep 23 18:33:49 vbox gnome-shell[1257]: Connection to xwayland lost Sep 23 18:33:49 vbox ibus-daemon[1632]: GChildWatchSource: Exit status of a child process was requested but ECHILD was received by waitpid(). See the documentation of g_child_watch_source_new() for possible causes. Sep 23 18:33:49 vbox systemd[1091]: org.gnome.SettingsDaemon.XSettings.service: Main process exited, code=exited, status=1/FAILURE Sep 23 18:33:49 vbox systemd[1091]: org.gnome.SettingsDaemon.XSettings.service: Failed with result 'exit-code'. Sep 23 18:33:49 vbox gnome-terminal-[1794]: Error reading events from display: Connection reset by peer Sep 23 18:33:49 vbox gnome-calendar[1795]: Error reading events from display: Broken pipe Sep 23 18:33:49 vbox seahorse[1793]: Error reading events from display: Broken pipe Sep 23 18:33:49 vbox evolution-alarm[1494]: Error reading events from display: Broken pipe Sep 23 18:33:49 vbox gsd-color[1399]: Error reading events from display: Broken pipe Sep 23 18:33:49 vbox gsd-media-keys[1404]: Error reading events from display: Broken pipe Sep 23 18:33:49 vbox gsd-power[1405]: Error reading events from display: Broken pipe Sep 23 18:33:49 vbox gsd-wacom[1414]: Error reading events from display: Broken pipe Sep 23 18:33:49 vbox systemd[1091]: org.gnome.SettingsDaemon.MediaKeys.service: Main process exited, code=exited, status=1/FAILURE Sep 23 18:33:49 vbox systemd[1091]: org.gnome.SettingsDaemon.Wacom.service: Main process exited, code=exited, status=1/FAILURE Sep 23 18:33:49 vbox gsd-keyboard[1403]: Error reading events from display: Broken pipe Sep 23 18:33:49 vbox systemd[1091]: org.gnome.SettingsDaemon.Power.service: Main process exited, code=exited, status=1/FAILURE Sep 23 18:33:49 vbox update-notifier[2023]: Error reading events from display: Broken pipe Sep 23 18:33:49 vbox systemd[1091]: org.gnome.SettingsDaemon.Color.service: Main process exited, code=exited, status=1/FAILURE Sep 23 18:33:49 vbox systemd[1091]: org.gnome.SettingsDaemon.Keyboard.service: Main process exited, code=exited, status=1/FAILURE Sep 23 18:33:49 vbox systemd[1091]: org.gnome.SettingsDaemon.MediaKeys.service: Failed with result 'exit-code'. Sep 23 18:33:49 vbox systemd[1091]: org.gnome.SettingsDaemon.Wacom.service: Failed with result 'exit-code'. Sep 23 18:33:49 vbox polkitd(authority=local)[680]: Unregistered Authentication Agent for unix-session:1 (system bus name :1.82, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8) (disconnected from bus) Sep 23 18:33:49 vbox systemd[1091]: org.gnome.SettingsDaemon.Power.service: Failed with result 'exit-code'. Sep 23 18:33:49 vbox systemd[1091]: app-gnome-org.gnome.Evolution\x2dalarm\x2dnotify-1494.scope: Succeeded. Sep 23 18:33:49 vbox systemd[1091]: vte-spawn-5e1f8066-42c1-4e3e-a4b6-b84a51983ca9.scope: Succeeded. Sep 23 18:33:49 vbox systemd[1091]: org.gnome.Shell@wayland.service: Killing process 2137 (gmain) with signal SIGKILL. Sep 23 18:33:49 vbox systemd[1091]: org.gnome.SettingsDaemon.Color.service: Failed with result 'exit-code'. Sep 23 18:33:49 vbox systemd[1091]: gnome-terminal-server.service: Main process exited, code=exited, status=1/FAILURE Sep 23 18:33:49 vbox systemd[1091]: gnome-terminal-server.service: Failed with result 'exit-code'. Sep 23 18:33:49 vbox systemd[1091]: org.gnome.SettingsDaemon.Keyboard.service: Failed with result 'exit-code'. Sep 23 18:33:49 vbox systemd[1091]: app-gnome-update\x2dnotifier-2023.scope: Succeeded. Sep 23 18:33:49 vbox systemd[1091]: org.gnome.Shell@wayland.service: Succeeded. Sep 23 18:33:49 vbox systemd[1091]: org.gnome.SettingsDaemon.Keyboard.service: Scheduled restart job, restart counter is at 1. Sep 23 18:33:49 vbox systemd[1091]: org.gnome.SettingsDaemon.Color.service: Scheduled restart job, restart counter is at 1. Sep 23 18:33:49 vbox systemd[1091]: org.gnome.SettingsDaemon.Power.service: Scheduled restart job, restart counter is at 1. Sep 23 18:33:49 vbox systemd[1091]: org.gnome.SettingsDaemon.MediaKeys.service: Scheduled restart job, restart counter is at 1. Sep 23 18:33:49 vbox systemd[1091]: org.gnome.SettingsDaemon.Wacom.service: Scheduled restart job, restart counter is at 1. Sep 23 18:33:49 vbox systemd[1091]: Stopped GNOME color management service. Sep 23 18:33:49 vbox systemd[1091]: Starting GNOME color management service... Sep 23 18:33:49 vbox systemd[1091]: Stopped GNOME keyboard configuration service. Sep 23 18:33:49 vbox systemd[1091]: Starting GNOME keyboard configuration service... Sep 23 18:33:49 vbox systemd[1091]: Stopped GNOME keyboard shortcuts service. Sep 23 18:33:49 vbox systemd[1091]: Starting GNOME keyboard shortcuts service... Sep 23 18:33:49 vbox systemd[1091]: Stopped GNOME power management service. Sep 23 18:33:49 vbox systemd[1091]: Starting GNOME power management service... Sep 23 18:33:49 vbox systemd[1091]: Stopped GNOME Wacom tablet support service. Sep 23 18:33:49 vbox systemd[1091]: Starting GNOME Wacom tablet support service... Sep 23 18:33:49 vbox gsd-media-keys[2487]: Unable to init server: Could not connect: Connection refused Sep 23 18:33:49 vbox gsd-media-keys[2487]: Cannot open display: Sep 23 18:33:49 vbox gsd-keyboard[2486]: Unable to init server: Could not connect: Connection refused Sep 23 18:33:49 vbox gsd-keyboard[2486]: Cannot open display: Sep 23 18:33:49 vbox gsd-color[2485]: Unable to init server: Could not connect: Connection refused Sep 23 18:33:49 vbox gsd-color[2485]: Cannot open display: Sep 23 18:33:49 vbox systemd[1091]: org.gnome.SettingsDaemon.Keyboard.service: Main process exited, code=exited, status=1/FAILURE Sep 23 18:33:49 vbox systemd[1091]: org.gnome.SettingsDaemon.Color.service: Main process exited, code=exited, status=1/FAILURE Sep 23 18:33:49 vbox systemd[1091]: org.gnome.SettingsDaemon.Keyboard.service: Failed with result 'exit-code'. Sep 23 18:33:49 vbox systemd[1091]: Failed to start GNOME keyboard configuration service. Sep 23 18:33:49 vbox systemd[1091]: org.gnome.SettingsDaemon.MediaKeys.service: Main process exited, code=exited, status=1/FAILURE Sep 23 18:33:49 vbox systemd[1091]: org.gnome.SettingsDaemon.Color.service: Failed with result 'exit-code'. Sep 23 18:33:49 vbox systemd[1091]: Failed to start GNOME color management service. Sep 23 18:33:49 vbox systemd[1091]: org.gnome.SettingsDaemon.MediaKeys.service: Failed with result 'exit-code'. Sep 23 18:33:49 vbox systemd[1091]: Failed to start GNOME keyboard shortcuts service. Sep 23 18:33:49 vbox gsd-wacom[2489]: Unable to init server: Could not connect: Connection refused Sep 23 18:33:49 vbox gsd-wacom[2489]: Cannot open display: Sep 23 18:33:49 vbox systemd[1091]: org.gnome.SettingsDaemon.Wacom.service: Main process exited, code=exited, status=1/FAILURE Sep 23 18:33:49 vbox gsd-power[2488]: Unable to init server: Could not connect: Connection refused Sep 23 18:33:49 vbox gsd-power[2488]: Cannot open display: Sep 23 18:33:49 vbox systemd[1091]: org.gnome.SettingsDaemon.Power.service: Main process exited, code=exited, status=1/FAILURE Sep 23 18:33:49 vbox systemd[1091]: org.gnome.SettingsDaemon.Power.service: Failed with result 'exit-code'. Sep 23 18:33:49 vbox systemd[1091]: Failed to start GNOME power management service. Sep 23 18:33:49 vbox systemd[1091]: org.gnome.SettingsDaemon.Wacom.service: Failed with result 'exit-code'. Sep 23 18:33:49 vbox systemd[1091]: Failed to start GNOME Wacom tablet support service. Sep 23 18:33:50 vbox systemd[1091]: org.gnome.SettingsDaemon.Keyboard.service: Scheduled restart job, restart counter is at 2. Sep 23 18:33:50 vbox systemd[1091]: org.gnome.SettingsDaemon.Color.service: Scheduled restart job, restart counter is at 2. Sep 23 18:33:50 vbox systemd[1091]: org.gnome.SettingsDaemon.Power.service: Scheduled restart job, restart counter is at 2. Sep 23 18:33:50 vbox systemd[1091]: org.gnome.SettingsDaemon.Wacom.service: Scheduled restart job, restart counter is at 2. Sep 23 18:33:50 vbox systemd[1091]: org.gnome.SettingsDaemon.MediaKeys.service: Scheduled restart job, restart counter is at 2. Sep 23 18:33:50 vbox systemd[1091]: Stopped GNOME color management service. Sep 23 18:33:50 vbox systemd[1091]: Starting GNOME color management service... Sep 23 18:33:50 vbox systemd[1091]: Stopped GNOME keyboard configuration service. Sep 23 18:33:50 vbox systemd[1091]: Starting GNOME keyboard configuration service... Sep 23 18:33:50 vbox systemd[1091]: Stopped GNOME keyboard shortcuts service. Sep 23 18:33:50 vbox systemd[1091]: Starting GNOME keyboard shortcuts service... Sep 23 18:33:50 vbox systemd[1091]: Stopped GNOME power management service. Sep 23 18:33:50 vbox systemd[1091]: Starting GNOME power management service... Sep 23 18:33:50 vbox systemd[1091]: Stopped GNOME Wacom tablet support service. Sep 23 18:33:50 vbox systemd[1091]: Starting GNOME Wacom tablet support service... Sep 23 18:33:50 vbox gsd-color[2495]: Unable to init server: Could not connect: Connection refused Sep 23 18:33:50 vbox gsd-color[2495]: Cannot open display: Sep 23 18:33:50 vbox gsd-keyboard[2496]: Unable to init server: Could not connect: Connection refused Sep 23 18:33:50 vbox gsd-keyboard[2496]: Cannot open display:
Edited by Alexander Zvegintsev