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

Created on 28 Dec 2017  路  7Comments  路  Source: swaywm/wlroots

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
bug

Most helpful comment

On GNOME, doing this crashes the whole compositor.

All 7 comments

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

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.

On GNOME, doing this crashes the whole compositor.

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.

I can still reproduce with sleep 5; chromium.

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.

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

emersion picture emersion  路  6Comments

acrisci picture acrisci  路  5Comments

ElkMonster picture ElkMonster  路  6Comments

p-hamann picture p-hamann  路  4Comments

ddevault picture ddevault  路  5Comments