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 689721 - power off / log out fixes
power off / log out fixes
Status: RESOLVED FIXED
Product: gnome-session
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: Session Maintainers
Session Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-12-05 17:58 UTC by Ray Strode [halfline]
Modified: 2012-12-05 19:59 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
manager: when system prepared, start next phase, don't re-end current phase (1.64 KB, patch)
2012-12-05 17:58 UTC, Ray Strode [halfline]
committed Details | Review
manager: call complete_shutdown in better place (6.79 KB, patch)
2012-12-05 17:58 UTC, Ray Strode [halfline]
committed Details | Review

Description Ray Strode [halfline] 2012-12-05 17:58:38 UTC
Ryan noticed his log out was powering off and his power off was logging out.

The former is caused by a power off getting called unconditinally in the
wrong place, and the latter is caused by a infinite recursion crasher before
power off has a chance to get called.

A side effect of these patches is a fix for a 5 second timeout in the systemd power off
code path.
Comment 1 Ray Strode [halfline] 2012-12-05 17:58:39 UTC
Created attachment 230798 [details] [review]
manager: when system prepared, start next phase, don't re-end current phase

We currently end_phase the QUERY_END_SESSION phase multiple times.

The apparent intent of the code is to start the END_SESSION phase,
not re-end the QUERY_END_SESSSION phase so this commit fixes that.

The bug manifests as an infinite loop.
Comment 2 Ray Strode [halfline] 2012-12-05 17:58:42 UTC
Created attachment 230799 [details] [review]
manager: call complete_shutdown in better place

The code currently unconditionally calls complete_shutdown at the
bottom of the END_SESSION phase. This means it gets called at logout
time, and ConsoleKit users will get power off at logout time.

This commit moves it to be called in place of the superfluous calls
to attempt_stop/attempt_restart in gsm_manager_quit (which runs
at the proper time, during the EXIT phase, and has checks to exclude
the LOGOUT case)
Comment 3 Matthias Clasen 2012-12-05 19:46:41 UTC
Review of attachment 230798 [details] [review]:

fine with me
Comment 4 Matthias Clasen 2012-12-05 19:48:14 UTC
Review of attachment 230799 [details] [review]:

sure
Comment 5 Ray Strode [halfline] 2012-12-05 19:59:13 UTC
Attachment 230798 [details] pushed as 962df1a - manager: when system prepared, start next phase, don't re-end current phase
Attachment 230799 [details] pushed as 8b187ec - manager: call complete_shutdown in better place