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 749715 - segfault at any time
segfault at any time
Status: RESOLVED FIXED
Product: NetworkManager
Classification: Platform
Component: nm-applet
unspecified
Other Linux
: Normal normal
: ---
Assigned To: NetworkManager maintainer(s)
NetworkManager maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2015-05-22 07:58 UTC by Pavel Simerda
Modified: 2016-09-02 00:19 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Pavel Simerda 2015-05-22 07:58:35 UTC
Applet crashes often, so I'm running it in gdb and this is what I found out so far...

(gdb) bt
  • #0 g_hash_table_remove_all
    from /usr/lib64/libglib-2.0.so.0
  • #1 nma_icons_reload
    at applet.c line 3300
  • #2 g_closure_invoke
    from /usr/lib64/libgobject-2.0.so.0
  • #3 ??
    from /usr/lib64/libgobject-2.0.so.0
  • #4 g_signal_emit_valist
    from /usr/lib64/libgobject-2.0.so.0
  • #5 g_signal_emit
    from /usr/lib64/libgobject-2.0.so.0
  • #6 ??
    from /usr/lib64/libgtk-3.so.0
  • #7 ??
    from /usr/lib64/libgdk-3.so.0
  • #8 g_main_context_dispatch
    from /usr/lib64/libglib-2.0.so.0
  • #9 ??
    from /usr/lib64/libglib-2.0.so.0
  • #10 g_main_loop_run
    from /usr/lib64/libglib-2.0.so.0
  • #11 main
    at main.c line 84
  • #0 g_hash_table_remove_all
    from /usr/lib64/libglib-2.0.so.0
  • #1 nma_icons_reload
    at applet.c line 3300

(gdb) print *applet
$1 = {parent_instance = {g_type_instance = {g_class = 0x6fdc50}, ref_count = 2, qdata = 0x9556f0}, session_bus = 0x6c8c00, nm_client = 0x0, agent = 0x0, 
  gsettings = 0x0, mm1 = 0x0, mm1_running = 6678880, visible = 0, permissions = {4138924323, 32767, NM_CLIENT_PERMISSION_RESULT_NO, 
    NM_CLIENT_PERMISSION_RESULT_UNKNOWN, 64, NM_CLIENT_PERMISSION_RESULT_UNKNOWN, 7709584, NM_CLIENT_PERMISSION_RESULT_UNKNOWN, 8004912, 
    NM_CLIENT_PERMISSION_RESULT_UNKNOWN, 8004944, NM_CLIENT_PERMISSION_RESULT_UNKNOWN}, ethernet_class = 0x0, wifi_class = 0x100000002, 
  broadband_class = 0x0, bt_class = 0x0, wimax_class = 0x0, vlan_class = 0x5f, bond_class = 0x7ffff7062a00, team_class = 0x0, bridge_class = 0x0, 
  infiniband_class = 0x0, update_icon_id = 0, tip = 0x65e960 "\260xe", animation_step = 6714661, animation_id = 0, icon_theme = 0x3, icon_cache = 0x40, 
  fallback_icon = 0x75a390, icon_size = 7990112, icon_layers = {0x79eb80, 0x0}, app_indicator = 0x200000002, update_menu_id = 0, 
  networking_enabled_item = 0x0, networking_enabled_toggled_id = 0, wifi_enabled_item = 0x5f, wifi_enabled_toggled_id = 4144376320, wwan_enabled_item = 0x0, 
  wwan_enabled_toggled_id = 0, wimax_enabled_item = 0x0, wimax_enabled_toggled_id = 0, info_menu_item = 0x65e960, connections_menu_item = 0x7ffff6b4f2d6, 
  info_dialog_ui = 0xe3, notification = 0x40, secrets_reqs = 0x75a390}

(gdb) print applet->icon_cache
$2 = (GHashTable *) 0x40

The icon cache pointer is set to a clearly wrong value. I will continue researching this.
Comment 1 Pavel Simerda 2015-05-22 07:58:51 UTC
Note: I'm building with appindicator support.
Comment 2 Pavel Simerda 2015-05-22 08:01:32 UTC
I was lucky. A simple watch on applet->icon_cache and new run lead got me to the point where the wrong value is assigned.

(gdb) 
Continuing.
Hardware watchpoint 1: -location applet->icon_cache

Old value = (GHashTable *) 0x0
New value = (GHashTable *) 0x40
0x00007ffff57be684 in ?? () from /usr/lib64/libgobject-2.0.so.0
(gdb) bt
  • #0 ??
    from /usr/lib64/libgobject-2.0.so.0
  • #1 g_type_create_instance
    from /usr/lib64/libgobject-2.0.so.0
  • #2 g_param_spec_internal
    from /usr/lib64/libgobject-2.0.so.0
  • #3 g_param_spec_string
    from /usr/lib64/libgobject-2.0.so.0
  • #4 ??
    from /usr/lib64/libgtk-3.so.0
  • #5 g_type_class_ref
    from /usr/lib64/libgobject-2.0.so.0
  • #6 gtk_builder_get_type_from_name
    from /usr/lib64/libgtk-3.so.0
  • #7 ??
    from /usr/lib64/libgtk-3.so.0
  • #8 ??
    from /usr/lib64/libglib-2.0.so.0
  • #9 g_markup_parse_context_parse
    from /usr/lib64/libglib-2.0.so.0
  • #10 ??
    from /usr/lib64/libgtk-3.so.0
  • #11 ??
    from /usr/lib64/libgtk-3.so.0
  • #12 gtk_widget_init_template
    from /usr/lib64/libgtk-3.so.0
  • #13 ??
    from /usr/lib64/libgtk-3.so.0
  • #14 g_type_create_instance
    from /usr/lib64/libgobject-2.0.so.0
  • #15 ??
    from /usr/lib64/libgobject-2.0.so.0
  • #16 g_object_newv
    from /usr/lib64/libgobject-2.0.so.0
  • #17 ??
    from /usr/lib64/libgtk-3.so.0
  • #18 ??
    from /usr/lib64/libgtk-3.so.0
  • #19 ??
    from /usr/lib64/libgtk-3.so.0
  • #20 ??
    from /usr/lib64/libglib-2.0.so.0
  • #21 g_markup_parse_context_parse
    from /usr/lib64/libglib-2.0.so.0
  • #22 ??
    from /usr/lib64/libgtk-3.so.0
  • #23 gtk_builder_add_from_file
    from /usr/lib64/libgtk-3.so.0
  • #24 initable_init
    at applet.c line 3575
  • #25 g_initable_new_valist
    from /usr/lib64/libgio-2.0.so.0
  • #26 g_initable_new
    from /usr/lib64/libgio-2.0.so.0
  • #27 nm_applet_new
    at applet.c line 3740
  • #28 main
    at main.c line 80

Comment 3 Jiri Klimes 2015-05-25 14:04:33 UTC
applet->icon_cache is only assigned when creating the hash table with g_hash_table_new_full(). So, there has to be a memory corruption or something.

Can you step through applet.c:initable_init() to see if things are properly inited?
Are you able to enable more debugging symbols?
Comment 4 Thomas Haller 2016-09-02 00:19:05 UTC
I think these bugs are fixed.

If you experience new crashes, please report. Sorry for not hunting this down in time.