Skip to content
This repository has been archived by the owner on May 3, 2019. It is now read-only.

[Deezer] Increasing memory usage each time a new song starts with HTML 5 Player #169

Closed
ZeroDot1 opened this issue Dec 21, 2017 · 11 comments

Comments

@ZeroDot1
Copy link
Contributor

ZeroDot1 commented Dec 21, 2017

Description:

Increasing memory utilization over long usage

Steps To Reproduce:

  1. Open MellowPlayer
  2. Use MellowPlayer for 3 - 4 hours

Log Files

Logs.zip

Additional Information: Screenshots.

bildschirmfoto_2017-12-21_02-57-01
As soon as you pause the playback and wait about half an hour, the memory utilization drops again but very slowly.
bildschirmfoto_2017-12-21_03-27-49

  • Version: MellowPlayer 3.2.0.0 - Built on Dec 19 2017 at 04:15:24 (GCC 7.2.1 20171128, 64 bit) with Qt 5.10.0
  • Affected streaming services (if any): Deezer
  • Operating System: Arch Linux
@ColinDuquesnoy
Copy link
Owner

ColinDuquesnoy commented Dec 21, 2017

Those issues seems to be coming from QtWebEngine. There are few unresolved issues about memory leaks in QtWebEngine issue tracker (see QTBUG-57272, QTBUG-64289). Most of the times those issues are false positive (due to the way qt/chromium manage memory, e.g. lazily de-allocated buffers) or are due to graphics drivers.

If the memory clean up itself after a few minutes/hours than it isn't a bug or a memory leak.

I regularly run valgrind on the whole MellowPlayer test suite so I am fairly confident there is no big memory leaks in the C++ code (the test suite does not include actual web views though).

There is a hint in QTBUG-57272 that calling the function "runJavascript" could cause some memory leaks. Since this is exactly how MellowPlayer interacts with webviews, I might want to investigate another solution and see if it helps regarding high memory usage.

@ColinDuquesnoy
Copy link
Owner

ColinDuquesnoy commented Dec 21, 2017

Are you using flash? Deezer can work without flash now: https://support.deezer.com/hc/en-gb/articles/115004370249-Common-Fixes-for-your-Browser (see enable html5 section)

Do you see the same memory usage if using chromium and/or qupzilla?

@ZeroDot1
Copy link
Contributor Author

Flash is not installed, whether there is the same usage of memory with the Chromium browser I will test as soon as I can.

@ZeroDot1
Copy link
Contributor Author

I tested it, the same problem occurs when using Qupzilla.
With the Chromium Browser this problem does not occur.
The whole thing is independent of the hardware used, I tested it with an AMD computer and an Intel computer.
Screenshot Deezer Taskmanager (Qupzilla)
bildschirmfoto_2017-12-23_17-14-36

The memory usage increases only when content is loaded.

@ZeroDot1 ZeroDot1 changed the title [BUG]: Increasing memory utilization over long usage [QT - Web - BUG]: Increasing memory utilization over long usage Dec 23, 2017
@ColinDuquesnoy
Copy link
Owner

Thank you for looking into it.

For reference, can you post the output of inxi -F of both your systems and the version of MellowPlayer and Qt you used?

I am also investigating this issue but I don't have enough results to talk about yet.

@ColinDuquesnoy
Copy link
Owner

I can see high memory usage on Antergos with Qt 5.10. Memory is much more stable and remains low if I turn off HTML5 Player and install pepper-flash

screenshot from 2017-12-25 13-39-17

@ColinDuquesnoy
Copy link
Owner

Same issue in chromium:

screenshot from 2017-12-25 19-08-45

Every time I skip to the next track, there is about 20-30 MiB used. I managed to make chromium use 1.4 GiB by just clicking on the next song button during a minute. That does not happen if you use flash.

This is not a MellowPlayer bug and not a Qt bug. This is either a Deezer bug or a chromium bug. I will try with google chrome on other platforms (e.g. Windows and OSX).

