nm-applet crashes with SIGSEGV in icon_name_hash()

Bug #708118 reported by Stefan Ebner
236
This bug affects 35 people
Affects Status Importance Assigned to Milestone
libappindicator
Fix Released
Medium
Unassigned
libappindicator (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

nm-applet crashes sometimes but I couldn't really reproduce it so it took
me some time to get a backtrace.

Related branches

Revision history for this message
Stefan Ebner (sebner) wrote :
Stefan Ebner (sebner)
description: updated
Changed in network-manager-applet (Ubuntu):
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → Mathieu Trudel-Lapierre (mathieu-tl)
summary: - nm-applet crashes sporadically
+ nm-applet crashes with SIGSEGV in icon_name_hash()
Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

Reassigning to libdbusmenu in hope this is the right place for it. After further investigation, I don't see anything special we do in nm-applet "special" about icons, and mostly just hardcode icon names to pass to libappindicator.

affects: network-manager-applet (Ubuntu) → libdbusmenu (Ubuntu)
Changed in libdbusmenu (Ubuntu):
assignee: Mathieu Trudel-Lapierre (mathieu-tl) → nobody
status: In Progress → Confirmed
Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

.. but there doesn't seem to be anything directly linking the issue to any of the indicator libs or dbusmenu, so reassigning to nm-applet for now.

Stefan, could you provide valgrind logs for nm-applet if you're able to reproduce the issue? I sure can't :)

