Bug 308313 - Qt memory leaks
Summary: Qt memory leaks
Status: RESOLVED NOT A BUG
Alias: None
Product: amarok
Classification: Applications
Component: Playback (show other bugs)
Version: 2.6.0
Platform: Slackware Linux
: NOR minor
Target Milestone: 2.7
Assignee: Amarok Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-13 02:33 UTC by Alan Aversa
Modified: 2012-11-30 10:18 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
valgrind memory leakage info for Amarok (40.50 KB, text/plain)
2012-11-29 22:43 UTC, Alan Aversa
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alan Aversa 2012-10-13 02:33:34 UTC
Whenever I am playing audio in Amarok, the CPU fan increases its RPMs, although Amarok is only using 2-4% of the CPU.

Reproducible: Always




It might have something to do with the fact I'm using the "high quality" version of libmad.
Comment 1 Myriam Schweingruber 2012-10-13 12:53:20 UTC
Which Amarok version is this about?
Comment 2 Alan Aversa 2012-10-13 15:49:49 UTC
I s(In reply to comment #1)
> Which Amarok version is this about?

Sorry, I forgot about that. This issue has been present  for me in KDE 4.8 onwards, and I currently have 4.9.2.

Also, after initially starting Amarok, my CPU fan doesn't speed up. It only speeds up after playing about 1-2 minutes of audio. Stopping the audio causes the fan to slow down a bit, and it intermittently speeds up and slows down, but it still goes faster than if I quit Amarok, in which case the the fan almost immediately returns to its original speed. This might actually be an Akonadai issue, as all the akonadai_agent_launcher's that akonadai_control starts tend also to increase my CPU fan speed yet actually use almost 0% of my CPU.
Comment 3 Myriam Schweingruber 2012-10-13 18:31:27 UTC
Well, Amarok doesn't use Akonadi at all, and I can't reproduce this here with current 2.6-git, KDE 4.9.2 on Kubuntu Quantal Beta2

You should maybe report this to Akonadi, especially since the CPU usage of Amarok doesn't change as you say. Probably just a coincidence.
Comment 4 Matěj Laitl 2012-10-13 19:41:28 UTC
Sorry, we cannot fix vague bugs like "fan increases speed" wihout any indication that Amarok is the culprit. You say Amarok is only using 2-4% of the CPU, so probably something other is causing the fan to raise the speed or this is a normal behaviour of your hardware.
Comment 5 Alan Aversa 2012-11-29 22:43:38 UTC
Created attachment 75541 [details]
valgrind memory leakage info for Amarok
Comment 6 Alan Aversa 2012-11-29 22:44:21 UTC
Running valgrind on Amarok shows that it has major memory leaks that are probably causing the core to heat up despite no increased CPU % used. Monitoring Amarok in top, it's memory increases roughly 1 Mb per minute, even with Amarok just sitting there.

Something is causing phonon_gstreamer.so and libQtCore.so.4.8.2 to allocate a lot of leaked memory.

See the attachment for the output of valgrind.
Comment 7 Myriam Schweingruber 2012-11-29 23:10:02 UTC
I suspect this being related to the phonon-backend-gstreamer. Could you please use the phonon-backend-vlc instead and see if this still happens?
Comment 8 Matěj Laitl 2012-11-29 23:15:22 UTC
(In reply to comment #6)
> Running valgrind on Amarok shows that it has major memory leaks that are
> probably causing the core to heat up despite no increased CPU % used.

This is not possible. Memory-leaks cannot cause your CPU to heat up. Period.

> Monitoring Amarok in top, it's memory increases roughly 1 Mb per minute,
> even with Amarok just sitting there.

Yep, we have memory leaks, and phonon-backend-gstreamer or gstreamer itself has them. This is a different bug though. (and I think already reported.) As Myriam said, you should try with vlc backend. In any case, this bug is invalid.
Comment 9 Alan Aversa 2012-11-30 01:01:59 UTC
(In reply to comment #8)
> (In reply to comment #6)
> > Running valgrind on Amarok shows that it has major memory leaks that are
> > probably causing the core to heat up despite no increased CPU % used.
> 
> This is not possible. Memory-leaks cannot cause your CPU to heat up. Period.

Certainly the memory controller heats up. I'm using a laptop that has one fan for everything. I should've said "cooling fan" instead. Sorry for the confusion
Comment 10 Matěj Laitl 2012-11-30 01:10:11 UTC
(In reply to comment #9)
> (In reply to comment #8)
> > (In reply to comment #6)
> > > Running valgrind on Amarok shows that it has major memory leaks that are
> > > probably causing the core to heat up despite no increased CPU % used.
> > 
> > This is not possible. Memory-leaks cannot cause your CPU to heat up. Period.
> 
> Certainly the memory controller heats up. I'm using a laptop that has one
> fan for everything. I should've said "cooling fan" instead. Sorry for the
> confusion

No. A memory-leak causes that less memory is available to your other programs by not releasing the memory. This doesn't involve any processing by your CPU or memory controller or whatever else in hardware. Your hardware knows nothing about "free" or "used" memory.

Alan, please don't try to invent stories on bugzilla. This bug was closed as invalid, which means it cannot serve to improve Amarok. Commenting here only takes precious developer time and prevents them from doing more useful things.
Comment 11 Alan Aversa 2012-11-30 04:50:37 UTC
(In reply to comment #7)
> I suspect this being related to the phonon-backend-gstreamer. Could you
> please use the phonon-backend-vlc instead and see if this still happens?

You are correct. I can't reproduce it with phonon-backend-vlc.
Thanks
Comment 12 Alan Aversa 2012-11-30 04:58:30 UTC
(In reply to comment #11)
> (In reply to comment #7)
> > I suspect this being related to the phonon-backend-gstreamer. Could you
> > please use the phonon-backend-vlc instead and see if this still happens?
> 
> You are correct. I can't reproduce it with phonon-backend-vlc.
> Thanks

However, the Qt memory leaks still exist, and my computer's temperature still does increase, albeit after a longer amount of time.
Comment 13 Myriam Schweingruber 2012-11-30 10:18:08 UTC
The please report this to Qt, we are not responsible for their memory leaks.

And again: CPU temperature and memory consumption have absolutely NO relationship to each other, please stop this.