Bug 312448

Summary: Juk increases its (heap) memory usage in a slow but never stopping way every time switching to next track
Product: [Applications] juk Reporter: Jekyll Wu <adaptee>
Component: generalAssignee: Scott Wheeler <wheeler>
Status: CONFIRMED ---    
Severity: normal CC: mpyne, smartins
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: valgrind data
BZIP2-compressed massif output data
BZIP2-compressed massif output data (Round 2)

Description Jekyll Wu 2013-01-01 09:27:41 UTC
Juk increases its (heap) memory usage in a slow but never stopping way after switching to next track  . 


Reproducible: Always

Steps to Reproduce:
1. start juk, ensure there are enough items in the playlist 

2. in konsole/shell, run the following command: 

while true ; do
    qdbus org.kde.juk  /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Next  2> /dev/null
    sleep 5
done

3.  leave the computer, then  come back a few hours later and use ksysguard the check the memory usage of juk.
Actual Results:  
It consumes 100+ MB heap memory and keeps growing.

Expected Results:  
It should not increase its memory usage in a infinite way.

Juk is built from git master today
Comment 1 Sergio Martins 2013-06-27 07:14:06 UTC
Can you run it on massif ?

valgrind --tool=massif juk

then wait a few hours, close juk, and attach the generated file
Comment 2 Jekyll Wu 2013-07-13 08:15:01 UTC
Created attachment 81085 [details]
valgrind data

hope this help.
Comment 3 Michael Pyne 2013-07-14 21:08:17 UTC
Created attachment 81112 [details]
BZIP2-compressed massif output data

I've done some brief attempts to re-create.

One thing I would recommend is to cycle through the same small playlist so that the increase in heap usage is known to be due to a *leak* and not just the first allocation for a new track/metadata/strings/etc.

This log mostly cycles through an Evanescence playlist from Amazon MP3 (with embedded album art). Though there does seem to be an increasing memory usage profile, it only seems to be coming from gstreamer 0.10.

Versions:
phonon-gstreamer v4.6.0-90-g385411d
phonon/phonon v4.6.0-387-g23795b6
gstreamer GStreamer 0.10.36

I will try again with latest&greatest phonon and pgst just to make sure and see what's going on, but I don't see anything JuK-specific, it might be a dupe of bug 281509
Comment 4 Michael Pyne 2013-07-14 22:29:07 UTC
Created attachment 81114 [details]
BZIP2-compressed massif output data (Round 2)

This is a more data-intensive massif session, which focuses on switching tracks within a single smallish playlist automatically using a DBus command on a timer (along with a small delay to ensure JuK is actually playing the next track before trying to advance in the playlist, due to a different bug in the player which sometimes stops playback if you try to advance too fast).

The memory leak is more obvious here, see http://imgur.com/RTimN2m for a screenshot.
Comment 5 Justin Zobel 2021-03-09 06:27:00 UTC
Thank you for the bug report.

As this report hasn't seen any changes in 5 years or more, we ask if you can please confirm that the issue still persists.

If this bug is no longer persisting or relevant please change the status to resolved.