Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Radio stream memory leak #4665

Open
jonas747 opened this issue Dec 21, 2014 · 23 comments
Open

Radio stream memory leak #4665

jonas747 opened this issue Dec 21, 2014 · 23 comments

Comments

@jonas747
Copy link

Listening to a radio stream will just keep consuming more and more memory, after around 10 hours of listening to 1 stream it will be up to around 1GB. Happens on both windows and linux with clementine 1.2.3.

How to reproduce:
Listen to a radio stream (in my case http://lyd.nrk.no/nrk_radio_p3_mp3_h)

@sobkas
Copy link
Contributor

sobkas commented Dec 27, 2014

I was going to run clementine in valgrind so I will take a look if I can find anything

@sobkas
Copy link
Contributor

sobkas commented Dec 27, 2014

After 2.5h I only got:
LEAK SUMMARY:
==10048== definitely lost: 74,527 bytes in 314 blocks
==10048== indirectly lost: 173,222 bytes in 2,384 blocks
==10048== possibly lost: 5,471,634 bytes in 6,356 blocks
==10048== still reachable: 3,314,550 bytes in 34,798 blocks
==10048== suppressed: 0 bytes in 0 blocks

@sobkas
Copy link
Contributor

sobkas commented Feb 25, 2015

Pleas try http://builds.clementine-player.org/ and report back if problem is still present. Thanks

@Armadill0
Copy link

I can confirm this issue. Playing for example this stream over the night or the weekend, causes clementine to collect up to 4GB RAM (or even more, but my machine gets laggy at that point and I have to kill clementine every time) at the morning: http://listen.housetime.fm/tunein-mp3-pls
This is 100% reproducable.

I'm experiencing this issue at least since Fedora 19 or 20 and I'm currently using Fedora 21 which comes with clementine 1.2.3-2.

I'll try to get a corresponding valgrind output

@Chocobozzz
Copy link
Contributor

@Armadill0 Okay, but what about with the latest build ?

@Armadill0
Copy link

Just installed clementine-1.2.3-2.993.g1f15df9.fc21.x86_64.rpm. I'll report the result in the next days.

@Chocobozzz
Copy link
Contributor

Thanks :)

@Armadill0
Copy link

It happened again:

==9286== 
==9286== HEAP SUMMARY:
==9286==     in use at exit: 974,639,478 bytes in 8,230,201 blocks
==9286==   total heap usage: 737,106,362 allocs, 728,876,161 frees, 167,506,774,449 bytes allocated
==9286== 
==9286== LEAK SUMMARY:
==9286==    definitely lost: 36,315 bytes in 55 blocks
==9286==    indirectly lost: 2,224,449 bytes in 3,456 blocks
==9286==      possibly lost: 12,435,269 bytes in 22,832 blocks
==9286==    still reachable: 959,533,381 bytes in 8,202,260 blocks
==9286==         suppressed: 0 bytes in 0 blocks
==9286== Rerun with --leak-check=full to see details of leaked memory
==9286== 
==9286== For counts of detected and suppressed errors, rerun with: -v
==9286== Use --track-origins=yes to see where uninitialised values come from
==9286== ERROR SUMMARY: 157 errors from 45 contexts (suppressed: 2 from 1)

Clementine consumed over 3GB of system memory on my machine when I killed it.

@schnelle86
Copy link

Anything new about this bug? I am getting heavy leaking while streaming radio with clementine 1.2.3 (arch linux).

@OlafLostViking
Copy link

After I saw that my Clementine 1.3.1 (Arch Linux amd64) was using almost 3GB of real memory after a week or so runtime (I only used sleep mode), I ran a leak check and after just a few seconds of streaming two radios Valgrind showed

==17703== LEAK SUMMARY:
==17703==    definitely lost: 23,018 bytes in 24 blocks
==17703==    indirectly lost: 17,399 bytes in 123 blocks
==17703==      possibly lost: 8,663,739 bytes in 6,687 blocks
==17703==    still reachable: 31,712,155 bytes in 212,661 blocks
==17703==                       of which reachable via heuristic:
==17703==                         length64           : 12,072 bytes in 270 blocks
==17703==                         newarray           : 8,632 bytes in 110 blocks
==17703==                         multipleinheritance: 112,264 bytes in 154 blocks
==17703==         suppressed: 0 bytes in 0 blocks

@V-ctor
Copy link

V-ctor commented Apr 18, 2017

The issue still present. Started with ~60Mb consumed after several hours >400Mb.
Clementine 1.3.1
Kubuntu 17.04
Linux victor-PC 4.10.0-19-generic #21-Ubuntu SMP Thu Apr 6 17:04:57 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
stream http://server03.hostingradio.ru:80/ultra-128.mp3
ran as
G_SLICE=always-malloc G_DEBUG=gc-friendly valgrind -v --tool=memcheck --leak-check=full --num-callers=40 --log-file=valgrind.log $(which clementine)

log summary:
==27281== LEAK SUMMARY:
==27281== definitely lost: 37,712 bytes in 545 blocks
==27281== indirectly lost: 2,654,007 bytes in 6,766 blocks
==27281== possibly lost: 2,879,014 bytes in 8,981 blocks
==27281== still reachable: 8,915,777 bytes in 87,247 blocks
==27281== of which reachable via heuristic:
==27281== length64 : 160,656 bytes in 216 blocks
==27281== newarray : 24,688 bytes in 75 blocks
==27281== multipleinheritance: 3,040 bytes in 10 blocks
==27281== suppressed: 0 bytes in 0 blocks
==27281== Reachable blocks (those to which a pointer was

found) are not shown.
==27281== To see them, rerun with: --leak-check=full --show-leak-kinds=all
==27281==
==27281== Use --track-origins=yes to see where uninitialised values come from
==27281== ERROR SUMMARY: 2090 errors from 894 contexts (suppressed: 0 from 0)
valgrind.zip

