We have some large multi-user labs running Fedora 26 and are finding that sometimes users cannot log on because a previous session left a socket in /tmp/.X11-unix. Xwayland seems more often than not to be leaving /tmp/.X?-lock and /tmp/.X11-unix/X? lying around when the user logs out. But for some reason, sometimes the lock is removed and the socket not. This is from one of our machines: $ ls -l /tmp/.X* -r--r--r-- 1 gdm gdm 11 Oct 11 07:59 /tmp/.X1024-lock /tmp/.X11-unix: total 0 srwxr-xr-x 1 ms17mwh msc 0 Oct 3 10:02 X1 srwxr-xr-x 1 gdm gdm 0 Oct 11 07:59 X1024 srwxr-xr-x 1 ms17ol msc 0 Oct 6 12:01 X2 Now when a user attempts to log in with a Gnome/Wayland session on one of the machines which has X0 and X1 in sockets, and X0-lock but no X1-lock, this happens: Oct 16 18:03:53 msc13 journal[18423]: failed to unlink stale lock file /tmp/.X0-lock: Operation not permitted Oct 16 18:03:53 msc13 audit[18423]: ANOM_ABEND auid=10282 uid=10282 gid=1013 ses=37 pid=18423 comm="gnome-shell" exe="/usr/bin/gnome-shell" sig=5 res=1 Oct 16 18:03:53 msc13 journal[18423]: failed to bind to /tmp/.X11-unix/X1: Address already in use Oct 16 18:03:53 msc13 journal[18423]: Failed to start X Wayland And the user is sent back to the login screen. If this is not fixed, we may have to consider disabling Wayland on all our workstations. The problems here are (a) these should be cleaned up when Xwayland exits, but they are not, and (b) Xwayland should not try to start on a display that already has a /tmp/.X11-unix socket owned by another user. Obviously Xwayland will not have permission to remove the stale socket and lock that another user left behind. Maybe GDM could do it instead?
Actually, Xwayland is not the problem here. Xwayland is started by gnome-shell/mutter which tries all by itself to find a suitable display number. If it fails, it bails out. Looks like gnome-shell/mutter can be fooled by stalled entries in /tmp/.X11-unix/ which prevents gnome-shell from starting the Wayland session. Instead of trying to find a suitable display, gnome-shell should use the option “displayfd” and let Xwayland chose the right display, Xwayland deals just fine with stalled entries...
This message is a reminder that Fedora 26 is nearing its end of life. Approximately 4 (four) weeks from now Fedora will stop maintaining and issuing updates for Fedora 26. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '26'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 26 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
Fedora 26 changed to end-of-life (EOL) status on 2018-05-29. Fedora 26 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed.