gnome-panel segfaults on Lucid

Bug #493788 reported by Michael Maltese
26
This bug affects 2 people
Affects Status Importance Assigned to Milestone
gnome-menus (Ubuntu)
Fix Released
High
Martin Pitt

Bug Description

Binary package hint: gnome-panel

The latest Lucid upgrade broke gnome-panel on my AMD 64-bit laptop. On login, the panel is started over and over as it segfaults and is restarted. This prevents gnome-session from getting anywhere. The panel will load far enough that I can see the "Applications Places System" menu, then crash.

ProblemType: Crash
Architecture: amd64
CrashCounter: 1
Date: Mon Dec 7 13:51:31 2009
DistroRelease: Ubuntu 10.04
ExecutablePath: /usr/bin/gnome-panel
NonfreeKernelModules: nvidia
Package: gnome-panel 1:2.28.0-0ubuntu8
ProcCmdline: gnome-panel
ProcEnviron:
 SHELL=/bin/bash
 PATH=(custom, user)
 LANG=en_US.UTF-8
 LANGUAGE=en_US.UTF-8
ProcVersionSignature: Ubuntu 2.6.31-11.38-generic
SegvAnalysis:
 Segfault happened at: 0x7f4158985510: mov 0x8(%rdi),%rax
 PC (0x7f4158985510) ok
 source "0x8(%rdi)" (0x00000027) not located in a known VMA region (needed readable region)!
 destination "%rax" ok
SegvReason: reading NULL VMA
Signal: 11
SourcePackage: gnome-panel
StacktraceTop:
 ?? () from /usr/lib/libgnome-menu.so.2
 ?? () from /usr/lib/libgnome-menu.so.2
 ?? () from /usr/lib/libgnome-menu.so.2
 ?? () from /usr/lib/libgnome-menu.so.2
 gmenu_tree_get_root_directory ()
Tags: lucid
Title: gnome-panel crashed with SIGSEGV in gmenu_tree_get_root_directory()
Uname: Linux 2.6.31-11-generic x86_64
UserGroups: adm admin cdrom dialout lpadmin plugdev sambashare sudo

Revision history for this message
Michael Maltese (dimalta) wrote :
visibility: private → public
Changed in gnome-panel (Ubuntu):
assignee: nobody → Ubuntu Desktop Bugs (desktop-bugs)
importance: Undecided → Medium
Revision history for this message
Martin Pitt (pitti) wrote :

Unfortunately we do not have apport retracers for lucid yet, so the stack trace is useless. I'm afraid I need some further information from you.

Please try to obtain a backtrace manually following the instructions at http://wiki.ubuntu.com/DebuggingProgramCrash and upload the backtrace (as an attachment) to the bug report.

Alternatively, let's find a way for me to reproduce the crash. Does it also happen in a guest session or with a fresh user? If so: do you have any desktop files in /usr/local/share/applications/? If not: Do you have any desktop files in ~/.local/share/applications ?

If so (in either case), please attach the .desktop files.

I suspect that one of them has a missing field, or something, which causes a NULL pointer.

Changed in gnome-panel (Ubuntu):
assignee: Ubuntu Desktop Bugs (desktop-bugs) → Martin Pitt (pitti)
importance: Medium → Low
status: New → Incomplete
Revision history for this message
dtaylor84 (davidt-launchpad) wrote :
Download full text (3.4 KiB)

I have managed to extract the following:

Program received signal SIGSEGV, Segmentation fault.
desktop_entry_get_basename (entry=0x1f) at /build/buildd/gnome-menus-2.28.0.1/./libmenu/desktop-entries.c:607
607 if (entry->categories != NULL)
(gdb) bt
#0 desktop_entry_get_basename (entry=0x1f) at /build/buildd/gnome-menus-2.28.0.1/./libmenu/desktop-entries.c:607
#1 0x00007ffff51df9b1 in find_entry (list=<value optimised out>, relative_path=0x97b430 "vmware-ace-vms.directory")
    at /build/buildd/gnome-menus-2.28.0.1/./libmenu/entry-directories.c:166
#2 cached_dir_find_relative_path (list=<value optimised out>, relative_path=0x97b430 "vmware-ace-vms.directory")
    at /build/buildd/gnome-menus-2.28.0.1/./libmenu/entry-directories.c:195
#3 entry_directory_get_directory (list=<value optimised out>, relative_path=0x97b430 "vmware-ace-vms.directory")
    at /build/buildd/gnome-menus-2.28.0.1/./libmenu/entry-directories.c:821
#4 entry_directory_list_get_directory (list=<value optimised out>, relative_path=0x97b430 "vmware-ace-vms.directory")
    at /build/buildd/gnome-menus-2.28.0.1/./libmenu/entry-directories.c:1125
#5 0x00007ffff51e2b2b in process_layout (tree=0x813560, parent=<value optimised out>, layout=<value optimised out>,
    allocated=<value optimised out>) at /build/buildd/gnome-menus-2.28.0.1/./libmenu/gmenu-tree.c:3409
