[sugar] Memory leaks summary

Marco Pesenti Gritti mpgritti
Sat Sep 13 09:33:39 EDT 2008


On Fri, Sep 12, 2008 at 3:31 AM, Marco Pesenti Gritti
<mpgritti at gmail.com> wrote:
> Hello,
>
> here is a summary of what we know so far about the memory leaks
> related to network activity (buddies joining/leaving).

Here is update on these issues:

> 1 We was leaking the palette that we create for each buddy. Tomeu
> fixed it, should be in the next stable build.

In 8.2-760.

> 2 We are still leaking the palette icons. It should not be too hard to
> track that down. Failing that we can make the palette lazy to work
> around the problem for 8.2.0. It's something we should be doing anyway
> to save memory and cpu.

It was a reference cycle which for for some reason the gc is not able
to free (it happens in several cases with pygtk objects :/). Fix is in
git, will go in joyride soon.

> 3 If I disable the palette completely I still get some leaking. I'm
> using a script that continuously create and destroy 10  buddies. Here
> is typical relative memory consumption reported by guppy (running it
> in a loop of 5 seconds). Note that I completely disabled the sugar
> shell model and view before taking this data.

It turns out to be a dbus-python leak. I wrote a patch and pushed it
to joyride for testing. I'm not very comfortable about it though, I
know very little about dbus-python. I hope the upstream maintainer
will get to review it. Otherwise we will have to decide if we take the
risk or if we prefer to keep the leak...

https://bugs.freedesktop.org/show_bug.cgi?id=17551

Reviews of the patch by anyone are welcome.

> 4) The grid layout is leaking objects when collision solving fails
> (i.e. you have a very full mesh view). We are probably not hitting
> this case in testing, but still should be fixed.

Fixed in git, will go in joyride soon.

Marco



More information about the Sugar-devel mailing list