Bug 126119 - Invalid read of size 4 reported by valgrind
Summary: Invalid read of size 4 reported by valgrind
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: gnome-vfs2   
(Show other bugs)
Version: 2
Hardware: All Linux
medium
medium
Target Milestone: ---
Assignee: Jonathan Blandford
QA Contact:
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-06-16 10:10 UTC by Kjartan Maraas
Modified: 2013-04-02 04:19 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-02-02 14:04:13 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

Description Kjartan Maraas 2004-06-16 10:10:45 UTC
Description of problem:
Valgrind reports this when running gnome-panel under it:

==10332== Invalid read of size 4
==10332==    at 0x3C7E8747: menu_node_get_parent (in
/usr/lib/gnome-vfs-2.0/modules/libmenu.so)
==10332==    by 0x3C7EEAB6: (within
/usr/lib/gnome-vfs-2.0/modules/libmenu.so)
==10332==    by 0x3C7EEB6A: (within
/usr/lib/gnome-vfs-2.0/modules/libmenu.so)
==10332==    by 0x3C7EEB6A: (within
/usr/lib/gnome-vfs-2.0/modules/libmenu.so)
==10332==    by 0x3C7EEDF1: desktop_entry_tree_load (in
/usr/lib/gnome-vfs-2.0/modules/libmenu.so)
==10332==    by 0x3C7F287C: (within
/usr/lib/gnome-vfs-2.0/modules/libmenu.so)
==10332==    by 0x3C7F2BCF: (within
/usr/lib/gnome-vfs-2.0/modules/libmenu.so)
==10332==    by 0x3C7F3749: desktop_entry_tree_cache_get_changes (in
/usr/lib/gnome-vfs-2.0/modules/libmenu.so)
==10332==    by 0x3C7E3FDE: (within
/usr/lib/gnome-vfs-2.0/modules/libmenu.so)
==10332==    by 0x3C7E2DEF: (within
/usr/lib/gnome-vfs-2.0/modules/libmenu.so)
==10332==    by 0x3C7E238C: (within
/usr/lib/gnome-vfs-2.0/modules/libmenu.so)
==10332==    by 0x44E0901: gnome_vfs_get_file_info_uri_cancellable (in
/usr/lib/libgnomevfs-2.so.0.600.0)
==10332==    by 0x44F9C82: gnome_vfs_get_file_info_uri (in
/usr/lib/libgnomevfs-2.so.0.600.0)
==10332==    by 0x44F9C35: gnome_vfs_get_file_info (in
/usr/lib/libgnomevfs-2.so.0.600.0)
==10332==    by 0x8084FCC: fr_read_dir (in /usr/bin/gnome-panel)
==10332==    by 0x807B983: init_menus (in /usr/bin/gnome-panel)
==10332==    by 0x806277B: main (in /usr/bin/gnome-panel)
==10332==  Address 0x3C152318 is 8 bytes inside a block of size 36 free'd
==10332==    at 0x3C023B95: free (vg_replace_malloc.c:131)
==10332==    by 0x6958E3: g_free (in /usr/lib/libglib-2.0.so.0.400.1)
==10332==    by 0x3C7E84BF: menu_node_unref (in
/usr/lib/gnome-vfs-2.0/modules/libmenu.so)
==10332==    by 0x3C7E8D94: menu_node_unlink (in
/usr/lib/gnome-vfs-2.0/modules/libmenu.so)
==10332==    by 0x3C7EEBE8: (within
/usr/lib/gnome-vfs-2.0/modules/libmenu.so)
==10332==    by 0x3C7EEB6A: (within
/usr/lib/gnome-vfs-2.0/modules/libmenu.so)
==10332==    by 0x3C7EEB6A: (within
/usr/lib/gnome-vfs-2.0/modules/libmenu.so)
==10332==    by 0x3C7EEDF1: desktop_entry_tree_load (in
/usr/lib/gnome-vfs-2.0/modules/libmenu.so)
==10332==    by 0x3C7F287C: (within
/usr/lib/gnome-vfs-2.0/modules/libmenu.so)
==10332==    by 0x3C7F2BCF: (within
/usr/lib/gnome-vfs-2.0/modules/libmenu.so)
==10332==    by 0x3C7F3749: desktop_entry_tree_cache_get_changes (in
/usr/lib/gnome-vfs-2.0/modules/libmenu.so)
==10332==    by 0x3C7E3FDE: (within
/usr/lib/gnome-vfs-2.0/modules/libmenu.so)
==10332==    by 0x3C7E2DEF: (within
/usr/lib/gnome-vfs-2.0/modules/libmenu.so)
==10332==    by 0x3C7E238C: (within
/usr/lib/gnome-vfs-2.0/modules/libmenu.so)
==10332==    by 0x44E0901: gnome_vfs_get_file_info_uri_cancellable (in
/usr/lib/libgnomevfs-2.so.0.600.0)
==10332==    by 0x44F9C82: gnome_vfs_get_file_info_uri (in
/usr/lib/libgnomevfs-2.so.0.600.0)
==10332==    by 0x44F9C35: gnome_vfs_get_file_info (in
/usr/lib/libgnomevfs-2.so.0.600.0)
==10332==    by 0x8084FCC: fr_read_dir (in /usr/bin/gnome-panel)
==10332==    by 0x807B983: init_menus (in /usr/bin/gnome-panel)
==10332==    by 0x806277B: main (in /usr/bin/gnome-panel)

