Open Bug 1646174 Opened 4 years ago Updated 1 year ago

[Meta] Blob: on GamesRadar consumes entire cpu core when the active tab.

Categories

(Core :: Performance, defect, P3)

77 Branch
defect

Tracking

()

People

(Reporter: danialhorton, Unassigned)

References

Details

(Keywords: meta)

Attachments

(2 files)

User Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:56.0) Gecko/20100101 Firefox/56.0 Waterfox/56.3

Steps to reproduce:

Navigated to Gamesradar.com or any article on the gamesradar site.

Watch the process list in task manager.

Actual results:

A content process began consuming cpu indefinitely, memory may consume several gigabytes if left open for a period of time, particularly on any of the articles embedding gifycat players.

Expected results:

It definitely shouldn't eternally chew a cpu core,

I have confirmed this across several firefox versions (and waterfox) and fresh profiles, and narrowed it down to the site being allowed to load a Blob:

Bugbug thinks this bug should belong to this component, but please revert this change in case of error.

Component: Untriaged → Graphics: WebRender
Product: Firefox → Core

I doubt it since the issue manifests regardless of the use of webrender.

There is no webrender available in a VM, and the sanity test disable pref is set anyway so its unrelated to web render.

To note, this occurs on waterfox classic as well which doesn't have webrender enabled, but the testing has been done on firefox 72 and 77 as well with these prefs on real hardware so its got nothing to do with it

Firefox is chewing a cpu regardless of the presence of support for webrender.

There's a bunch of stuff going on in that profile, including one tracker script checking window dimensions and other stuff in an interval. There's still a fair amount of time spent in the setInterval machinery itself...

I wonder, is this similarly bad on Nightly? I think some timer improvements landed in 78.

But yeah, clearly nothing webrender specific there.

Component: Graphics: WebRender → Performance

Hi Emilio, I have blocked the specific quantcast blob rather than all of them as i had been to mitigate temporarily and the issue is gone,

it looks like it is supposed to make a GPDR cookie banner appear, but never does, it may be an issue in the websites implementation of this script, but i haven't come across other sites using quantcast to make a firm conclusion on that.

I'm afraid nightly is no better off here.

Depends on: 1646799

I found two issues so far:

  1. The site is using setInterval(..., 0) and we don't throttle it (bug 1646799).
  2. In Nightly, SavedStack capturing is responsible for most of the memory usage (bug 1646792).
Status: UNCONFIRMED → NEW
Ever confirmed: true

(In reply to Markus Stange [:mstange] from comment #9)

I found two issues so far:

  1. The site is using setTimeout(..., 0) and we don't throttle it (bug 1646799).

I guess you mean setInterval

Severity: -- → S3
Priority: -- → P3
Summary: Blob: on GamesRadar consumes entire cpu core when the active tab. → [Meta] Blob: on GamesRadar consumes entire cpu core when the active tab.

er, yes, fixed the comment

(In reply to Markus Stange [:mstange] from comment #9)

  1. In Nightly, SavedStack capturing is responsible for most of the memory usage (bug 1646792).

This turned out to be false. The memory is consumed by other JS objects but I'm not sure how. The memory devtools might help answer that question.

I've grabbed a few snapshots with the memory devtools and most of the memory seems to be PromiseReaction and Function objects. They're rooted in some mCallback. I don't know what that means - maybe the page is never canceling its setIntervals, and just stacking up more and more of them?

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

Attachment

General

Creator:
Created:
Updated:
Size: