Stall/high cpu usage with youtube, high tab count, win7 firefox

Ask for help about NoScript, no registration needed to post
Guest

Stall/high cpu usage with youtube, high tab count, win7 firefox

Post by Guest » Wed Aug 05, 2020 4:36 am

Problem started around two weeks ago, no later than FF 78.0.2, possibly with 78.0. Visiting Youtube or a site with one or more embedded youtube videos produces a near-total stall in Firefox for 10s of seconds and approaching a minute or more. Other video and/or JS-riddled sites *may* be producing similar problems. Problem arises as soon as a tab is activated with such videos/JS:
* FF tabs do not respond to clicks during the stall.
* Scrolling is almost completely stalled (slow, infrequent updated)
* Any 'about:performance' task monitoring stops updating (or updates very rarely) - will indicate one task spiking before a stall.
* Stall continues for 10s of seconds after which normal responsiveness returns.
* If NoScript and only NoScript is disabled in FF, the problem immediately stops. If re-enabled, problem immediately returns.

More environmental details:
* Youtube script sources are whitelisted except for: doubleclick.net and googlesyndication.com which are blocked.
* FF instance is *very* tab-heavy: over 2K tabs and multiple windows. (My bookmark collections are in the 100s of Ks.)
* When the stall occurs, two FF processes will begin running at high CPU (each about 13% or one thread equivalent). But this isn't consumed in one thread. Instead, I see four (or more) i7 threads showing about 50% utilization. The two FF process go into high page fault and I/O read rates as if a massive amount of data is being transported between them. After some 10s of seconds, the cpu usage drops, and the stall is over.
* After being up about an hour, one of these FF processes shows 86 million page faults, 8.3 million reads, 3.2GB working set. The other has 13.4 million page faults, 5 million reads, 1.4GB working set. After stall clears, working sets shrink to 1.4GB and .2GB respectively.

Environment:
Win7 Pro 64-bit 32GB 4-core/8-thread i7
Firefox 79.0, 78.0.2, and possibly starting with 78.0. High tab count (>2k), six windows (~13 firefox processes running)
NoScript 11.0.34
Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:79.0) Gecko/20100101 Firefox/79.0

barbaz
Senior Member
Posts: 9720
Joined: Sat Aug 03, 2013 5:45 pm

Re: Stall/high cpu usage with youtube, high tab count, win7 firefox

Post by barbaz » Wed Aug 05, 2020 1:46 pm

Any difference with latest development build?
If that doesn't help, any difference with NoScript 11.0.32?

Old NoScript @
https://addons.mozilla.org/addon/noscript/versions
*or*
https://noscript.net/feed?quantum&c=100
*Always* check the changelogs BEFORE updating that important software!
-

Guest

Re: Stall/high cpu usage with youtube, high tab count, win7 firefox

Post by Guest » Wed Aug 05, 2020 2:02 pm

Both rc4 and 11.0.32 show the stall. Stall clears immediately for both once add-on is disabled.
Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:79.0) Gecko/20100101 Firefox/79.0

User avatar
Giorgio Maone
Site Admin
Posts: 8972
Joined: Wed Mar 18, 2009 11:22 pm
Location: Palermo - Italy
Contact:

Re: Stall/high cpu usage with youtube, high tab count, win7 firefox

Post by Giorgio Maone » Wed Aug 05, 2020 9:08 pm

Does the problem persist if NoScript is the only extension installed?
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:80.0) Gecko/20100101 Firefox/80.0

Guest

Re: Stall/high cpu usage with youtube, high tab count, win7 firefox

Post by Guest » Thu Aug 06, 2020 2:20 pm

Giorgio Maone wrote:
Wed Aug 05, 2020 9:08 pm
Does the problem persist if NoScript is the only extension installed?
Yes. Extensions installed:
* NoScript (Enabled)
* Privacy Badger (Enabled)
* Firebug (Disabled)
* Session Manager (Disabled)
* Tab Mix Plus (Disabled)

Uninstalled all but NoScript and restarted for a clean session. Visited youtube.com and the same problem appears: two firefox processes churn for 10s of seconds stalling FF and consuming around one thread each.

