memory leak on ATI cards with cover manager

Bug #386676 reported by Antoine Pairet
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Amarok
Won't Fix
Medium
amarok (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

Binary package hint: amarok

Summary:
When using Cover Manager, both amaork and xorg memory usage keeps increasing to such values that the computer becomes unusable.

Upstream related bug:
http://bugs.freedesktop.org/show_bug.cgi?id=16772
https://bugs.kde.org/show_bug.cgi?id=197242

Discussion about this memory leak:
http://amarok.kde.org/forum/index.php/topic,16784.0.html

Test case:
 * Open Amarok
 * Tools -> Cover Manager
 * While thumbnails are created, memory usage of xorg and amarok keeps increasing

The bug is observed on:
 * normal Jaunty Jackalope install
 * an install with the xorg-edgers PPA activated: http://ppa.launchpad.net/xorg-edgers/ppa/ubuntu

Both radeon and radeonhd drivers were tested.

What are the procedures to provide information regarding the memory usage?

ProblemType: Bug
Architecture: amd64
DistroRelease: Ubuntu 9.04
Package: amarok 2:2.0.2mysql5.1.30-0ubuntu3
ProcEnviron:
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: amarok
Uname: Linux 2.6.30-8-generic x86_64

Revision history for this message
In , Michel-tungstengraphics (michel-tungstengraphics) wrote :

KDE 4 with compositing or without? If with, using XRender or OpenGL? Does changing between these three options have any impact on the observed leaks?

Note that the valgrind log doesn't seem to show any such huge leaks, so it's possible these are actually server resource leaks in the clients. If you restart kwin4 or Amarok, does the X server memory usage go down or at least stop growing for a while?

Revision history for this message
In , Mikko (mikkoc) wrote :

The first one happens only with Composite enabled (Desktop Effects). And it seems to happen only with openGL. But xrender isn't an option since it's much.

The second happens both with Composite enabled or disabled.

Would it help if I run valgrind on Amarok instead?
But I doubt it's an amarok bug, otherwise I think people would have reported it, since it really trashes the whole system..

If I quit amarok or kwin the ram is still used by the X process.

Revision history for this message
In , Mikko (mikkoc) wrote :

*much slower, I meant.

Revision history for this message
In , Michel-tungstengraphics (michel-tungstengraphics) wrote :

The compositing minimize/maximize leak should be fixed with the xserver commit below, which has also been merged to the 1.5 branch.

It's unlikely to help for the Amarok leak though, so that probably needs more investigation. E.g. by running the X server from memprof, you could get a leak summary while the X server is still running.

commit d5ae85b5b722821499d5796cf0973ecb6ec125f1
Author: Kristian Høgsberg <email address hidden>
Date: Mon Jul 21 15:28:50 2008 -0400

    Fix embarrasing GLXPixmap leak.

Revision history for this message
In , Mikko (mikkoc) wrote :

Thanks Michel, the leak appears to be gone indeed.
About memprof, is there another tool like it? Because memprof depends pretty much on gnome (gconf and libgnomeui), and I rather not install that :)

Revision history for this message
In , Michel-tungstengraphics (michel-tungstengraphics) wrote :

(In reply to comment #5)
> About memprof, is there another tool like it?

No idea I'm afraid.

> Because memprof depends pretty much on gnome (gconf and libgnomeui), and I
> rather not install that :)

Suit yourself. :)

Revision history for this message
In , Mikko (mikkoc) wrote :

This is still valid with xorg-server 1.5.3

Revision history for this message
In , Mikko (mikkoc) wrote :

I just tried a Ubuntu 8.10 liveCD.
The problem is still present.
Install Amarok 2.0 and click on the cover manager: Xorg starts eating ram like crazy.

How do I use memprof to launch X if memprof requires X to run?

Revision history for this message
In , Michel Dänzer (michel-daenzer) wrote :