Not sure why it can't get the symbols for libmenu.so (it's the same
for all the methods in gnome-vfs even though I have the -debuginfo
package installed)

Version-Release number of selected component (if applicable):


How reproducible:
Every time

Steps to Reproduce:
1. run gnome-panel under valgrind
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Mark McLoughlin 2004-06-17 08:12:02 UTC
Without more info, this basically boils down to "run valgrind against
gnome-panel and fix the bugs" which isn't that useful.

DV suggests --db-attach=yes:

<DV> the bug report you show doesn't show a backtrace from gdb when
launched by valgrind
<DV> ask him to run with --db-attach=yes and dump the back trace from
gdb at that point
<DV> you will have a full gdb stack dump



Comment 2 Kjartan Maraas 2004-06-20 20:45:13 UTC
This is what I see when doing that:

[kmaraas@localhost tmp]$ valgrind -v --tool=memcheck --leak-check=yes
--alignment=8 --num-callers=20 --track-fds=yes --db-attach=yes
/usr/bin/gnome-panel
...
...
...
==10289== Syscall param write(buf) contains uninitialised or
unaddressable byte(s)
==10289==    at 0x3C3783: __write_nocancel (in /lib/tls/libc-2.3.3.so)
==10289==    by 0x4C112F: (within /usr/X11R6/lib/libX11.so.6.2)
==10289==    by 0x4C1ECE: _X11TransWrite (in /usr/X11R6/lib/libX11.so.6.2)
==10289==    by 0x4A1721: (within /usr/X11R6/lib/libX11.so.6.2)
==10289==    by 0x4A2D8C: _XReply (in /usr/X11R6/lib/libX11.so.6.2)
==10289==    by 0x48F5E0: XInternAtom (in /usr/X11R6/lib/libX11.so.6.2)
==10289==    by 0x4AC68A: XSetWMProperties (in
/usr/X11R6/lib/libX11.so.6.2)
==10289==    by 0xBA7FF8: (within /usr/lib/libgdk-x11-2.0.so.0.400.1)
==10289==    by 0xBA8571: gdk_window_new (in
/usr/lib/libgdk-x11-2.0.so.0.400.1)==10289==    by 0xB8B90C:
gdk_display_open (in /usr/lib/libgdk-x11-2.0.so.0.400.1)
==10289==    by 0xB6B415: gdk_display_open_default_libgtk_only (in
/usr/lib/libgdk-x11-2.0.so.0.400.1)
==10289==    by 0x977209: gtk_init_check (in
/usr/lib/libgtk-x11-2.0.so.0.400.1)==10289==    by 0x977245: gtk_init
(in /usr/lib/libgtk-x11-2.0.so.0.400.1)
==10289==    by 0x45EA3B3: (within /usr/lib/libbonoboui-2.so.0.0.0)
==10289==    by 0x45BF28E: gnome_program_postinit (gnome-program.c:1630)
==10289==    by 0x45BF71E: gnome_program_initv (gnome-program.c:1876)
==10289==    by 0x45BF300: gnome_program_init (gnome-program.c:1680)
==10289==    by 0x806272B: main (in /usr/bin/gnome-panel)
==10289==  Address 0x3C0DE940 is 128 bytes inside a block of size
16384 alloc'd
==10289==    at 0x3C023EDD: calloc (vg_replace_malloc.c:146)
==10289==    by 0x49355D: XOpenDisplay (in /usr/X11R6/lib/libX11.so.6.2)
==10289==    by 0xB8B811: gdk_display_open (in
/usr/lib/libgdk-x11-2.0.so.0.400.1)
==10289==    by 0xB6B415: gdk_display_open_default_libgtk_only (in
/usr/lib/libgdk-x11-2.0.so.0.400.1)
==10289==    by 0x977209: gtk_init_check (in
/usr/lib/libgtk-x11-2.0.so.0.400.1)==10289==    by 0x977245: gtk_init
(in /usr/lib/libgtk-x11-2.0.so.0.400.1)
==10289==    by 0x45EA3B3: (within /usr/lib/libbonoboui-2.so.0.0.0)
==10289==    by 0x45BF28E: gnome_program_postinit (gnome-program.c:1630)
==10289==    by 0x45BF71E: gnome_program_initv (gnome-program.c:1876)
==10289==    by 0x45BF300: gnome_program_init (gnome-program.c:1680)
==10289==    by 0x806272B: main (in /usr/bin/gnome-panel)
==10289==
==10289== ---- Attach to debugger ? --- [Return/N/n/Y/y/C/c] ---- y
starting debugger
==10289== starting debugger with cmd: /usr/bin/gdb -nw
/proc/10291/fd/822 10291
GNU gdb Red Hat Linux (6.0post-0.20040223.19rh)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and
you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for
details.
This GDB was configured as "i386-redhat-linux-gnu"...(no debugging
symbols found)...Using host libthread_db library
"/lib/tls/libthread_db.so.1".
 