I did put VS profiler (2019) on the processes as well. Don't have symbols for the .exe or .dll but the hot spots show up for total and self CPU:

Code: Select all

Function Name   Total CPU [unit, %]     Self CPU [unit, %]      Module
| - xul.dll!0x0007feb783b381    33521 (73.28 %) 0 (0.00 %)      xul.dll
| - xul.dll!0x0007feb8645188    33521 (73.28 %) 0 (0.00 %)      xul.dll
| - xul.dll!0x0007feb7861d05    30326 (66.30 %) 0 (0.00 %)      xul.dll
| - firefox.exe!0x0000013fce11e8        30221 (66.07 %) 0 (0.00 %)      firefox.exe
| - firefox.exe!0x0000013fce14ba        30221 (66.07 %) 0 (0.00 %)      firefox.exe
| - firefox.exe!0x0000013fd29188        30221 (66.07 %) 0 (0.00 %)      firefox.exe
| - xul.dll!0x0007feb7a01a06    30221 (66.07 %) 0 (0.00 %)      xul.dll
| - xul.dll!0x0007feb7a023f4    30221 (66.07 %) 0 (0.00 %)      xul.dll
| - xul.dll!0x0007febb26e5e2    30221 (66.07 %) 0 (0.00 %)      xul.dll
| - xul.dll!0x0007febb31bced    30221 (66.07 %) 0 (0.00 %)      xul.dll
| - xul.dll!0x0007febb31cef7    30221 (66.07 %) 0 (0.00 %)      xul.dll
| - xul.dll!0x0007febb31d30c    30221 (66.07 %) 0 (0.00 %)      xul.dll
...
Function Name   Total CPU [unit, %]     Self CPU [unit, %]      Module
| - xul.dll!0x0007feb7db977a    5054 (11.05 %)  5052 (11.04 %)  xul.dll
| - xul.dll!0x0007feb7a69b61    4832 (10.56 %)  0 (0.00 %)      xul.dll
| - xul.dll!0x0007febb4c3564    4297 (9.39 %)   0 (0.00 %)      xul.dll
| - xul.dll!0x0007feba1cd7ad    3988 (8.72 %)   0 (0.00 %)      xul.dll
| - xul.dll!0x0007feba1cd5da    3975 (8.69 %)   3 (0.01 %)      xul.dll
| - xul.dll!0x0007feb7839694    3141 (6.87 %)   0 (0.00 %)      xul.dll
| - xul.dll!0x0007feb863da0a    3141 (6.87 %)   0 (0.00 %)      xul.dll
| - xul.dll!0x0007feb783b40f    3074 (6.72 %)   0 (0.00 %)      xul.dll
| - xul.dll!0x0007feb7db977e    2885 (6.31 %)   2885 (6.31 %)   xul.dll
| - xul.dll!0x0007feb7db9762    2437 (5.33 %)   2436 (5.33 %)   xul.dll
Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:79.0) Gecko/20100101 Firefox/79.0

Guest

Re: Stall/high cpu usage with youtube, high tab count, win7 firefox

Post by Guest » Thu Aug 06, 2020 3:08 pm

Did some profiling with the mozilla tool (very nice!) and there is a massive GC storm in the WebExtensions process. It's a continuous run of GCMajor/GCMinor processing due to TOO_MUCH_MALLOC triggers on multi-100-MB allocations. The surrounding JS activity seems to be JSActor message handler/promise callback processing between the process handling youtube and the WebExtensions process. I have a profile capture file which I can make available to you by other means.
Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:79.0) Gecko/20100101 Firefox/79.0

Nacho21
Posts: 1
Joined: Sun Aug 09, 2020 1:47 pm

Re: Stall/high cpu usage with youtube, high tab count, win7 firefox

Post by Nacho21 » Sun Aug 09, 2020 1:49 pm

Made an account to say im having this EXACT issue. Tried 11.0.37rc1 still didn't help.
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:79.0) Gecko/20100101 Firefox/79.0

User avatar
Giorgio Maone
Site Admin
Posts: 8972
Joined: Wed Mar 18, 2009 11:22 pm
Location: Palermo - Italy
Contact:

