wlroots icon indicating copy to clipboard operation
wlroots copied to clipboard

xwayland server dies if clients try to spawn when DRM is suspended

Open Timidger opened this issue 7 years ago • 7 comments

To reproduce:

  1. Spawn an X11 app with a delay (e.g sleep 5 && konsole)
  2. Switch to a TTY and wait until the timer elapses
  3. Switch back and notice that all xwayland apps are gone (Wayland apps such as weston-terminal are unaffected)
  4. Can no longer spawn X11 apps

Relevant part from logs:

2017-12-28 11:32:20 - [backend/drm/backend.c:87] DRM fd paused
2017-12-28 11:32:22 - [xwayland/xwm.c:575] XCB_CREATE_NOTIFY (4194307)
2017-12-28 11:32:22 - [xwayland/xwm.c:575] XCB_CREATE_NOTIFY (4194308)
2017-12-28 11:32:22 - [xwayland/xwayland.c:179] Restarting Xwayland
2017-12-28 11:32:22 - [xwayland/sockets.c:47] Failed to bind socket @/tmp/.X11-unix/X1: Address already in use
(EE) 
Fatal server error:
(EE) wl_drm@4: error 0: authenicate failed
(EE) 
2017-12-28 11:32:22 - [xwayland/xwayland.c:121] WAYLAND_SOCKET=52 Xwayland :2 -rootless -terminate -listen 24 -listen 50 -wm 55
(EE) 
Fatal server error:
(EE) wl_drm@4: error 0: authenicate failed
(EE) 
2017-12-28 11:32:22 - [xwayland/xwayland.c:314] sent SIGUSR1 to process 14422
2017-12-28 11:32:25 - [backend/drm/backend.c:69] DRM fd resumed

wlroots has migrated to gitlab.freedesktop.org. This issue has been moved to:

https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/538

Timidger avatar Dec 28 '17 17:12 Timidger

We should also probably restart Xwayland when it dies. Will file a separate ticket.

ddevault avatar Dec 28 '17 18:12 ddevault

What happens is that xwayland seems to crash when DRM is paused. We do restart it:

2017-12-28 11:32:22 - [xwayland/xwayland.c:179] Restarting Xwayland

But it dies again.

emersion avatar Dec 28 '17 18:12 emersion

On GNOME, doing this crashes the whole compositor.

emersion avatar Dec 28 '17 18:12 emersion

I actually can't reproduce on my branch (#541, now merged), did that get fixed for you as well somehow?

I tried spawning some urxvt first then a gnome-terminal in which I did sleep 5; urxvt, then switched, waited a bit, got back with two urxvts -- or directly gnome-terminal from rootston without any Xwayland app running.

Could this be app dependant? I don't have konsole installed here to check... I'll install it if you still reproduce it on master.

martinetd avatar Dec 29 '17 20:12 martinetd

I can still reproduce with sleep 5; chromium.

emersion avatar Dec 29 '17 20:12 emersion

Thanks, could reproduce with firefox. Looking into what's different and if we can just make the crashy part wait till the focus is back.

martinetd avatar Dec 29 '17 20:12 martinetd

gnome-terminal wouldn't cause it because, AFAIK, it's a wayland app now (just tested using xeyes on my local machine)

Timidger avatar Dec 29 '17 21:12 Timidger