#6 0x00007ffff51e2feb in process_layout (tree=0x813560, parent=<value optimised out>, layout=<value optimised out>,
    allocated=<value optimised out>) at /build/buildd/gnome-menus-2.28.0.1/./libmenu/gmenu-tree.c:3320
#7 0x00007ffff51e5972 in gmenu_tree_build_from_layout (tree=0x813560)
    at /build/buildd/gnome-menus-2.28.0.1/./libmenu/gmenu-tree.c:4465
#8 gmenu_tree_get_root_directory (tree=0x813560) at /build/buildd/gnome-menus-2.28.0.1/./libmenu/gmenu-tree.c:782
#9 0x00007ffff51e5b75 in gmenu_tree_get_directory_from_path (tree=0x1f, path=0x99fd40 "vmware-ace-vms.directory")
    at /build/buildd/gnome-menus-2.28.0.1/./libmenu/gmenu-tree.c:860
#10 0x00000000004409c5 in submenu_to_display (menu=0x6f1330) at menu.c:1300
#11 0x0000000000440a3b in submenu_to_display_in_idle (data=<value optimised out>) at menu.c:1327
#12 0x00007ffff48c6d4e in g_main_context_dispatch () from /lib/libglib-2.0.so.0
#13 0x00007ffff48ca718 in ?? () from /lib/libglib-2.0.so.0
#14 0x00007ffff48cab75 in g_main_loop_run () from /lib/libglib-2.0.so.0
#15 0x00007ffff68851a7 in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0
#16 0x0000000000422a9f in main (argc=<value optimised out>, argv=<value optimised out>) at main.c:154
(gdb) list
602
603 menu_verbose ("Adding Legacy category to \"%s\"\n",
604 entry->basename);
605
606 i = 0;
607 if (entry->categories != NULL)
608 {
609 for (; entry->categories[i]; i++);
610 }
611

(gdb) frame 2
#2 cached_dir_find_relative_path (list=<value optimised out>, relative_path=0x97b430 "vmware-ace-vms.directory")
    at /build/buildd/gnome-menus-2.28.0.1/./libmenu/entry-directories.c:195
195 break;
(gdb) list
190 break;
191 }
192 else
193 {
194 retval = find_entry (dir, split[i]);
195 break;
196 }
...

Read more...

Changed in gnome-panel (Ubuntu):
status: Incomplete → New
Revision history for this message
Jarkko Lietolahti (jarkko-jab) wrote :

jarkko@sentti:~$ G_SLICE=always-malloc G_DEBUG=gc-friendly valgrind -v --tool=memcheck --leak-check=full --num-callers=40 --log-file=valgrind.log /usr/bin/gnome-panel
** (gnome-panel:10454): DEBUG: Adding applet 0.
** (gnome-panel:10454): DEBUG: Initialized Panel Applet Signaler.
** (gnome-panel:10454): DEBUG: Adding applet 1.
** (gnome-panel:10454): DEBUG: Adding applet 2.
** (gnome-panel:10454): DEBUG: Adding applet 3.
** (gnome-panel:10454): DEBUG: Adding applet 4.

(gnome-panel:10454): Gtk-WARNING **: gtk_widget_size_allocate(): attempt to allocate widget with width -6 and height 24
** (gnome-panel:10454): DEBUG: Adding applet 5.
** (gnome-panel:10454): DEBUG: Adding applet 6.
** (gnome-panel:10454): DEBUG: Adding applet 7.
** (gnome-panel:10454): DEBUG: Adding applet 8.
** (gnome-panel:10454): DEBUG: Adding applet 9.
** (gnome-panel:10454): DEBUG: Adding applet 10.
Segmentation fault
jarkko@sentti:~$

Log attached

Revision history for this message
dtaylor84 (davidt-launchpad) wrote :

Further, simply adding (as required by the spec) 'Type=Directory' stops the segfault.

Revision history for this message
Jarkko Lietolahti (jarkko-jab) wrote :

There's a lot of desktop files in .local/share/applications and couple in /usr/local/share/applications. Some of the files only have header and the others have mixed amount of lines.

Revision history for this message
Jarkko Lietolahti (jarkko-jab) wrote :

