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 763169 - gnome-session-binary crashes on logoff
gnome-session-binary crashes on logoff
Status: RESOLVED FIXED
Product: gnome-session
Classification: Core
Component: gnome-session
git master
Other Linux
: Normal critical
: ---
Assigned To: Session Maintainers
Session Maintainers
: 763333 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2016-03-06 10:28 UTC by Hussam Al-Tayeb
Modified: 2016-03-14 20:29 UTC
See Also:
GNOME target: ---
GNOME version: 3.19/3.20


Attachments
inhibitor: don't try to access inhibitor after it's vanished (3.18 KB, patch)
2016-03-09 18:50 UTC, Ray Strode [halfline]
committed Details | Review
client: don't try to access client after it's vanished (2.81 KB, patch)
2016-03-14 20:28 UTC, Ray Strode [halfline]
committed Details | Review
client: track client disconnection for dbus clients (3.18 KB, patch)
2016-03-14 20:28 UTC, Ray Strode [halfline]
committed Details | Review

Description Hussam Al-Tayeb 2016-03-06 10:28:48 UTC
If I log onto gnome and then try to log off, I get a dialog saying it is going to log off in 60 seconds and it waits 60s seconds.
However if I open an application like evolution that inhibits the logoff process, then close it, then try logging off, the logoff dialog says some applications may have unsaved work and immediately logs off without waiting 60 seconds.
I looked into the journal and I something possibly related:
           PID: 24462 (gnome-session-b)
           UID: 1000 (hussam)
           GID: 100 (users)
        Signal: 11 (SEGV)
     Timestamp: Sun 2016-03-06 12:19:45 EET (2min 52s ago)
  Command Line: /usr/lib/gnome-session/gnome-session-binary
    Executable: /usr/lib/gnome-session/gnome-session-binary
 Control Group: /user.slice/user-1000.slice/session-c15.scope
          Unit: session-c15.scope
         Slice: user-1000.slice
       Session: c15
     Owner UID: 1000 (hussam)
       Boot ID: 515a8283e9064f84b24c4a7bbbf7b846
    Machine ID: efb490e643e2436d9d1138df1745a008
      Hostname: hades
       Message: Process 24462 (gnome-session-b) of user 1000 dumped core.
                
                Stack trace of thread 24462:
                #0  0x00000000004210ab n/a (gnome-session-binary)
                #1  0x00007fb006cf4d7a do_call (libgio-2.0.so.0)
                #2  0x00007fb006cf53c4 call_vanished_handler (libgio-2.0.so.0)
                #3  0x00007fb006c993c9 g_task_return_now (libgio-2.0.so.0)
                #4  0x00007fb006c99c1e g_task_return (libgio-2.0.so.0)
                #5  0x00007fb006ceb75f g_dbus_connection_call_done (libgio-2.0.s
                #6  0x00007fb006c993c9 g_task_return_now (libgio-2.0.so.0)
                #7  0x00007fb006c99409 complete_in_idle_cb (libgio-2.0.so.0)
                #8  0x00007fb0066f2e7a g_main_dispatch (libglib-2.0.so.0)
                #9  0x00007fb0066f3220 g_main_context_iterate (libglib-2.0.so.0)
                #10 0x00007fb0066f3542 g_main_loop_run (libglib-2.0.so.0)
                #11 0x0000000000409d2e n/a (gnome-session-binary)
                #12 0x00007fb006328710 __libc_start_main (libc.so.6)
                #13 0x000000000040a079 n/a (gnome-session-binary)
                
                Stack trace of thread 24488:
                #0  0x00007fb0063e6c3d poll (libc.so.6)
                #1  0x00007fb0066f31bc g_main_context_poll (libglib-2.0.so.0)
                #2  0x00007fb0066f32cc g_main_context_iteration (libglib-2.0.so.
                #3  0x00007fb0066f3309 glib_worker_main (libglib-2.0.so.0)
                #4  0x00007fb006719c25 g_thread_proxy (libglib-2.0.so.0)
                #5  0x00007fb005eed424 start_thread (libpthread.so.0)
                #6  0x00007fb0063efcbd __clone (libc.so.6)
                
                Stack trace of thread 24909:
                #0  0x00007fb0063eb7f9 syscall (libc.so.6)
                #1  0x00007fb006737daa g_cond_wait_until (libglib-2.0.so.0)
                #2  0x00007fb0066c7969 g_async_queue_pop_intern_unlocked (libgli
                #3  0x00007fb00671a596 g_thread_pool_wait_for_new_task (libglib-
                #4  0x00007fb006719c25 g_thread_proxy (libglib-2.0.so.0)
                #5  0x00007fb005eed424 start_thread (libpthread.so.0)
                #6  0x00007fb0063efcbd __clone (libc.so.6)
                
                Stack trace of thread 24491:
                #0  0x00007fb0063e6c3d poll (libc.so.6)
                #1  0x00007fb0066f31bc g_main_context_poll (libglib-2.0.so.0)
                #2  0x00007fb0066f32cc g_main_context_iteration (libglib-2.0.so.
                #3  0x00007faffa7f42ad n/a (libdconfsettings.so)
                #4  0x00007fb006719c25 g_thread_proxy (libglib-2.0.so.0)
                #5  0x00007fb005eed424 start_thread (libpthread.so.0)
                #6  0x00007fb0063efcbd __clone (libc.so.6)
                
                Stack trace of thread 24489:
                #0  0x00007fb0063e6c3d poll (libc.so.6)
                #1  0x00007fb0066f31bc g_main_context_poll (libglib-2.0.so.0)
                #2  0x00007fb0066f3542 g_main_loop_run (libglib-2.0.so.0)
                #3  0x00007fb006cf9a56 gdbus_shared_thread_func (libgio-2.0.so.0
                #4  0x00007fb006719c25 g_thread_proxy (libglib-2.0.so.0)
                #5  0x00007fb005eed424 start_thread (libpthread.so.0)
                #6  0x00007fb0063efcbd __clone (libc.so.6)
