Bug 119273

Summary: Severe memory leak in gtk.
Product: [openSUSE] SUSE LINUX 10.0 Reporter: Joe Harmon <jharmon>
Component: GNOMEAssignee: E-mail List <gnome-bugs>
Status: VERIFIED INVALID QA Contact: E-mail List <qa-bugs>
Severity: Critical    
Priority: P5 - None    
Version: RC 4   
Target Milestone: ---   
Hardware: Other   
OS: All   
Whiteboard:
Found By: Other Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: day 1
day 2
day 3

Description Joe Harmon 2005-09-28 17:14:09 UTC
I found a severe memory leak in gtk. At least I assume it is gtk because it
appears to be with components that share the gtk library. I will include 3
screen shots over the past 3 days that show the stock ticker applet, evolution,
and mono contininually increasing in memory.
Comment 1 Joe Harmon 2005-09-28 17:14:52 UTC
Created attachment 51066 [details]
day 1
Comment 2 Joe Harmon 2005-09-28 17:15:16 UTC
Created attachment 51067 [details]
day 2
Comment 3 Joe Harmon 2005-09-28 17:15:34 UTC
Created attachment 51068 [details]
day 3
Comment 4 Joe Harmon 2005-09-28 17:17:18 UTC
You don't see all three until day 3. But from then on, all three will continue
to increase.
Comment 5 Mark Gordon 2005-09-29 20:59:54 UTC
By the same logic, the leak could be in glibc.  There's no real indication here
that there is one underlying memory leak, let alone one in gtk; it could just as
easily be three different memory leaks (with each application leaking in its own
special way, which is entirely possible).  It's worth bearing in mind that some
applications have a larger memory footprint not because they're failing to free
memory when they're done with it (which is how I'd describe a leak) but because
they're retaining more state over time than they did previously (which may be
suboptimal but which is not technically a leak).

My understanding is that Mono has some well-known issues with how it does
garbage collection such that garbage-collected memory is not returned to the
system.  This is bad for long-running processes (e.g. beagled).  I think beagled
restarts itself at intervals to get around this, which is why it was using less
memory on day 3 than on day 2.  

Evolution's memory footprint can increase over time, especially with activity,
but I suspect much of that is due to various types of caching.  I can't rule out
the possibility of leaks, but I have no reason to believe any such leaks are in gtk.

I wouldn't be surprised if gtik2-applet2 was leaking (it looks probable), but I
have no reason to believe any such leaks are in gtk.  More likely, it's not
freeing memory when prices are updated.  We'd need valgrind logs to know for sure.

I'd suggest the following for future "memory leak" bug reports:

- valgrind logs *or*
- clear reference to leaked memory in the source code, ideally with patches

Also, the output of top(1) is generally easier to read in a bug report than
screenshots which open in different windows.