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 786097 - shell: g-c-c segfaults on opening some panels via search
shell: g-c-c segfaults on opening some panels via search
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
: 786816 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2017-08-10 08:51 UTC by Mohammed Sadiq
Modified: 2017-08-28 16:59 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
info: Don't leak GCancellables (1.53 KB, patch)
2017-08-27 18:20 UTC, Rui Matos
committed Details | Review
info: Don't leak GUnixMountEntry instances if we're cancelled (1.00 KB, patch)
2017-08-27 18:20 UTC, Rui Matos
committed Details | Review
info: Avoid a crash when we're cancelled (2.13 KB, patch)
2017-08-27 18:20 UTC, Rui Matos
none Details | Review
info: Avoid a crash when we're cancelled (1.94 KB, patch)
2017-08-27 18:57 UTC, Rui Matos
committed Details | Review

Description Mohammed Sadiq 2017-08-10 08:51:18 UTC
Many panels segfault when opened via search. bug 786080 may be added here.

1. Search for 'default' -> open 'Default Applications'
2. Search for 'date' -> open 'Date and Time'
3. Search for 'removable' -> open 'Removable media'
4. same for 'users' too

asan output:

gnome-control-center:21848): info-cc-panel-WARNING **: Failed to get filesystem free space for '/': Operation was cancelled
cc-info-overview-panel.c:546:9: runtime error: member access within misaligned address 0xaaaaaaaaaaaaaaaa for type 'struct GList', which requires 8 byte alignment
0xaaaaaaaaaaaaaaaa: note: pointer points here
<memory cannot be printed>
ASAN:DEADLYSIGNAL
=================================================================
==21848==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x56527b6817d2 bp 0x7fff8a6a15b0 sp 0x7fff8a6a1570 T0)
    #0 0x56527b6817d1 in get_primary_disc_info_start /home/sadiq/jhbuild/checkout/gnome-control-center/panels/info/cc-info-overview-panel.c:546
    #1 0x56527b681588 in query_done /home/sadiq/jhbuild/checkout/gnome-control-center/panels/info/cc-info-overview-panel.c:525
    #2 0x7fe28be8d38b in g_task_return_now /home/sadiq/jhbuild/checkout/glib/gio/gtask.c:1145
    #3 0x7fe28be8d3c5 in complete_in_idle_cb /home/sadiq/jhbuild/checkout/glib/gio/gtask.c:1159
    #4 0x7fe28b8d895c in g_idle_dispatch /home/sadiq/jhbuild/checkout/glib/glib/gmain.c:5504
    #5 0x7fe28b8d96a7 in g_main_dispatch /home/sadiq/jhbuild/checkout/glib/glib/gmain.c:3148
    #6 0x7fe28b8dbef1 in g_main_context_dispatch /home/sadiq/jhbuild/checkout/glib/glib/gmain.c:3813
    #7 0x7fe28b8dc056 in g_main_context_iterate /home/sadiq/jhbuild/checkout/glib/glib/gmain.c:3886
    #8 0x7fe28b8dc0d4 in g_main_context_iteration /home/sadiq/jhbuild/checkout/glib/glib/gmain.c:3947
    #9 0x7fe28bea5820 in g_application_run /home/sadiq/jhbuild/checkout/glib/gio/gapplication.c:2401
    #10 0x56527b5c6def in main /home/sadiq/jhbuild/checkout/gnome-control-center/shell/main.c:57
    #11 0x7fe28a5de2b0 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x202b0)
    #12 0x56527b5c6be9 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/gnome-control-center/panels/info/cc-info-overview-panel.c:546 in get_primary_disc_info_start
==21848==ABORTING
Comment 1 Mohammed Sadiq 2017-08-25 23:19:13 UTC
*** Bug 786816 has been marked as a duplicate of this bug. ***
Comment 2 Rui Matos 2017-08-27 18:20:15 UTC
Created attachment 358526 [details] [review]
info: Don't leak GCancellables

We were just plainly leaking them and there's really no need since
GCancellable instances can be re-used.
Comment 3 Rui Matos 2017-08-27 18:20:23 UTC
Created attachment 358527 [details] [review]
info: Don't leak GUnixMountEntry instances if we're cancelled

If we're cancelled the mount entries list might not have been totally
consumed so free it on finalize if needed.
Comment 4 Rui Matos 2017-08-27 18:20:30 UTC
Created attachment 358528 [details] [review]
info: Avoid a crash when we're cancelled

If we're cancelled, the panel is being finalized so return immediately
instead of iterating further and crashing.
Comment 5 Rui Matos 2017-08-27 18:57:09 UTC
Created attachment 358529 [details] [review]
info: Avoid a crash when we're cancelled

If we're cancelled, the panel is being finalized so return immediately
instead of iterating further and crashing.
Comment 6 Rui Matos 2017-08-28 16:59:06 UTC
Attachment 358526 [details] pushed as 546752f - info: Don't leak GCancellables
Attachment 358527 [details] pushed as 6ee7931 - info: Don't leak GUnixMountEntry instances if we're cancelled
Attachment 358529 [details] pushed as 5622704 - info: Avoid a crash when we're cancelled