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 786080 - shell: g-c-c may segfault opening Display panel
shell: g-c-c may segfault opening Display panel
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: shell
git master
Other Linux
: Normal critical
: ---
Assigned To: Control-Center Maintainers
Control-Center Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-08-10 04:32 UTC by Mohammed Sadiq
Modified: 2017-08-22 17:27 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
display: Fix a crash when opening the panel with the lid closed (963 bytes, patch)
2017-08-22 17:26 UTC, Rui Matos
committed Details | Review

Description Mohammed Sadiq 2017-08-10 04:32:32 UTC
When Opening Display panel in new shell design, g-c-c may segfault.

How to reproduce:

1. Open g-c-c shell
2. Search for 'disp'
3. Click on Display panel in the search result

Result:
g-c-c segfaults.

Output from asan:

ASAN:DEADLYSIGNAL
=================================================================
==8019==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x7f095fb1edf4 bp 0x7ffc5c3162f0 sp 0x7ffc5c3161f0 T0)
    #0 0x7f095fb1edf3 in g_type_check_instance_cast /home/sadiq/jhbuild/checkout/glib/gobject/gtype.c:4052
    #1 0x55a58d2d4b01 in gcm_prefs_connect_cb /home/sadiq/jhbuild/checkout/gnome-control-center/panels/color/cc-color-panel.c:2024
    #2 0x7f095fdce38b in g_task_return_now /home/sadiq/jhbuild/checkout/glib/gio/gtask.c:1145
    #3 0x7f095fdcf041 in g_task_return /home/sadiq/jhbuild/checkout/glib/gio/gtask.c:1203
    #4 0x7f095fdcf8a4 in g_task_return_error /home/sadiq/jhbuild/checkout/glib/gio/gtask.c:1777
    #5 0x7f095fdcfaaa in g_task_return_new_error /home/sadiq/jhbuild/checkout/glib/gio/gtask.c:1811
    #6 0x7f0969a1c620 in cd_client_connect_cb ../../../../../../Main/Software/src/github/colord/lib/colord/cd-client.c:358
    #7 0x7f095fdce38b in g_task_return_now /home/sadiq/jhbuild/checkout/glib/gio/gtask.c:1145
    #8 0x7f095fdcf041 in g_task_return /home/sadiq/jhbuild/checkout/glib/gio/gtask.c:1203
    #9 0x7f095fdcf8a4 in g_task_return_error /home/sadiq/jhbuild/checkout/glib/gio/gtask.c:1777
    #10 0x7f095fe136e8 in get_connection_cb /home/sadiq/jhbuild/checkout/glib/gio/gdbusproxy.c:1827
    #11 0x7f095fdce38b in g_task_return_now /home/sadiq/jhbuild/checkout/glib/gio/gtask.c:1145
    #12 0x7f095fdcf041 in g_task_return /home/sadiq/jhbuild/checkout/glib/gio/gtask.c:1203
    #13 0x7f095fdcf8a4 in g_task_return_error /home/sadiq/jhbuild/checkout/glib/gio/gtask.c:1777
    #14 0x7f095fe01b49 in bus_get_async_initable_cb /home/sadiq/jhbuild/checkout/glib/gio/gdbusconnection.c:7297
    #15 0x7f095fdce38b in g_task_return_now /home/sadiq/jhbuild/checkout/glib/gio/gtask.c:1145
    #16 0x7f095fdce3c5 in complete_in_idle_cb /home/sadiq/jhbuild/checkout/glib/gio/gtask.c:1159
    #17 0x7f095f81995c in g_idle_dispatch /home/sadiq/jhbuild/checkout/glib/glib/gmain.c:5504
    #18 0x7f095f81a6a7 in g_main_dispatch /home/sadiq/jhbuild/checkout/glib/glib/gmain.c:3148
    #19 0x7f095f81cef1 in g_main_context_dispatch /home/sadiq/jhbuild/checkout/glib/glib/gmain.c:3813
    #20 0x7f095f81d056 in g_main_context_iterate /home/sadiq/jhbuild/checkout/glib/glib/gmain.c:3886
    #21 0x7f095f81d0d4 in g_main_context_iteration /home/sadiq/jhbuild/checkout/glib/glib/gmain.c:3947
    #22 0x7f095fde6820 in g_application_run /home/sadiq/jhbuild/checkout/glib/gio/gapplication.c:2401
    #23 0x55a58d28adef in main /home/sadiq/jhbuild/checkout/gnome-control-center/shell/main.c:57
    #24 0x7f095e51f2b0 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x202b0)
    #25 0x55a58d28abe9 in _start (/media/sadiq/Temp/jhbuild/install/bin/gnome-control-center+0x410be9)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /home/sadiq/jhbuild/checkout/glib/gobject/gtype.c:4052 in g_type_check_instance_cast
==8019==ABORTING


Thanks
Comment 1 Dominique Leuenberger 2017-08-18 16:37:59 UTC
also got a crash on display panel, but somewhat different bt:

  • #0 cc_display_config_manager_get_current
    at cc-display-config-manager.c line 60
  • #1 on_screen_changed
    at cc-display-panel.c line 2126
  • #2 cc_display_panel_up_client_changed
    at cc-display-panel.c line 3216
  • #3 cc_display_panel_init
    at cc-display-panel.c line 3480
  • #4 g_type_create_instance
  • #5 0x00007ffff07f9098 in
  • #6 g_object_new_valist
  • #7 g_object_new
  • #8 cc_panel_loader_load_by_name
    at cc-panel-loader.c line 237
  • #9 activate_panel
    at cc-window.c line 130
  • #10 cc_window_set_active_panel_from_id
    at cc-window.c line 466
  • #11 cc_application_command_line
    at cc-application.c line 172
  • #12 0x00007fffdeaca47d in
  • #13 0x00007fffdeac9acf in
  • #14 g_cclosure_marshal_generic_va
  • #15 0x00007ffff07f3d06 in
  • #16 g_signal_emit_valist
  • #17 g_signal_emit
  • #18 0x00007ffff0ae1913 in
  • #19 0x00007ffff0ae3ed8 in
  • #20 g_application_run
  • #21 main
    at main.c line 57

Comment 2 Rui Matos 2017-08-22 17:26:51 UTC
Created attachment 358172 [details] [review]
display: Fix a crash when opening the panel with the lid closed

The configuration manager might not be ready yet when we're called
from the lid state monitor handler. Don't do anything in that case.
Comment 3 Rui Matos 2017-08-22 17:27:30 UTC
Attachment 358172 [details] pushed as e5a1afe - display: Fix a crash when opening the panel with the lid closed