Bug 1502800 - [Xwayland] Unable to start session because of left over sockets in /tmp/.X11-unix
Summary: [Xwayland] Unable to start session because of left over sockets in /tmp/.X11-...
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: mutter
Version: 26
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Florian Müllner
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-10-16 17:35 UTC by Ian Collier
Modified: 2018-05-29 11:51 UTC (History)
16 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2018-05-29 11:51:32 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1540986 0 unspecified CLOSED gnome-shell fails to start Xwayland with stalled entries in /tmp/.X11-unix/ 2021-02-22 00:41:40 UTC

Internal Links: 1540986

Description Ian Collier 2017-10-16 17:35:55 UTC
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?

Comment 1 Olivier Fourdan 2018-02-02 12:52:28 UTC
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...

Comment 2 Fedora End Of Life 2018-05-03 08:28:09 UTC
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.

Comment 3 Fedora End Of Life 2018-05-29 11:51:32 UTC
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.


Note You need to log in before you can comment on or make changes to this bug.