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 657924 - gnome-settings-daemon crashed with SIGSEGV in gnome_rr_screen_get_dpms_mode()
gnome-settings-daemon crashed with SIGSEGV in gnome_rr_screen_get_dpms_mode()
Status: RESOLVED FIXED
Product: gnome-settings-daemon
Classification: Core
Component: power
3.1.x
Other Linux
: Normal critical
: ---
Assigned To: Richard Hughes
gnome-settings-daemon-maint
Depends on:
Blocks:
 
 
Reported: 2011-09-01 12:38 UTC by Pedro Villavicencio
Modified: 2011-09-01 15:51 UTC
See Also:
GNOME target: ---
GNOME version: 3.1/3.2


Attachments
power: Do most of the work in _start () (5.00 KB, patch)
2011-09-01 15:32 UTC, Bastien Nocera
committed Details | Review

Description Pedro Villavicencio 2011-09-01 12:38:38 UTC
this report has been filed here:

https://bugs.launchpad.net/ubuntu/+source/gnome-desktop3/+bug/838670

".

Thread 1 (Thread 0x7f10d9224940 (LWP 5133))

  • #0 gnome_rr_screen_get_dpms_mode
    at gnome-rr.c line 1189
  • #1 gnome_rr_screen_set_dpms_mode
    at gnome-rr.c line 1251
  • #2 do_lid_open_action
    at gsd-power-manager.c line 2073
  • #3 up_client_changed_cb
    at gsd-power-manager.c line 2160
  • #4 up_client_changed_cb
    at gsd-power-manager.c line 2138
  • #5 g_closure_invoke
    at /build/buildd/glib2.0-2.29.16/./gobject/gclosure.c line 773
  • #6 signal_emit_unlocked_R
    at /build/buildd/glib2.0-2.29.16/./gobject/gsignal.c line 3271
  • #7 g_signal_emit_valist
    at /build/buildd/glib2.0-2.29.16/./gobject/gsignal.c line 3002
  • #8 g_signal_emit
    at /build/buildd/glib2.0-2.29.16/./gobject/gsignal.c line 3059
  • #9 marshal_dbus_message_to_g_marshaller
    at dbus-gproxy.c line 1733
  • #10 g_closure_invoke
    at /build/buildd/glib2.0-2.29.16/./gobject/gclosure.c line 773
  • #11 signal_emit_unlocked_R
    at /build/buildd/glib2.0-2.29.16/./gobject/gsignal.c line 3271
  • #12 g_signal_emit_valist
    at /build/buildd/glib2.0-2.29.16/./gobject/gsignal.c line 3002
  • #13 g_signal_emit
    at /build/buildd/glib2.0-2.29.16/./gobject/gsignal.c line 3059
  • #14 dbus_g_proxy_emit_remote_signal
    at dbus-gproxy.c line 1786
  • #15 dbus_g_proxy_manager_filter
    at dbus-gproxy.c line 1353
  • #16 dbus_g_proxy_manager_filter
    at dbus-gproxy.c line 1194
  • #17 dbus_connection_dispatch
    from /tmp/tmp7WJOm_/lib/x86_64-linux-gnu/libdbus-1.so.3
  • #18 message_queue_dispatch
    at dbus-gmain.c line 90
  • #19 g_main_dispatch
    at /build/buildd/glib2.0-2.29.16/./glib/gmain.c line 2439
  • #20 g_main_context_dispatch
    at /build/buildd/glib2.0-2.29.16/./glib/gmain.c line 3008
  • #21 g_main_context_iterate
    at /build/buildd/glib2.0-2.29.16/./glib/gmain.c line 3086
  • #22 g_main_loop_run
    at /build/buildd/glib2.0-2.29.16/./glib/gmain.c line 3294
  • #23 gtk_main
    at /build/buildd/gtk+3.0-3.1.12/./gtk/gtkmain.c line 1367
  • #24 main
    at main.c line 451

Comment 1 Federico Mena Quintero 2011-09-01 15:16:03 UTC
The problem is that the passed "screen" argument is NULL.

From a quick look at the code in g-s-d/plugins/power, it does this:

1. Connect to UpClient's signals in gsd_power_manager_init()

2. Initialize manager->priv->x11_screen in gsd_power_manager_start().

3. Catch a signal, process it in up_client_changed_cb()

4. Call do_lid_open_action() from there.  But at that point, screen = NULL.

Do we know if the manager has been start()ed by the time (3) happens, so that the screen is initialized?

Or did that x11_screen field get overwritten with a 0 at some point?
Comment 2 Bastien Nocera 2011-09-01 15:32:07 UTC
Created attachment 195396 [details] [review]
power: Do most of the work in _start ()

We're not supposed to start listening to signals in _init(),
but in _start(). This fixes a number of potential crashes,
including one when calling out to gnome-desktop.

Thanks for Federico Mena Quintero for the root causing.