jarkko@sentti:~/.local/share/applications$ ls -l
total 160
-rw-r--r-- 1 jarkko jarkko 58 2009-09-19 21:25 defaults.list
-rw------- 1 jarkko jarkko 237 2009-09-23 20:09 Eclipse.desktop
-rw-r--r-- 1 jarkko jarkko 215 2009-09-20 09:32 lgp_uninstall.desktop
-rw-r--r-- 1 jarkko jarkko 203 2009-09-20 09:32 lgp_update.desktop
-rw-r--r-- 1 jarkko jarkko 476 2009-11-30 12:20 mimeapps.list
-rw-r--r-- 1 jarkko jarkko 1304 2009-11-25 10:49 mimeinfo.cache
-rw------- 1 jarkko jarkko 230 2009-09-06 03:08 s2games_com-Savage2_1.desktop
-rw------- 1 jarkko jarkko 294 2009-09-06 03:08 s2games_com-Savage2_2.desktop
-rw------- 1 jarkko jarkko 309 2009-09-06 03:08 s2games_com-Savage2_3.desktop
-rw-r--r-- 1 jarkko jarkko 229 2009-09-20 09:32 survivor.desktop
-rw-r--r-- 1 jarkko jarkko 134 2009-11-25 10:49 userapp-kate-R2RR3U.desktop
-rw-r--r-- 1 jarkko jarkko 140 2009-08-21 22:47 userapp-picasa-5DLJYU.desktop
drwxr-xr-x 3 jarkko jarkko 4096 2009-08-14 11:02 wine
-rw-r--r-- 1 jarkko jarkko 171 2009-08-19 14:03 wine-extension-application.desktop
-rw-r--r-- 1 jarkko jarkko 182 2009-08-19 14:03 wine-extension-appref-ms.desktop
-rw-r--r-- 1 jarkko jarkko 142 2009-08-14 12:05 wine-extension-chm.desktop
-rw-r--r-- 1 jarkko jarkko 183 2009-09-23 19:25 wine-extension-hdmov.desktop
-rw-r--r-- 1 jarkko jarkko 162 2009-08-14 12:05 wine-extension-hlp.desktop
-rw-r--r-- 1 jarkko jarkko 154 2009-09-01 10:34 wine-extension-htm.desktop
-rw-r--r-- 1 jarkko jarkko 154 2009-09-01 10:34 wine-extension-html.desktop
-rw-r--r-- 1 jarkko jarkko 161 2009-08-14 12:05 wine-extension-ini.desktop
-rw-r--r-- 1 jarkko jarkko 208 2009-08-19 14:03 wine-extension-LXSPROJ.desktop
-rw-r--r-- 1 jarkko jarkko 162 2009-09-23 19:25 wine-extension-mov.desktop
-rw-r--r-- 1 jarkko jarkko 161 2009-09-23 19:25 wine-extension-qt.desktop
-rw-r--r-- 1 jarkko jarkko 177 2009-09-23 19:25 wine-extension-qtl.desktop
-rw-r--r-- 1 jarkko jarkko 168 2009-09-23 19:27 wine-extension-ra.desktop
-rw-r--r-- 1 jarkko jarkko 162 2009-09-23 19:27 wine-extension-ram.desktop
-rw-r--r-- 1 jarkko jarkko 174 2009-09-23 19:27 wine-extension-rm.desktop
-rw-r--r-- 1 jarkko jarkko 175 2009-09-23 19:27 wine-extension-rmm.desktop
-rw-r--r-- 1 jarkko jarkko 176 2009-09-23 19:27 wine-extension-rmvb.desktop
-rw-r--r-- 1 jarkko jarkko 166 2009-09-23 19:27 wine-extension-rp.desktop
-rw-r--r-- 1 jarkko jarkko 166 2009-09-23 19:27 wine-extension-rt.desktop
-rw-r--r-- 1 jarkko jarkko 144 2009-08-14 12:05 wine-extension-rtf.desktop
-rw-r--r-- 1 jarkko jarkko 168 2009-09-23 19:27 wine-extension-rv.desktop
-rw-r--r-- 1 jarkko jarkko 163 2009-09-23 19:27 wine-extension-smi.desktop
-rw-r--r-- 1 jarkko jarkko 164 2009-09-23 19:27 wine-extension-smil.desktop
-rw-r--r-- 1 jarkko jarkko 154 2009-08-19 14:03 wine-extension-txt.desktop
-rw-r--r-- 1 jarkko jarkko 150 2009-08-14 12:05 wine-extension-wri.desktop
-rw-r--r-- 1 jarkko jarkko 201 2009-08-19 14:03 wine-extension-XDBPROJ.desktop
-rw-r--r-- 1 jarkko jarkko 159 2009-08-19 14:03 wine-extension-xml.desktop

Revision history for this message
dtaylor84 (davidt-launchpad) wrote :

This is actually a bug in gnome-menus-2.28.0.1-0ubuntu3. In debian/patches/22_desktop-cache.patch line 48, which once applied inserts as line 322 of libmenu/desktop-entries.c:

  DesktopEntry *retval;

The uninitialized retval is later returned in the event of an error. Initialising this to NULL stops the segfaults.

affects: gnome-panel (Ubuntu) → gnome-menus (Ubuntu)
Changed in gnome-menus (Ubuntu):
status: New → Triaged
Revision history for this message
Martin Pitt (pitti) wrote :

Ah, with that invalid vmware-ace-vms.directory I can reproduce it. Thanks for tracking this down!

Changed in gnome-menus (Ubuntu):
importance: Low → High
status: Triaged → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gnome-menus - 2.28.0.1-0ubuntu4

---------------
gnome-menus (2.28.0.1-0ubuntu4) lucid; urgency=low

  * 22_desktop-cache.patch: Properly initialize return value in
    +desktop_entry_load_from_keyfile() for invalid desktop files. Thanks to
    David Taylor and Jarkko Lietolahti! (LP: #493788)
 -- Martin Pitt <email address hidden> Wed, 09 Dec 2009 07:26:45 +0100

Changed in gnome-menus (Ubuntu):
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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