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 769061 - GNOME-Software crashes on startup for first run
GNOME-Software crashes on startup for first run
Status: RESOLVED FIXED
Product: gnome-software
Classification: Applications
Component: General
3.21.x
Other Mac OS
: Normal normal
: ---
Assigned To: GNOME Software maintainer(s)
GNOME Software maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2016-07-21 22:25 UTC by Sam Spilsbury
Modified: 2016-07-22 11:57 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Block signal emission of unmapped signal before resizing array (1.74 KB, patch)
2016-07-21 22:31 UTC, Sam Spilsbury
none Details | Review
Disconnect signal handlers (1.74 KB, patch)
2016-07-21 22:53 UTC, Sam Spilsbury
none Details | Review

Description Sam Spilsbury 2016-07-21 22:25:59 UTC
On the first run of gnome-software, the application crashes a few seconds after startup.

Stacktrace:

Program received signal SIGSEGV, Segmentation fault.
__memmove_ssse3_back () at ../sysdeps/x86_64/multiarch/memcpy-ssse3-back.S:1550
1550	../sysdeps/x86_64/multiarch/memcpy-ssse3-back.S: No such file or directory.
(gdb) bt
  • #0 __memmove_ssse3_back
    at ../sysdeps/x86_64/multiarch/memcpy-ssse3-back.S line 1550
  • #1 g_ptr_array_remove_range
    at /usr/include/x86_64-linux-gnu/bits/string3.h line 57
  • #2 g_ptr_array_remove_range
    at /usr/src/packages/BUILD/glib2.0-2.48.0+dev40.9716bae/./glib/garray.c line 1277
  • #3 g_ptr_array_set_size
    at /usr/src/packages/BUILD/glib2.0-2.48.0+dev40.9716bae/./glib/garray.c line 1157
  • #4 gs_shell_change_mode
  • #5 _g_closure_invoke_va
    at /usr/src/packages/BUILD/glib2.0-2.48.0+dev40.9716bae/./gobject/gclosure.c line 867
  • #6 g_signal_emit_valist
    at /usr/src/packages/BUILD/glib2.0-2.48.0+dev40.9716bae/./gobject/gsignal.c line 3294
  • #7 g_signal_emit
    at /usr/src/packages/BUILD/glib2.0-2.48.0+dev40.9716bae/./gobject/gsignal.c line 3441
  • #8 _g_closure_invoke_va
    at /usr/src/packages/BUILD/glib2.0-2.48.0+dev40.9716bae/./gobject/gclosure.c line 867
  • #9 g_signal_emit_valist
    at /usr/src/packages/BUILD/glib2.0-2.48.0+dev40.9716bae/./gobject/gsignal.c line 3294
  • #10 g_signal_emit
    at /usr/src/packages/BUILD/glib2.0-2.48.0+dev40.9716bae/./gobject/gsignal.c line 3441
  • #11 0x000000000043ed02 in
  • #12 g_task_return_now
    at /usr/src/packages/BUILD/glib2.0-2.48.0+dev40.9716bae/./gio/gtask.c line 1107
  • #13 complete_in_idle_cb
    at /usr/src/packages/BUILD/glib2.0-2.48.0+dev40.9716bae/./gio/gtask.c line 1121
  • #14 g_main_context_dispatch
    at /usr/src/packages/BUILD/glib2.0-2.48.0+dev40.9716bae/./glib/gmain.c line 3154
  • #15 g_main_context_dispatch
    at /usr/src/packages/BUILD/glib2.0-2.48.0+dev40.9716bae/./glib/gmain.c line 3769
  • #16 g_main_context_iterate
    at /usr/src/packages/BUILD/glib2.0-2.48.0+dev40.9716bae/./glib/gmain.c line 3840
  • #17 g_main_context_iteration
    at /usr/src/packages/BUILD/glib2.0-2.48.0+dev40.9716bae/./glib/gmain.c line 3901
  • #18 g_application_run
    at /usr/src/packages/BUILD/glib2.0-2.48.0+dev40.9716bae/./gio/gapplication.c line 2381
  • #19 main

Comment 1 Sam Spilsbury 2016-07-21 22:31:12 UTC
Created attachment 331923 [details] [review]
Block signal emission of unmapped signal before resizing array

The unmapped signal handler removes dialogs from the ptr array
keeping track of dialogs. However, this signal handler might get
run when we set the ptr array's size to zero, which causes memmove
to be run twice.
    
Block the unmapped signal handler when resizing the array so that
this doesn't happen.
Comment 2 Sam Spilsbury 2016-07-21 22:53:06 UTC
Created attachment 331943 [details] [review]
Disconnect signal handlers

Use disconnect_by_func, not block_matched
Comment 3 Richard Hughes 2016-07-22 11:57:52 UTC
Pushed with a couple of trivial fixes, thanks!