Open Bug 1541866 Opened 2 years ago Updated 2 years ago

YouTube Download Button causes massive memory use resulting in a near freeze


(Firefox :: Extension Compatibility, defect)

60 Branch
Not set





(Reporter: davejplater, Unassigned)



(6 files)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0

Steps to reproduce:

Installed and enabled "YouTube Download Button" extension then browse different sites without any use of the extension. Usually a site that uses cdn's

Actual results:

The mouse pointer slows down and stops, system becomes very sluggish. I ctrl alt F2 to a console, log in as root (This is a very slow operation) top shows that process "Web content" is using > 76% of memory which is exhausted. I execute "killall firefox" which is the only way out. dmsg shows:
Apr 04 14:18:24 Arbuthnot kernel: Chrome_~dThread[21816]: segfault at 0 ip 00007f515bd4de13 sp 00007f5158bb3b10 error 6 in[7f515b832000+589b000]
Apr 04 14:18:24 Arbuthnot kernel: Chrome_~dThread[21861]: segfault at 0 ip 00007fb865f4de13 sp 00007fb862db3b10 error 6 in[7fb865a32000+589b000]
Apr 04 14:18:24 Arbuthnot kernel: Chrome_~dThread[21792]: segfault at 0 ip 00007f9ff044de13 sp 00007f9fed2b3b10 error 6 in[7f9feff32000+589b000]
Apr 04 14:18:24 Arbuthnot kernel: Chrome_~dThread[20419]: segfault at 0 ip 00007f2b5304de13 sp 00007f2b4feb3b10 error 6 in[7f2b52b32000+589b000]

and I can try again.

Expected results:

I should be able to browse forever.
I've had this problem for months, I totally reset firefox and didn't have any problem until I needed to download you tube instructions for resetting a laptop and installed the "YouTube Download Button" extension and used it once. The next day this problem occurred. I removed it and all was well for a few days then I thought what if other people have this problem, there's no where to report a bug on the extension's site and I had installed the addon 1 to 2 years ago and forgotten it and it was only after firefox updates that I had this problem. I have the extension disabled atm but users should be warned about this or am I the only one with this problem?

Hi Dave, I tried to reproduce this issue on Ubuntu 18.04 as well as Windows but without any success my CPU won't go over 50% with or without the Add-on.

Can you please capture a performance profile? You can get more info on how to install and use the Cleopatra add-on (that helps you get the performance profile) by going to:

Flags: needinfo?(davejplater)

Ok I've installed the profiler and turned it on. I've also enabled "You Tube Download Button". After an hour or so I will get the freeze and have to go to a console and kill firefox. I see that the profiler is disabled after a restart, hopefully I will have the information you need.
A few items that may affect reproduction:
Model: 6.42.7 "Intel(R) Core(TM) i3-2120 CPU @ 3.30GHz"
Device: pci 0x0102 "2nd Generation Core Processor Family Integrated Graphics Controller"
Using the i915 driver.
I have 4G Ram

cat /etc/os-release

NAME="openSUSE Leap"
ID_LIKE="suse opensuse"
PRETTY_NAME="openSUSE Leap 15.0"

Mozilla Firefox 60.6.1 but it's been around for many esr releases

The freeze seems to happen on loading

Flags: needinfo?(davejplater)

One other non standard item "media.autoplay.enabled" is set to false in about:config

(In reply to Rares Doghi from comment #1)

Hi Dave, I tried to reproduce this issue on Ubuntu 18.04 as well as Windows but without any success my CPU won't go over 50% with or without the Add-on.

The cpu usage is fine, my memory gets consumed to the point where there is only 130M left and virtual memory is also consumed in large quantities. It may be that a machine with more than 4G ram may not be affected.
This is what top normally produces, I have 5 tabs open and non of the tabs are cdn rich and won't cause the freeze:
2592 davepl 20 0 3429768 765484 123456 S 8.970 19.37 2:58.36 firefox
3011 davepl 20 0 2156516 439596 80680 S 8.638 11.12 1:07.34 Web Content
2745 davepl 20 0 2233660 519840 116500 S 8.306 13.15 2:22.69 Web Content
2645 davepl 20 0 2228540 485076 85204 S 7.641 12.27 2:22.39 Web Content

I have just recovered from a freeze, this time there was a core dump.
As soon as I visited which is advert and cdn rich I had a freeze, unfortunately my system is so slow I couldn't run top to give a comparison, I'll enable "You Tube Download Button" again and run top in the virtual console and take a picture with my phone.

Where can I find the profile that was recorded before I had to kill firefox?

Flags: needinfo?(rares.doghi)
Attached file core dump when frozen

This happened while firefox was frozen

dmesg before firefox was killed, could be because I have to unplug/plug my mouse and keyboard to get things to move:
[ 2846.024585] systemd-journald[3300]: File /var/log/journal/17607c14dd32fe5001914e7b583596e7/system.journal corrupted or uncleanly shut down, renaming and replacing.
[ 2846.248172] systemd-coredump[3264]: Process 394 (systemd-journal) of user 0 dumped core.
[ 2846.249285] systemd-coredump[3264]: Coredump diverted to /var/lib/systemd/coredump/core.systemd-journal.0.a6e53e4e60ef41959d22661b5ed60c89.394.1554794188000000.lz4

Hi Dave, after you capture the performance profile you have to hit CTRL+SHIFT+2 and in the top right corner there is a Save As file.. button that might let you save it and attach it to this Defect. Or if the file gets to big maybe add it to a google drive or dropbox and give us the link.

Component: Untriaged → Extension Compatibility
Flags: needinfo?(rares.doghi) → needinfo?(davejplater)

he combination of Geko profiler and "You Tube Download Button" and the site makes my system almost unusable, I managed to get a couple of pictures of top's output with my phone, I'll attach them.

I've tarred the directory which geko profiler uses as stated in profiles.ini:


Will attach that, I can't press ctrl+shift+2 it's impossible.

Flags: needinfo?(davejplater)

This is the entire profiler's directory, should have useful information.

I enabled the profiler without problem websites in tabs, just two openSUSE build service instances gmail and this web page,
I enabled profiling and pressed ctrl+shift+2 and my system froze on the profilers web page on loading google-analytics.
I had to use ctrl+alt+sysrq+e and then press the power button to recover.
I'll try again with only this web page and upload the profiler's directory again.

File saved from profiler, this time my browser is functioning as expected.

With the profiler's web page up and running as soon as I click the enable button for the "You Tube Download Button" my system freezes and I can only recover with ctrl+alt+sysrq+e and press power button.
Will tar and attach the profiler's directory.

The latest tarred profiler's directory

This profile is with open and loaded.

Attached file topout.tar.gz

These are the tarred top1.jpg, top2.jpg, top3.jpg pictures I took with my phone while this bug was happening.

Last possible item for reproduction, I use poor quality broadband lte which averages between 4Mb/s and 16Mb/s.

You need to log in before you can comment on or make changes to this bug.