@risototh
Copy link

Still there. Version 1.3.1 on OS X 10.13.4
When listening to internet stream (http://stream.funradio.sk:8000/80-90-128.mp3), Clementine takes about 7.8 MB per minute. This corresponds to the 128k bitrate of the stream.
I have discovered it today, when Clementine eat 4.5 GB of memory.
You can see it here https://youtu.be/odbnfVg7MBE

@JulianVolodia
Copy link
Contributor

Hi @jonas747 , are you using Windows version? (from your glasses in avatar) What's behaviour now?

Hi @sobkas , still using Clementine on Debian? What's behaviour now?

Hi @Armadill0 still on Fedora? What's behaviour now?
Will be glad if could provide info about leaked memory on your installation if it persist.

Hi @schnelle86 and @OlafLostViking , sorry but afaik Clementine is not supported on Arch Linux... unfortunately (I also use that, sometimes).
But I think you could test that against lastest and tell us where memory leaks if you know how to do it :) I hope the fix will help for you both, too :)

Hi @V-ctor thanks for valgrind package. If several of hours of using was 'only' 400MB then we have enormous improvement, isn't it ;) (vs few GBs in hour, previously...)
Sorry, but could you test against stream which @jonas747 in first comment mentioned (I checked it is working, even muted) and see what happens on your set up.

Hi @risototh I don't have any free Mac OS X to test but if you could you try to use valgrind to help us it will be awesome! :)
https://blog.mozilla.org/nnethercote/2009/01/18/me-valgrind-and-mac-os-x/
http://www.valgrind.org/downloads/current.html

And again, please remember to test update against up-to-date source. Best using valgrind. This is not very hard to learn how to use that.

Best regards. :)

@risototh
Copy link

risototh commented Sep 16, 2019 via email

@JulianVolodia
Copy link
Contributor

JulianVolodia commented Sep 26, 2019

Hmm, I don't know if it is Valgrind error indeed. I bet not (accordingly to part about possible valgrind issue).I will need to spin off some system based on Mach-O in VM... there was time I had one... Need to wait, unfortunatelly... :-(

Cheers to Slovenská republika from Poland ;) (only kind thing I could say for now...)

PS this is probably because libsqlite3 usage - https://www.mail-archive.com/kde-bugs-dist@kde.org/msg177108.html so is a partially valgrind and partially libsqlite3 exeption handling bug, not know what to do with that valgrind run.

@risototh
Copy link

risototh commented Sep 30, 2019 via email

@JulianVolodia
Copy link
Contributor

Mmm! Yummy μC! PHP is nice, but it's naming convensions... I have 10.12 to get up but I must have time for it. I will respond when I get something making clementine more juicy!

@Armadill0
Copy link

@JulianVolodia I'm going to test it the next days. Getting back to you soon.

@Armadill0
Copy link

@JulianVolodia I couldn't reproduce it on Fedora last week in several tries. Clementine didn't consume more than 400MiB of memory after some hours of usage.

@JulianVolodia
Copy link
Contributor

@Armadill0 thanks! If you could tag version which you have used, from package manager for example?

@Armadill0
Copy link

@JulianVolodia It's been 1.3.1.

@JulianVolodia
Copy link
Contributor

@Armadill0 thanks.

@risototh could you update your MacOS (10.13.4 isn't last update of 10.13...) as I do not recognize bug mentioned above? Could you then retest without any other working software (as browser, desktop custom features, plugins and so on?).

I will have long way to set up my "MacOS" station from here but want to triage this ASAP if it is still a bug in Clementine or strange thing with system.

@V-ctor
Copy link

V-ctor commented Jan 24, 2021

@JulianVolodia did a new check. As far as I understand it still presents.
Clementine 1.4 rc2
Kubuntu 20.10
Linux victor-PC Linux victor-WorkPC 5.8.0-40-generic #45-Ubuntu SMP Fri Jan 15 11:05:36 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
stream http://nashe1.hostingradio.ru:80/ultra-128.mp3
ran as
G_SLICE=always-malloc G_DEBUG=gc-friendly valgrind -v --tool=memcheck --leak-check=full --num-callers=40 --log-file=valgrind.log $(which clementine)

==19653== LEAK SUMMARY:
==19653== definitely lost: 23,480 bytes in 43 blocks
==19653== indirectly lost: 263,059 bytes in 2,038 blocks
==19653== possibly lost: 9,687,051 bytes in 68,307 blocks
==19653== still reachable: 9,884,234 bytes in 104,679 blocks
==19653== of which reachable via heuristic:
==19653== length64 : 11,656 bytes in 271 blocks
==19653== newarray : 6,944 bytes in 66 blocks
==19653== multipleinheritance: 11,904 bytes in 31 blocks
==19653== suppressed: 0 bytes in 0 blocks
==19653== Reachable blocks (those to which a pointer was found) are not show
==19653== To see them, rerun with: --leak-check=full --show-leak-kinds=all
==19653==
==19653== ERROR SUMMARY: 255 errors from 255 contexts (suppressed: 0 from 0)

valgrind.log.gz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants