! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
memory leak after using opical discs or pluggable storage devices
Status:
RESOLVED: FIXED
Product:
Xfdesktop
Component:
General

Comments

Description Tino Keitel 2008-02-21 12:50:18 CET
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.8) Gecko/20071004 Iceweasel/2.0.0.8 (Debian-2.0.0.6+2.0.0.8-0etch1)
Build Identifier: 

After I used optical discs (CD-ROMs, DVDs) or pluggable storage devices (card reader with compact flash, iPod), my xfdesktop (and xfce4-menu-plugin, too) starts to leak memory:

$ while true ; do date ; grep -E "VmSize|RSS" /proc/`pidof xfdesktop`/status ; sleep 1m ; done
Thu Feb 21 11:29:54 CET 2008
VmSize:    46384 kB
VmRSS:     18752 kB
Thu Feb 21 11:30:54 CET 2008
VmSize:    46384 kB
VmRSS:     18752 kB
Thu Feb 21 11:31:54 CET 2008
VmSize:    46384 kB
VmRSS:     18752 kB
Thu Feb 21 11:32:54 CET 2008
VmSize:    46384 kB
VmRSS:     18752 kB
Thu Feb 21 11:33:54 CET 2008
VmSize:    46384 kB
VmRSS:     18752 kB
Thu Feb 21 11:34:54 CET 2008
VmSize:    46508 kB
VmRSS:     18872 kB
Thu Feb 21 11:35:54 CET 2008
VmSize:    46508 kB
VmRSS:     18872 kB
Thu Feb 21 11:36:54 CET 2008
VmSize:    46508 kB
VmRSS:     18872 kB
Thu Feb 21 11:37:54 CET 2008
VmSize:    46508 kB
VmRSS:     18872 kB
Thu Feb 21 11:38:54 CET 2008
VmSize:    46508 kB
VmRSS:     18872 kB
Thu Feb 21 11:39:54 CET 2008
VmSize:    46624 kB
VmRSS:     18988 kB
Thu Feb 21 11:40:54 CET 2008
VmSize:    46624 kB
VmRSS:     18988 kB
Thu Feb 21 11:41:54 CET 2008
VmSize:    46624 kB
VmRSS:     18988 kB

I'm running Debian Sid with the provided Xfce 4.4.2 and GTK 2.12.8. Desktop Icons are enabled and thunar-volman used for automounts.


Reproducible: Always

Steps to Reproduce:
1. start a Xfce session
2. insert an optical disk or plug in a storage device, open it with Thunar
3. remove the disk or device and watch xfdesktop's memory usage growing
Comment 1 Tino Keitel 2008-02-21 12:52:31 CET
Created attachment 1519 
valgrind output
Comment 2 Brian J. Tarricone (not reading bugmail) 2008-02-21 18:52:32 CET
Please describe how you ran valgrind.  If you didn't set the env vars G_DEBUG=gc-friendly and G_SLICE=always-malloc, the log output unfortunately isn't all that useful.  This loss record seems to indicate you didn't:

==5780== 100 bytes in 1 blocks are definitely lost in loss record 4,879 of 5,446
==5780==    at 0x4022AB8: malloc (vg_replace_malloc.c:207)
==5780==    by 0x48D7C05: g_malloc (gmem.c:131)
==5780==    by 0x48EC91D: g_slice_alloc (gslice.c:824)
==5780==    by 0x48ED124: g_slice_alloc0 (gslice.c:833)
==5780==    by 0x488FA26: g_type_create_instance (gtype.c:1549)
==5780==    by 0x4875111: g_object_constructor (gobject.c:1046)
==5780==    by 0x48758D7: g_object_newv (gobject.c:937)
==5780==    by 0x4876420: g_object_new_valist (gobject.c:986)
==5780==    by 0x487658F: g_object_new (gobject.c:795)
==5780==    by 0x425C4C6: gtk_image_menu_item_new (gtkimagemenuitem.c:368)
==5780==    by 0x8055D84: main (main.c:336)

Unless there's a bug in glib/gtk, that record is *impossible*, as that menu item is created and then destroyed on the next line.  (It's only created because I need to force GtkImageMenuItem to register one of its GtkSettings early.)
Comment 3 Tino Keitel 2008-02-21 19:18:23 CET
See the first line in the attachment.
Comment 4 Tino Keitel 2009-01-21 07:21:43 CET
The same happens with 4.6 beta3. Every 5 minutes, the size of xfdesktop and the menuplugin increase by ~140 kb.

Some more details: I have thunar-volman installed and enabled, so hotplug devices are automatically mounted. Then I browse the device in Thunar, and eject it using the left panel in Thunar. I only need to do that one time, after this even an idling Xfce desktop has a constantly growing xfdesktop.

I'll provide valgrind logs with 4.6 beta3 later.
Comment 5 Brian J. Tarricone (not reading bugmail) 2009-01-21 09:12:02 CET
If the menu plugin is increasing in memory usage at the same rate as xfdesktop, then it's clear that this has nothing to do with optical discs or removable drives.
Comment 6 Eric Koegel editbugs 2014-07-24 18:41:22 CEST
I've done quite a bit of testing during the 4.11 series of xfdesktop and have plugged as many leaks as I could find. In addition, another developer did some additional leak testing with valgrind can didn't find anything further. So if this bug is not fixed in 4.10 it should be for 4.12. Feel free to reopen it if you can though and we'll track it down!

Bug #3861

Reported by:
Tino Keitel
Reported on: 2008-02-21
Last modified on: 2014-07-24

People

Assignee:
Brian J. Tarricone (not reading bugmail)
CC List:
1 user

Version

Version:
4.5.93 (4.6 beta 3)

Attachments

valgrind output (272.41 KB, text/plain)
2008-02-21 12:52 CET , Tino Keitel
no flags

Additional information