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 700376 - segfault on changing languages quickly
segfault on changing languages quickly
Status: RESOLVED FIXED
Product: gnome-initial-setup
Classification: Applications
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: GNOME Initial Setup maintainer(s)
GNOME Initial Setup maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2013-05-15 10:55 UTC by Michael Wood
Modified: 2013-05-20 15:27 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
account: Fix two segfaults in dispose (when changing languages quickly) (1.14 KB, patch)
2013-05-20 14:59 UTC, Michael Wood
accepted-commit_now Details | Review

Description Michael Wood 2013-05-15 10:55:41 UTC
Due to all the pages being disposed/created and various race conditions being created here if you change the language quickly you'll end up with a segfault.

Reproduce by going to languages page and changing between multiple languages quickly.

Not worth attaching a backtrace as it's just a time dependant thing.
Comment 1 Michael Wood 2013-05-20 14:59:17 UTC
Created attachment 244822 [details] [review]
account: Fix two segfaults in dispose (when changing languages quickly)

Crash 1 (g_clear of libaccountservice objects which are transfer-none)

Program received signal SIGSEGV, Segmentation fault.
0x00007fffed0cd193 in g_object_unref (_object=0xa32510) at gobject.c:3081
3081	  g_return_if_fail (G_IS_OBJECT (object));
(gdb) bt
  • #0 g_object_unref
    at gobject.c line 3081
  • #1 gis_account_page_dispose
    at gis-account-page.c line 976
  • #2 g_object_run_dispose
    at gobject.c line 1062
  • #3 gtk_widget_destroy
    at gtkwidget.c line 4270
  • #4 destroy_pages_after
    at gnome-initial-setup.c line 151
  • #5 rebuild_pages_cb
    at gnome-initial-setup.c line 171
  • #6 _g_closure_invoke_va
    at gclosure.c line 840
  • #7 g_signal_emit_valist
    at gsignal.c line 3234
  • #8 g_signal_emit
    at gsignal.c line 3384
  • #9 rebuild_pages
    at gis-driver.c line 127
  • #10 g_main_dispatch
    at gmain.c line 3058
  • #11 g_main_context_dispatch
    at gmain.c line 3634
  • #12 g_main_context_iterate
    at gmain.c line 3705
  • #13 g_main_context_iteration
    at gmain.c line 3766
  • #14 g_application_run
    at gapplication.c line 1624
  • #15 main
    at gnome-initial-setup.c line 250
  • #0 on_realmd_disappeared
    at gis-account-page.c line 858
  • #1 do_call
    at gdbusnamewatching.c line 216
  • #2 call_vanished_handler
    at gdbusnamewatching.c line 242
  • #3 call_vanished_handler
    at gdbusnamewatching.c line 234
  • #4 get_name_owner_cb
    at gdbusnamewatching.c line 352
  • #5 g_simple_async_result_complete
    at gsimpleasyncresult.c line 777
  • #6 g_dbus_connection_call_done
    at gdbusconnection.c line 5402
  • #7 g_simple_async_result_complete
    at gsimpleasyncresult.c line 777
  • #8 complete_in_idle_cb
    at gsimpleasyncresult.c line 789
  • #9 g_main_dispatch
    at gmain.c line 3058
  • #10 g_main_context_dispatch
    at gmain.c line 3634
  • #11 g_main_context_iterate
    at gmain.c line 3705
  • #12 g_main_context_iteration
    at gmain.c line 3766
  • #13 g_application_run
    at gapplication.c line 1624
  • #14 main
    at gnome-initial-setup.c line 250

Comment 2 Michael Wood 2013-05-20 15:00:19 UTC
Bugzilla ate my other crash bt!

Crash 2 (fixed by g_bus_unwatch_name)

Program received signal SIGSEGV, Segmentation fault.
on_realmd_disappeared (unused1=0x7ca840, 
    unused2=0xe81b30 "org.freedesktop.realmd", user_data=0x930be0)
    at gis-account-page.c:858
858	  if (priv->realm_manager != NULL) {
(gdb) bt
  • #0 on_realmd_disappeared
    at gis-account-page.c line 858
  • #1 do_call
    at gdbusnamewatching.c line 216
  • #2 call_vanished_handler
    at gdbusnamewatching.c line 242
  • #3 call_vanished_handler
    at gdbusnamewatching.c line 234
  • #4 get_name_owner_cb
    at gdbusnamewatching.c line 352
  • #5 g_simple_async_result_complete
    at gsimpleasyncresult.c line 777
  • #6 g_dbus_connection_call_done
    at gdbusconnection.c line 5402
  • #7 g_simple_async_result_complete
    at gsimpleasyncresult.c line 777
  • #8 complete_in_idle_cb
    at gsimpleasyncresult.c line 789
  • #9 g_main_dispatch
    at gmain.c line 3058
  • #10 g_main_context_dispatch
    at gmain.c line 3634
  • #11 g_main_context_iterate
    at gmain.c line 3705
  • #12 g_main_context_iteration
    at gmain.c line 3766
  • #13 g_application_run
    at gapplication.c line 1624
  • #14 main
    at gnome-initial-setup.c line 250

Comment 3 Jasper St. Pierre (not reading bugmail) 2013-05-20 15:12:17 UTC
Review of attachment 244822 [details] [review]:

OK.
Comment 4 Michael Wood 2013-05-20 15:27:01 UTC
pushed as a2a6d134ad6b3a36c36e038e296cab3d0e4d2e59

Seems I was a bit hasty with the initial bug report, this does fix the crashes.