affects: libdbusmenu (Ubuntu) → network-manager-applet (Ubuntu)
Changed in network-manager-applet (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Jani Monoses (jani) wrote :

IIRC I saw the crashes more often when packages with 'indicator' in their names were reached in the dist-upgrade process

Revision history for this message
Stefan Ebner (sebner) wrote :

That's not entirely true. Just noticed that here the nm-applet crashes on every (99%) first apt-get upgrade of the day, with or without indicator packages. Will try to get valgrind logs as Mathieu suggested.

Revision history for this message
Stefan Ebner (sebner) wrote :

Managed to get a valgrind log but it seems I lack some debug packages.
If this log doesn't help you, mind telling me which debug packages I miss?

Changed in network-manager-applet (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

Looking at the log now, but in any case the packages you'll need are likely network-manager-applet-dbgsym, libnm-glib2-dbgsym and libnm-util1-dbgsym from ddebs.ubuntu.com, as well as libgtk2.0-0-dbg and libglib2.0-0-dbg from the main archive (or the equivalent -dbgsym from ddebs.u.c).

Revision history for this message
Stefan Ebner (sebner) wrote :

I installed the packages you mentioned and got a (after trying a lot) better log (still some other ???)

Revision history for this message
Stefan Ebner (sebner) wrote :

Attached a better one.

Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

So now really switching this to libdbusmenu: the valgrind log has quite a few mentions to it and it's the most likely cause for this issue. One of the other issues (leak in get_best_icon_name_for_ap()) is open as bug 724554.

affects: network-manager-applet (Ubuntu) → libdbusmenu (Ubuntu)
Revision history for this message
San (san-plusnet) wrote :
Download full text (4.7 KiB)

i just made update.

GNU gdb (GDB) 7.2-ubuntu
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/bin/nm-applet...(no debugging symbols found)...done.
(gdb) r
Starting program: /usr/bin/nm-applet
[Thread debugging using libthread_db enabled]
[New Thread 0xb7c31b70 (LWP 1773)]
[New Thread 0xb742fb70 (LWP 1774)]

** (nm-applet:1770): WARNING **: Invalid connection /system/networking/connections/1: 'NMSettingConnection' / 'id' invalid: 2

** (nm-applet:1770): WARNING **: Invalid connection /system/networking/connections/4: 'NMSettingConnection' / 'id' invalid: 2
** (nm-applet:1770): DEBUG: foo_client_state_changed_cb
** (nm-applet:1770): DEBUG: foo_client_state_changed_cb
[Thread 0xb7c31b70 (LWP 1773) exited]

** (nm-applet:1770): WARNING **: _nm_object_get_property: Error getting 'RsnFlags' for /org/freedesktop/NetworkManager/AccessPoint/5: (19) Method "Get" with signature "ss" on interface "org.freedesktop.DBus.Properties" doesn't exist

(nm-applet:1770): Gtk-CRITICAL **: IA__gtk_widget_is_toplevel: assertion `GTK_IS_WIDGET (widget)' failed

** (nm-applet:1770): WARNING **: _nm_object_get_property: Error getting 'RsnFlags' for /org/freedesktop/NetworkManager/AccessPoint/9: (19) Method "Get" with signature "ss" on interface "org.freedesktop.DBus.Properties" doesn't exist

Program received signal SIGSEGV, Segmentation fault.
0x002f0a56 in ?? () from /usr/lib/libgtk-x11-2.0.so.0
(gdb) bt
#0 0x002f0a56 in ?? () from /usr/lib/libgtk-x11-2.0.so.0
#1 0x002f0b2f in ?? () from /usr/lib/libgtk-x11-2.0.so.0
#2 0x002f0ed2 in ?? () from /usr/lib/libgtk-x11-2.0.so.0
#3 0x002f6ac4 in ?? () from /usr/lib/libgtk-x11-2.0.so.0
#4 0x002f9043 in ?? () from /usr/lib/libgtk-x11-2.0.so.0
#5 0x0030b360 in ?? () from /usr/lib/libgtk-x11-2.0.so.0
#6 0x0030b4a0 in ?? () from /usr/lib/libgtk-x11-2.0.so.0
#7 0x0030b5b1 in ?? () from /usr/lib/libgtk-x11-2.0.so.0
#8 0x007ff46c in g_cclosure_marshal_VOID__BOXED ()
   from /usr/lib/libgobject-2.0.so.0
#9 0x007dfe07 in ?? () from /usr/lib/libgobject-2.0.so.0
#10 0x007e13e0 in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#11 0x007f4996 in ?? () from /usr/lib/libgobject-2.0.so.0
#12 0x007fdf65 in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
#13 0x007fe2bd in g_signal_emit_by_name () from /usr/lib/libgobject-2.0.so.0
#14 0x003a7346 in ?? () from /usr/lib/libgtk-x11-2.0.so.0
#15 0x003a821f in ?? () from /usr/lib/libgtk-x11-2.0.so.0
#16 0x00460a5f in gtk_widget_size_request () from /usr/lib/libgtk-x11-2.0.so.0
#17 0x00471452 in ?? () from /usr/lib/libgtk-x11-2.0.so.0
#18 0x007ff46c in g_cclosure_marshal_VOID__BOXED ()
   from /usr/lib/libgobject-2.0.so.0
---Type <return> to continue, or q <return> to quit---
#19 0x007dfe07 in ?? () from /usr/lib/libgobject-2.0.so.0
#20 0x007e14b2 in g_closure_in...

Read more...

Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

San,

Thanks, but we won't need any more backtraces from gdb for now. I think we have all the information needed in this bug report and the numerous duplicates.

Revision history for this message
San (san-plusnet) wrote :

Belive so.

Is there any other informations you might need?

Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

No, but I'll prepare test packages for an attempt to workaround the issue. If you can test that, it could be very helpful.

Are you able to reproduce this consistently (like, maybe if it really shows up once a day)

Revision history for this message
Uwe Helm (1forthedoctor) wrote :

Bug shows up for me consistently after about 2 hours of usage, without any particular user interaction

Revision history for this message
San (san-plusnet) wrote :

Hi!

I tried to reproduce this error by downloading huge file over my local network at speed about 2,5MB.
No luck, i can not reproduce this error.

I would be happy to help You and i will try your test package, there is no problem.

Best Regards!

Revision history for this message
Uwe Helm (1forthedoctor) wrote :

I can reproduce this by running 'sudo gtk-update-icon-cache -f -q /usr/share/icons/gnome' (takes 2 runs usually). The last nm-applet update didn't fix it.

Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

Rock on! Now we have a way to reproduce the crash. I can make it crash every time I run gtk-update-icon-cache the second time, while a connection is establishing (e.g. the icons and changing). It doesn't seem to be reproducible when the connection is already established.

Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

Doesn't seem to apply to the indicator embedded in an actual indicator widget (e.g. in the gnome-panel indicator widgets or in the unity panel), but definitely works when nm-applet uses the libappindicator fallbacks for the legacy notification area.

Revision history for this message
Stefan Ebner (sebner) wrote :

Hi, I just tried it and I can confirm that running gtk-update-icon-cache makes it crash.

Here it crashes on the first attempt and also when the connection is already established though.

Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

I've just uploaded a copy of libappindicator for natty in my PPA that includes a change that appears to fix the issue for me. Please see here:
https://edge.launchpad.net/~mathieu-tl/+archive/ppa/+sourcepub/1548208/+listing-archive-extra

The packages should start building and be available soon. It would be really helpful if you could test them to verify whether it solves the problem. In the meantime I'll discuss the details of the change with the libappindicator developers.

Revision history for this message
Stefan Ebner (sebner) wrote :

Good news your packages seem to fix the issue.

During running apt-get upgrade/gtk-update-icon-cache the wifi-icon is quite replaced occasionlly with the icon that indicates that there is no icon but to cut a long sentence short: It doesn't crash anymore. :)

Revision history for this message
Uwe Helm (1forthedoctor) wrote :

Thanks so much for taking care of this so quickly Mathieu! This is great.
I will test the packages tonight.
Do you think this fixes https://bugs.launchpad.net/ubuntu/+source/gtk+2.0/+bug/551809 as well?

Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote : Re: [Bug 708118] Re: nm-applet crashes with SIGSEGV in icon_name_hash()

On Fri, Mar 11, 2011 at 6:58 PM, Uwe Helm <email address hidden> wrote:
> Thanks so much for taking care of this so quickly Mathieu! This is great.
> I will test the packages tonight.
> Do you think this fixes https://bugs.launchpad.net/ubuntu/+source/gtk+2.0/+bug/551809 as well?

No. What this does is actually work around the issue to some level,
but it does so by simplifying the code a bit (I think). We'll see what
the libappindicator developers have to say about it.

Uwe, please still test the package carefully and try hard to make it
crash. Who knows if it doesn't just make it less likely or less
frequent.

I'll tackle that gtk+ bug now, since it seems to be somewhat closely related.

Mathieu Trudel-Lapierre <email address hidden>
Freenode: cyphermox, Jabber: <email address hidden>
4096R/EE018C93 1967 8F7D 03A1 8F38 732E  FF82 C126 33E1 EE01 8C93

Revision history for this message
San (san-plusnet) wrote :

'sudo gtk-update-icon-cache -f -q
/usr/share/icons/gnome'

Does not work for me - i can not reproduce error.

Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

The work so far seems to poing the issue in the direction of libappindicator or purely GTK...

affects: libdbusmenu (Ubuntu) → libappindicator (Ubuntu)
Revision history for this message
Uwe Helm (1forthedoctor) wrote :

Mathieu, the new packages fix the issue for me and nm-applet hasn't crashed. I am not seeing the red box that Stefan mentioned (i do see it with gnome-power-manager applet though, but that has happened before your updates as well)

Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

Thanks for the testing. I'll mark this bug as a duplicate of bug 729150 if only because then we have a chance of catching all the duplicates when the bug is closed.

Revision history for this message
Ted Gould (ted) wrote :

So, should this be a dup of bug 729150? It seems like it to me, but that's a hard step to undo... double checking.

Changed in libappindicator:
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

It should be, but I've so far been unable to do the change. I get timeouts ;)

Ted Gould (ted)
Changed in libappindicator:
milestone: none → 0.3.0
status: Confirmed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package libappindicator - 0.3.0-0ubuntu1

---------------
libappindicator (0.3.0-0ubuntu1) natty; urgency=low

  * New upstream release.
    * Don't use GIcon with GtkStatusIcon (LP: #708118) (LP: #729150)
 -- Ted Gould <email address hidden> Wed, 23 Mar 2011 15:50:55 -0500

Changed in libappindicator (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
aka (vangop) wrote :

Came here from https://bugs.launchpad.net/ubuntu/+source/network-manager-applet/+bug/703976
which is marked as a dup. Anyway, I am getting
Mar 2 14:46:31 illidan kernel: [23028.924806] nm-applet[9073]: segfault at ffffffff ip 00007f0108e830b5 sp 00007fff11cc3180 error 4 in libglib-2.0.so.0.3000.0[7f0108e23000+f4000]

have the latest libappindicator 0.4.1-0ubuntu2

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.