Bug 298622

Summary: Amarok eats up all memory when playing for a long time
Product: [Applications] amarok Reporter: Andreas Pietzowski <andreas>
Component: generalAssignee: Amarok Bugs <amarok-bugs-null>
Status: RESOLVED WORKSFORME    
Severity: major CC: mscho527, nleo
Priority: NOR    
Version First Reported In: 2.5.0   
Target Milestone: 2.6   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Output from valgrind

Description Andreas Pietzowski 2012-04-22 20:10:38 UTC
My amarok 2.5.0 is configured with a dynamic playlist. After every song I can see an increment in amaroks memory usage (visible in KDE System Activity and top etc.)

Today amarok made my desktop nearly unusable because it eated up all my 4GB of RAM and 2GB of swap (which shouldn't barely be touched at all in normal business) ;-(

Reproducible: Always

Steps to Reproduce:
1. Start a dynamic palylist feed (display 20 upcoming songs in advance, maybe thats important?)
2. Listen to your local collection for a few hours :) No, RAM increases immediately after the second song. Every song eats a few mega bytes after it is palyed (or the new upcoming song?)...
3. Kill amarok when it reserved 99% of RAM for itself :)
Actual Results:  
Amarok is hungry... very hungry.

Expected Results:  
RAM consumption should be nearly static.

Maybe the source of the problem depends on some other special settings in my amarok. I hope you can reproduce this memory leak. I can give more information if you need.
Comment 1 Myriam Schweingruber 2012-04-23 07:45:19 UTC
Could you please disable all external scripts to eliminate any other error sources. Does this also happen without a dynamic playlist?

Make sure you have all debugging symbols installed fro amarok and its dependencies (mainly phonon and phonon-backend-gstreamer or -vlc, depending on which you use). Then please run amarok for a few minutes (3-4 song changes) with this command from a konsole:

valgrind --tool=memcheck --leak-check=full --track-origins=yes -v amarok

and attach the output to this report. This will cause amarok to be very slow on start, but the playback should work as usual.
Comment 2 Andreas Pietzowski 2012-04-23 18:32:08 UTC
Created attachment 70610 [details]
Output from valgrind

Here you go. See the attachment. I deactivated all scrips. I played 3-4 songs and quit amarok with Ctrl-Q afterwards. I hope there is some useful information in it...
Comment 3 Andreas Pietzowski 2012-04-23 18:33:16 UTC
Additional information: Dynamic playlist or not. I can count a significant memory inceasing of about 800 KB after every song.
Comment 4 Myriam Schweingruber 2012-04-24 10:31:08 UTC
Comment on attachment 70610 [details]
Output from valgrind

Sadly your valgrind output is aborted and lacks the summary. Did you quite Amarok with Ctrl+Q?
Comment 5 Andreas Pietzowski 2012-04-26 21:22:47 UTC
I tried it again, the same output, no summary. And yes, I did quit Amarok mit Ctrl-Q and waited until the bash was ready again...

My command was:

valgrind --tool=memcheck --leak-check=full --log-file=amarok.valgrind.out --track-origins=yes -v amarok --debug
Comment 6 Myriam Schweingruber 2012-05-06 10:39:05 UTC
Thank you for the feedback.
Comment 7 MinSik CHO 2012-12-02 12:01:48 UTC
not reproducible with amarok 2.6
Comment 8 Myriam Schweingruber 2012-12-02 13:18:50 UTC
(In reply to comment #7)
> not reproducible with amarok 2.6

How long did you let it run? IIRC this is a known bug with the gstreamer backend, that I can't reproduce with the vlc backend, so maybe this is fixed now. Depends on the version of the gstreamer backend I presume.

Andreas: could you please test with Amarok 2.6 and the vlc backend as well?
Comment 9 Myriam Schweingruber 2013-01-10 15:35:34 UTC
Closing for lack of feedback. Please feel free to reopen if you can reproduce this with Amarok 2.6.90 aka 2.7 beta1 or Amarok 2.7, to be released in a few days.
Comment 10 user11 2016-04-21 16:10:12 UTC
Amarok 2.8.0

It was turned on about 2 days, eats 2.1 GB of memory
Comment 11 Myriam Schweingruber 2016-04-21 23:20:33 UTC
(In reply to user11 from comment #10)
> Amarok 2.8.0
> 
> It was turned on about 2 days, eats 2.1 GB of memory

This bug was closed in 2013 and was about a completely different version.
FWIW: the problem was the phonon backend, not Amarok, and should be fixed with a newer version of that phonon backend since quite some time. Not reproducible here with the gstreamer backend and Amarok from git master which is ahead by several hundred commits of version 2.8. You should maybe try with amarok 2.9. beta, aka 2.8.90