(In reply to comment #8)
> How do I use memprof to launch X if memprof requires X to run?

From a remote login with ssh X forwarding.

Revision history for this message
In , Antoine Pairet (b-ly) wrote :

Hello!
I do experience the same bug and opened a bug report on Launchpad:
https://bugs.launchpad.net/ubuntu/+source/amarok/+bug/386676

How could I help developers with appropriate informations?

Revision history for this message
In , Mikko (mikkoc) wrote :

Finally, after almost a year, someone hit the same bug :D
I started thinking there was something wrong with both my PCs.
Antoine, since valgrind output isn't useful you should use memprof to gather more info, but I haven't been able to use it successfully.

Revision history for this message
In , Antoine Pairet (b-ly) wrote :

(In reply to comment #11)
> Finally, after almost a year, someone hit the same bug :D
> I started thinking there was something wrong with both my PCs.
> Antoine, since valgrind output isn't useful you should use memprof to gather
> more info, but I haven't been able to use it successfully.
>

I tried to find informations regarding the usage of memprof. The problem is the project seems quite old (unmaintained?) and no package is available for Ubuntu in Jaunty Jackalope. I therefore pulled the sources from ftp.gnome.org and tried to build it but I was unsuccessful.

While ./configure is alright, make fails...

stack-frame.c: In function 'mi_call_with_signal_backtrace':
stack-frame.c:155: error: 'stack_frame' undeclared (first use in this function)
stack-frame.c:155: error: (Each undeclared identifier is reported only once
stack-frame.c:155: error: for each function it appears in.)
stack-frame.c:155: error: 'frame' undeclared (first use in this function)
stack-frame.c:159: warning: left-hand operand of comma expression has no effect
stack-frame.c:159: warning: value computed is not used
stack-frame.c:161: warning: implicit declaration of function 'next_frame'
stack-frame.c:161: warning: left-hand operand of comma expression has no effect
stack-frame.c:161: warning: value computed is not used
stack-frame.c:163: warning: implicit declaration of function 'frame_return_address'
stack-frame.c:163: warning: initialization makes pointer from integer without a cast
make[2]: *** [stack-frame.lo] Error 1
make[2]: Leaving directory `/home/antoine/downloads/memprof-0.6'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/antoine/downloads/memprof-0.6'
make: *** [all] Error 2

Any advice on how to get memprof working on Ubuntu Jaunty?
Where can I find useful documentation?
Is memprof the only way to get information regarding memory usage of programs?

Regarding my setup, I use Ubuntu Jaunty Jackalope with packages from xorg-edger PPA which means I use
 kernel 2.6.30
 ati driver with git (2009 06 11)
Detailed information can be found at https://launchpad.net/~xorg-edgers/+archive/ppa

My card is
(--) PCI:*(0@1:5:0) ATI Technologies Inc Radeon Xpress 1250 rev 0, Mem @ 0xd8000000/134217728, 0xd0100000/65536, I/O @ 0x00009000/256

regards,

Revision history for this message
In , Chris Wilson (ickle) wrote :

(In reply to comment #12)
> Is memprof the only way to get information regarding memory usage of programs?

I use http://cgit.freedesktop.org/~ickle/odin -- but be warned that's been written to meet my needs and little else. ;-)

A simpler tool is http://cgit.freedesktop.org/cairo/tree/util/malloc-stats.c which just needs to be compile to a shared library and preloaded.

Revision history for this message
Antoine Pairet (b-ly) wrote :

Binary package hint: amarok

Summary:
When using Cover Manager, both amaork and xorg memory usage keeps increasing to such values that the computer becomes unusable.

Upstream related bug:
http://bugs.freedesktop.org/show_bug.cgi?id=16772

Test case:
 * Open Amarok
 * Tools -> Cover Manager
 * While thumbnails are created, memory usage of xorg and amarok keeps increasing

The bug is observed on:
 * normal Jaunty Jackalope install
 * an install with the xorg-edgers PPA activated: http://ppa.launchpad.net/xorg-edgers/ppa/ubuntu

Both radeon and radeonhd drivers were tested.

What are the procedures to provide information regarding the memory usage?

ProblemType: Bug
Architecture: amd64
DistroRelease: Ubuntu 9.04
Package: amarok 2:2.0.2mysql5.1.30-0ubuntu3
ProcEnviron:
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: amarok
Uname: Linux 2.6.30-8-generic x86_64

Revision history for this message
Antoine Pairet (b-ly) wrote :
Changed in amarok:
status: Unknown → Confirmed
Revision history for this message
In , Michel Dänzer (michel-daenzer) wrote :

(In reply to comment #13)
> I use http://cgit.freedesktop.org/~ickle/odin -- but be warned that's been
> written to meet my needs and little else. ;-)

Looks very nice, nice choice of name as well. :)

In particular, like memprof this shows where the memory was allocated at any time, not only at process termination.

> A simpler tool is http://cgit.freedesktop.org/cairo/tree/util/malloc-stats.c
> which just needs to be compile to a shared library and preloaded.

Not sure what this offers over valgrind on a quick glance.

Revision history for this message
In , Mikko (mikkoc) wrote :

Pardon my ignorance but how do I compile odin?
I tried executing configure.in but got this:
./configure.in: line 1: syntax error near unexpected token `2.54'
./configure.in: line 1: `AC_PREREQ(2.54)'

I have autoconf 2.63

Revision history for this message
In , Mikko (mikkoc) wrote :
Revision history for this message
jajaX (jajaplanet) wrote :

Hi ! (sorry for my bad english)

sorry, I don't see this bug report.

I make other other bug report here :

https://bugs.kde.org/show_bug.cgi?id=197242

Antoine Pairet (b-ly)
description: updated
tags: added: memory-leak
Revision history for this message
Andrew Ash (ash211) wrote :

Confirming the bug. Status as it stands now:

 - Outstanding request for valgrind leak check on b.k.o 197242
 - b.fd.o 16772 progress has stalled pending some sort of memory leak check
 - Amarok forum has a confirmation from a user with an Nvidia card (jaja)

For anyone experiencing this bug, please report back to Myriam on bugs.kde.org 197242 with the results of running the valgrind memory check. She has very clear instructions and the process itself should be relatively simple for anyone experiencing the bug.

Confirming here in Ubuntu. I personally suspect some sort of interaction between Amarok's large amount of pixmaps in the cover manager and some part of the xserver, which had much upheaval over the past year or so.

Changed in amarok (Ubuntu):
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
In , Mikko (mikkoc) wrote :

I changed the title and product, since it happens with nvidia and intel cards too.

Revision history for this message
In , Mikko (mikkoc) wrote :

Antoine, are you on amd64 too?
If os, this could be arch specific...

Revision history for this message
In , Antoine Pairet (b-ly) wrote :

(In reply to comment #18)
> Antoine, are you on amd64 too?
> If os, this could be arch specific...
>
Yes, my architecture is 64 bits.

Revision history for this message
jajaX (jajaplanet) wrote :

Hi !

jaja = jajaX ;)

Revision history for this message
Jonathan Thomas (echidnaman) wrote :

Fixed in Amarok 2.1.1.

Changed in amarok (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
jajaX (jajaplanet) wrote :

Hi ! (sorry for my bad english)

Fixed in Amarok 2.1.1 or 2.2.1 ?

Changed in amarok:
importance: Unknown → Medium
Changed in amarok:
importance: Medium → Unknown
status: Confirmed → Won't Fix
Changed in amarok:
importance: Unknown → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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