Attaching to program: /proc/10291/fd/822, process 10291
0x4ffff042 in ?? ()
(gdb) bt
#0  0x4ffff042 in ?? ()
#1  0x003c3783 in ?? ()
#2  0x3c04f8a0 in ?? ()
#3  0x3c04a80e in ?? ()
#4  0x00000003 in ?? ()
#5  0x3c0de8c0 in ?? ()
#6  0x0000010c in ?? ()
#7  0x0053358c in ?? ()
#8  0x3c0de8c0 in ?? ()
#9  0x4fffe1f8 in ?? ()
#10 0x004c1130 in ?? ()
#11 0x00000003 in ?? ()
#12 0x3c0de8c0 in ?? ()
#13 0x0000010c in ?? ()
#14 0x00001001 in ?? ()
#15 0x00000000 in ?? ()

Comment 3 Kjartan Maraas 2004-06-30 10:16:56 UTC
Let's see if this is better:

==4195== Invalid read of size 4
==4195==    at 0x1C30E6D7: menu_node_get_parent (menu-layout.c:254)
==4195==    by 0x1C313436: ??? (menu-process.c:931)
==4195==    by 0x1C3135C6: ??? (menu-process.c:992)
==4195==    by 0x1C3135C6: ??? (menu-process.c:992)
==4195==    by 0x1C316A48: desktop_entry_tree_load (menu-process.c:1110)
==4195==    by 0x1C3187B0: ??? (menu-tree-cache.c:137)
==4195==    by 0x1C319342: desktop_entry_tree_cache_get_changes
(menu-tree-cache .c:745)
==4195==    by 0x1C309A2A: ??? (menu-method.c:1897)
==4195==    by 0x1C30A04B: ??? (menu-method.c:493)
==4195==    by 0x1BA1AA41: gnome_vfs_get_file_info_uri_cancellable
(gnome-vfs-ca ncellable-ops.c:184)
==4195==    by 0x1BA33590: gnome_vfs_get_file_info_uri
(gnome-vfs-ops.c:302)
==4195==    by 0x1BA335E5: gnome_vfs_get_file_info (gnome-vfs-ops.c:278)
==4195==    by 0x80842F9: fr_read_dir (menu-fentry.c:409)
==4195==    by 0x807AFC1: init_menus (menu.c:224)
==4195==    by 0x806288E: main (main.c:81)
==4195==  Address 0x1C0DD8F8 is 8 bytes inside a block of size 36 free'd
==4195==    at 0x1B904BB5: free (vg_replace_malloc.c:131)
==4195==    by 0x1BB4EB91: g_free (gmem.c:186)
==4195==    by 0x1C30E494: menu_node_unref (menu-layout.c:166)
==4195==    by 0x1C30EFF4: menu_node_unlink (menu-layout.c:486)
==4195==    by 0x1C313548: ??? (menu-process.c:937)
==4195==    by 0x1C3135C6: ??? (menu-process.c:992)
==4195==    by 0x1C3135C6: ??? (menu-process.c:992)
==4195==    by 0x1C316A48: desktop_entry_tree_load (menu-process.c:1110)
==4195==    by 0x1C3187B0: ??? (menu-tree-cache.c:137)
==4195==    by 0x1C319342: desktop_entry_tree_cache_get_changes
(menu-tree-cache .c:745)
==4195==    by 0x1C309A2A: ??? (menu-method.c:1897)
==4195==    by 0x1C30A04B: ??? (menu-method.c:493)
==4195==    by 0x1BA1AA41: gnome_vfs_get_file_info_uri_cancellable
(gnome-vfs-ca ncellable-ops.c:184)
==4195==    by 0x1BA33590: gnome_vfs_get_file_info_uri
(gnome-vfs-ops.c:302)
==4195==    by 0x1BA335E5: gnome_vfs_get_file_info (gnome-vfs-ops.c:278)
==4195==    by 0x80842F9: fr_read_dir (menu-fentry.c:409)
==4195==    by 0x807AFC1: init_menus (menu.c:224)
==4195==    by 0x806288E: main (main.c:81)


Comment 4 Mark McLoughlin 2004-08-11 08:35:58 UTC
Moving to gnome-vfs2 - that's where the menu method is

Comment 5 Kjartan Maraas 2005-02-02 14:04:13 UTC
Closing this since the menu method is being replaced anyway.


Note You need to log in before you can comment on or make changes to this bug.