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 707396 - gnome-settings-daemon crashes when you click on gnome-shell poweroff button
gnome-settings-daemon crashes when you click on gnome-shell poweroff button
Status: RESOLVED FIXED
Product: gnome-desktop
Classification: Core
Component: libgnome-desktop
3.8.x
Other Linux
: Normal normal
: ---
Assigned To: Desktop Maintainers
Desktop Maintainers
: 707553 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2013-09-03 15:59 UTC by Armin K.
Modified: 2013-09-18 13:38 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
IdleMonitor: protect watches from being freed while in flight (3.79 KB, patch)
2013-09-03 16:40 UTC, Giovanni Campagna
committed Details | Review

Description Armin K. 2013-09-03 15:59:08 UTC
Not sure which is the right component, so I selected general.

As the title says, crash occours as soon as I click "power off" button on gnome-shell user menu.

I've captured the backtrace

  • #0 on_watch_added
    at gnome-idle-monitor.c line 430
  • #1 g_simple_async_result_complete
    at gsimpleasyncresult.c line 777
  • #2 reply_cb
    at gdbusproxy.c line 2630
  • #3 g_simple_async_result_complete
    at gsimpleasyncresult.c line 777
  • #4 g_dbus_connection_call_done
    at gdbusconnection.c line 5490
  • #5 g_simple_async_result_complete
    at gsimpleasyncresult.c line 777
  • #6 complete_in_idle_cb
    at gsimpleasyncresult.c line 789
  • #7 g_main_dispatch
    at gmain.c line 3065
  • #8 g_main_context_dispatch
    at gmain.c line 3641
  • #9 g_main_context_iterate
    at gmain.c line 3712
  • #10 g_main_loop_run
    at gmain.c line 3906
  • #11 gtk_main
    at gtkmain.c line 1157

Comment 1 Giovanni Campagna 2013-09-03 16:40:37 UTC
Created attachment 253993 [details] [review]
IdleMonitor: protect watches from being freed while in flight

If you added an idle watch and then immediately removed it, it
was possible that the watch was freed before the dbus call was
handled by mutter, thus causing a crash later one.
Prevent that by reference counting the watch structures.
Comment 2 Giovanni Campagna 2013-09-03 16:41:27 UTC
Patch is for gnome-desktop, so reassigning.
Comment 3 Matthias Clasen 2013-09-04 19:42:10 UTC
Review of attachment 253993 [details] [review]:

Looks right
Comment 4 Armin K. 2013-09-04 20:11:09 UTC
g-s-d doesn't crash anymore with git master + this patch applied
Comment 5 Colin Walters 2013-09-04 21:57:50 UTC
Attachment 253993 [details] pushed as 9172762 - IdleMonitor: protect watches from being freed while in flight
Comment 6 Rui Matos 2013-09-05 11:44:56 UTC
*** Bug 707553 has been marked as a duplicate of this bug. ***
Comment 7 David Woodhouse 2013-09-12 20:06:20 UTC
Could we also have this fixed in gnome-3-8 please? It's probably the cause of frequent gnome-shell crashes:
https://bugzilla.redhat.com/show_bug.cgi?id=982766
Comment 8 Bastien Nocera 2013-09-18 13:30:21 UTC
Reopening as this also happens on gnome-3-8.
Comment 9 Bastien Nocera 2013-09-18 13:38:11 UTC
Apparently the bug is different enough on 3.8, so closing this and David will open a new bug.