After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 782660 - gnome-shell login screen crashes on shutdown
gnome-shell login screen crashes on shutdown
Status: RESOLVED OBSOLETE
Product: mutter
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: mutter-maint
mutter-maint
Depends on:
Blocks:
 
 
Reported: 2017-05-15 16:40 UTC by Ray Strode [halfline]
Modified: 2021-07-05 13:52 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
wayland: start Xwayland in its own process group (6.70 KB, patch)
2017-05-15 16:41 UTC, Ray Strode [halfline]
reviewed Details | Review
wayland: don't core dump when the X server dies or disconnects (12.16 KB, patch)
2017-05-15 16:41 UTC, Ray Strode [halfline]
rejected Details | Review

Description Ray Strode [halfline] 2017-05-15 16:40:48 UTC
GDM kills the entire process group associated with the login screen
when shutting down.  This means Xwayland may die before mutter.
mutter crashes when Xwayland dies.

There two patches here.  The first one is tested and verified by
Laurent Bigonville. The second is something I think we should probably
hold off on for now, but I'm posting it to get it archived in case
we need it.
Comment 1 Ray Strode [halfline] 2017-05-15 16:41:12 UTC
Created attachment 351900 [details] [review]
wayland: start Xwayland in its own process group

We expect mutter to manage the life cycle of its Xwayland instance.
We enforce this expectation by crashing if Xwayland dies for any
reason we aren't expecting.

One legitimate reason Xwayland could die unexpectedly just before
mutter is if the process group that mutter and Xwayland are running
in is killed. In that case, which one dies first is a game of chance.
Mutter should not crash if Xwayland happens to die first in such a
scenario.

This commit moves Xwayland to its own process group, so killing mutter's
process group won't kill Xwayland, but will instead just kill mutter.

For extra resilience, this commit makes sure Xwayland kills itself
anytime mutter dies.
Comment 2 Ray Strode [halfline] 2017-05-15 16:41:16 UTC
Created attachment 351901 [details] [review]
wayland: don't core dump when the X server dies or disconnects

It makes no sense for us to drop core when the X server dies.
We didn't do anything wrong and the core dump implicates us
unfairly (confusing everyone).

Furthermore, there are legitimate reasons where the X connection
can go away out from under us (like session getting killed
explicitly or display manager clearing the server of clients in
preparation for ending the session).

This commit changes the code to more gracefully handle the X server
going away than crashing. If it goes away, we treat it as a hint
that the session is ending and just exit.
Comment 3 Ray Strode [halfline] 2017-05-15 16:43:20 UTC
Comment on attachment 351901 [details] [review]
wayland: don't core dump when the X server dies or disconnects

(marking rejected since I'd rather not introduce a meta_exit() call into the code if we can help it)
Comment 4 Jonas Ådahl 2017-05-19 02:53:37 UTC
Review of attachment 351900 [details] [review]:

This looks like a reasonable thing to do for now to me. Though, isn't there still a risk we'd still dump a core when the X server exits? The concern is that if we'd try to access the X connection after it is terminated, but before X has closed and sent SIGTERM to mutter, we'd still be hitting a g_error() you remove in the other patch.
Comment 5 GNOME Infrastructure Team 2021-07-05 13:52:13 UTC
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org.
As part of that, we are mass-closing older open tickets in bugzilla.gnome.org
which have not seen updates for a longer time (resources are unfortunately
quite limited so not every ticket can get handled).

If you can still reproduce the situation described in this ticket in a recent
and supported software version, then please follow
  https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines
and create a new ticket at
  https://gitlab.gnome.org/GNOME/mutter/-/issues/

Thank you for your understanding and your help.