Comment 1 Hussam Al-Tayeb 2016-03-06 18:17:33 UTC
Not sure if related but gnome-shell no longer respects /org/gnome/shell/always-show-log-out being set to false. It always shows the log off option even though there is only a single user on this machine.
Comment 2 Hussam Al-Tayeb 2016-03-07 09:09:23 UTC
This is an issue because I don't get a chance to press "cancel" even though it says 60 seconds.
It looks like some related checkins went into gnome-session 3.19.91.
Marking as major since this is somewhat a big deal.
Comment 3 Bjørn Lie 2016-03-07 09:34:19 UTC
Reverting https://git.gnome.org/browse/gnome-session/commit/?id=58c9323ea7b8e51f19449f596bb6826e7600c020

fixed a similar issue for me (I don't even get the dialog, it just instantly kills my session).
Comment 4 Bjørn Lie 2016-03-07 11:00:58 UTC
(In reply to Bjørn Lie from comment #3)
> Reverting
> https://git.gnome.org/browse/gnome-session/commit/
> ?id=58c9323ea7b8e51f19449f596bb6826e7600c020
> 
> fixed a similar issue for me (I don't even get the dialog, it just instantly
> kills my session).

Right.. - spoke too soon, just had the instant kill on logout again.
Comment 5 Hussam Al-Tayeb 2016-03-07 20:21:13 UTC
Reverting to 3.19.4 fixes the logout issues.
Comment 6 Ray Strode [halfline] 2016-03-09 18:28:40 UTC
eek
Comment 7 Ray Strode [halfline] 2016-03-09 18:50:33 UTC
Created attachment 323538 [details] [review]
inhibitor: don't try to access inhibitor after it's vanished

After we emit the vanished signal on the inhibitor it's likely
to get freed, so don't try to use it from that point forward.
Comment 8 Ray Strode [halfline] 2016-03-09 18:50:59 UTC
I think this should be fixed now, but if you continue to have problems, please reopen.

Attachment 323538 [details] pushed as bd7592d - inhibitor: don't try to access inhibitor after it's vanished
Comment 9 Ray Strode [halfline] 2016-03-09 18:58:45 UTC
*** Bug 763333 has been marked as a duplicate of this bug. ***
Comment 10 Hussam Al-Tayeb 2016-03-09 19:07:45 UTC
I'll try that patch now.
Are you applying it to gnome-3-20 branch as well?
Comment 11 Hussam Al-Tayeb 2016-03-09 19:15:11 UTC
Ok, now it won't log me off at all if there was an inhibitor and it was closed.
Comment 12 Hussam Al-Tayeb 2016-03-09 19:23:06 UTC
(In reply to Hussam Al-Tayeb from comment #11)
> Ok, now it won't log me off at all if there was an inhibitor and it was
> closed.

Ok, the crash is gone but subsequent log off attempts after I cancel in the logout dialog, close the inhibitor appear to not do anything.
But then gnome logs off on its own after 60 seconds (without the log off dialog open).
Comment 13 Ray Strode [halfline] 2016-03-09 19:57:08 UTC
probably technically a different bug, but let's just recycle this one.
Comment 14 Ray Strode [halfline] 2016-03-14 20:28:25 UTC
Created attachment 323918 [details] [review]
client: don't try to access client after it's vanished

After we emit the disconnected signal on the client it's likely
to get freed, so don't try to use it from that point forward.
Comment 15 Ray Strode [halfline] 2016-03-14 20:28:29 UTC
Created attachment 323919 [details] [review]
client: track client disconnection for dbus clients

We currently don't notice when dbus clients go away
(well we notice, but ignore it).

This commit fixes that.
Comment 16 Ray Strode [halfline] 2016-03-14 20:29:28 UTC
Attachment 323918 [details] pushed as a8be66f - client: don't try to access client after it's vanished
Attachment 323919 [details] pushed as d0b97be - client: track client disconnection for dbus clients