Re: Stall/high cpu usage with youtube, high tab count, win7 firefox

Post by Giorgio Maone » Mon Aug 10, 2020 4:46 pm

Guest wrote:
Thu Aug 06, 2020 3:08 pm
I have a profile capture file which I can make available to you by other means.
Yes, that would be nice. Please capture it on 11.0.37rc2, if you can, thanks.
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:80.0) Gecko/20100101 Firefox/80.0

Guest

Re: Stall/high cpu usage with youtube, high tab count, win7 firefox

Post by Guest » Tue Aug 11, 2020 5:43 am

Link to profiling data against 11.0.37rc3 sent.
Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:79.0) Gecko/20100101 Firefox/79.0

M-R

Re: Stall/high cpu usage with youtube, high tab count, win7 firefox

Post by M-R » Fri Aug 14, 2020 12:20 am

I don't have the computer knowledge to add to this thread, but my computer is behaving exactly like this for the last couple of months. Now I am using FF79 with Noscript 11.0.37, but the same thing happened with the previous versions of both. It's so bad that I try to avoid any page with any kind of video (and I avoid you tube)
I am using Linux Mint, but I don't know how to find the other informations the thread opener did.
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:79.0) Gecko/20100101 Firefox/79.0

M-R

Re: Stall/high cpu usage with youtube, high tab count, win7 firefox

Post by M-R » Fri Aug 14, 2020 4:42 am

There is something I can add, I don't know if that happen to the other people who have this problem too: Firefox hangs for a lot of time (with the cpu use of the main thread and of the WebExtensions thread that spike up to the max and the RAM use that go up by 4-6 GBytes or more) even when I CLOSE the tab.

So, what happen is this: if I make the mistake to open a page with a video, Firefox hangs for over a minute. Then, I can watch the video normally, but i have to keep that tab open. If I close it, Firefox hangs again, for the same time, more or less.
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:79.0) Gecko/20100101 Firefox/79.0

User avatar
Giorgio Maone
Site Admin
Posts: 8972
Joined: Wed Mar 18, 2009 11:22 pm
Location: Palermo - Italy
Contact:

Re: Stall/high cpu usage with youtube, high tab count, win7 firefox

Post by Giorgio Maone » Fri Aug 14, 2020 10:06 am

I'm quite puzzled, as I cannot reproduce yet (and I use Youtube a lot).
Could you please share with me your NoScript Options>Export file?
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:80.0) Gecko/20100101 Firefox/80.0

Guest

Re: Stall/high cpu usage with youtube, high tab count, win7 firefox

Post by Guest » Fri Aug 14, 2020 2:27 pm

Exported options sent via email.

@M-R, yes, I see that close behavior as well. Not certain whether it's from closing one tab or rendering an adjacent one.
Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:79.0) Gecko/20100101 Firefox/79.0

Guest42

Re: Stall/high cpu usage with youtube, high tab count, win7 firefox

Post by Guest42 » Sat Aug 22, 2020 1:26 pm

This has been happening to me to for at least the last couple weeks. I just got around to trying to pin down the culprit.

It happens even when NoScript is the only running add-on. It affects any YouTube page, or any other page that has an embedded YouTube video.

I'm on Win 10 Home ver. 1909 build 18363.959
Firefox 79.0 64 bit
NoScript 11.0.39
Approx. 1600 tabs open between 2 windows.

Browsing the web without NoScript makes me feel naked. :cry:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:79.0) Gecko/20100101 Firefox/79.0

User avatar
Giorgio Maone
Site Admin
Posts: 8972
Joined: Wed Mar 18, 2009 11:22 pm
Location: Palermo - Italy
Contact:

Re: Stall/high cpu usage with youtube, high tab count, win7 firefox

Post by Giorgio Maone » Sun Aug 23, 2020 1:18 pm

If this problem surfaced "in the past couple weeks", there are good chances latest development build can fix it. Please check it, thank you:

v 11.0.40rc2
============================================================
x Avoid synchronous policy fetching whenever possible
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:80.0) Gecko/20100101 Firefox/80.0

Post Reply