@ColinDuquesnoy ColinDuquesnoy changed the title [QT - Web - BUG]: Increasing memory utilization over long usage [Deezer] Increasing memory usage each time a new song starts Dec 25, 2017
@ColinDuquesnoy ColinDuquesnoy changed the title [Deezer] Increasing memory usage each time a new song starts [Deezer] Increasing memory usage each time a new song starts with HTML 5 Player Dec 25, 2017
@ColinDuquesnoy
Copy link
Owner

ColinDuquesnoy commented Dec 25, 2017

This also happens with google chrome on Windows 7

capture

I can also reproduce this with Safari on Mac OSX.

I think I will report it to deezer -> I reported the bug to deezer

@ZeroDot1
Copy link
Contributor Author

ZeroDot1 commented Dec 25, 2017

$ inxi -F
System:    Host: A632-OS Kernel: 4.14.8-1-ARCH x86_64 bits: 64
           Desktop: Xfce 4.12.4 Distro: Arch Linux
Machine:   Device: desktop Mobo: MSI model: 760GM-P23(FX) (MS-7641) v: 3.0 serial: N/A
           BIOS: American Megatrends v: V17.15 date: 04/28/2013
CPU:       Dual core AMD Athlon II X2 270 (-MCP-) cache: 2048 KB
           clock speeds: max: 3400 MHz 1: 3400 MHz 2: 3400 MHz
Graphics:  Card: NVIDIA GT215 [GeForce GT 240]
           Display Server: x11 (X.Org 1.19.5 ) driver: nvidia
           Resolution: [email protected]
           OpenGL: renderer: GeForce GT 240/PCIe/SSE2
           version: 3.3.0 NVIDIA 340.104
Audio:     Card-1 NVIDIA High Def. Audio Controller driver: snd_hda_intel
           Card-2 Advanced Micro Devices [AMD/ATI] SBx00 Azalia (Intel HDA)
           driver: snd_hda_intel
           Sound: Advanced Linux Sound Architecture v: k4.14.8-1-ARCH
Sensors:   System Temperatures: cpu: 36.5C mobo: N/A gpu: 52C
           Fan Speeds (in rpm): cpu: N/A
Info:      Processes: 187 Uptime: 5:22 Memory: 6551.1/16045.6MB
           Client: Shell (bash) inxi: 2.3.53 
System:    Host: a0 Kernel: 4.14.8-1-ARCH x86_64 bits: 64
           Desktop: Xfce 4.12.4 Distro: Arch Linux
Machine:   Device: laptop System: MEDION product: P7624 serial: N/A
           Mobo: MEDION model: P7624 serial: N/A
           BIOS: American Megatrends v: 0.49 date: 10/31/2011
CPU:       Dual core Intel Core i3-2350M (-MT-MCP-) cache: 3072 KB
           clock speeds: max: 2300 MHz 1: 2294 MHz 2: 2294 MHz 3: 2294 MHz
           4: 2294 MHz
Graphics:  Card-1: Intel 2nd Generation Core Integrated Graphics Controller
           Card-2: NVIDIA GF108M [GeForce GT 620M/630M/635M/640M LE]
           Display Server: N/A drivers: modesetting (unloaded: fbdev,vesa)
           tty size: 80x24
Audio:     Card Intel 6 Series/C200 Series Family High Def. Audio Controller
           driver: snd_hda_intel
           Sound: Advanced Linux Sound Architecture v: k4.14.8-1-ARCH
Sensors:   System Temperatures: cpu: 39.0C mobo: 27.0C gpu: 37.0
           Fan Speeds (in rpm): cpu: N/A
Info:      Processes: 168 Uptime: 1 min Memory: 369.9/7890.2MB Init: systemd
           Client: Shell (bash) inxi: 2.3.53 

@ColinDuquesnoy
Copy link
Owner

ColinDuquesnoy commented Jan 20, 2018

I tried again with the HTML 5 Player and it seems the issue has been fixed.

@ZeroDot1 can you confirm this?

@ZeroDot1
Copy link
Contributor Author

Thank you very much, the problem is solved.
I have updated the test script.
https://raw.githubusercontent.com/ZeroDot1/Bash_my_little_collection/master/Build_Software/MellowPlayerEasyCreation.sh

Thank you for working on the project, it's awesome. 👍

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

No branches or pull requests

2 participants