Closed Bug 1614880 Opened 5 years ago Closed 2 years ago

Weather Underground page rapidly uses a lot of JS memory

Categories

(Core :: JavaScript Engine, defect)

73 Branch
defect

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: yoasif, Assigned: sfink)

References

()

Details

(Whiteboard: [MemShrink:P1])

Attachments

(1 file)

Attached file memory-report.json.gz

From https://www.reddit.com/r/firefox/comments/f2m5yn/firefox_73_resource_leak_when_viewing/

Steps to reproduce:

  1. Navigate to: https://www.wunderground.com/weather/us/ny/manhattan/40.75,-74.00

What happens:

Memory balloons.

Expected result:

This page shouldn't use a lot of memory.

User reports that:

It wasn't a problem in version 72 but now it is in release 73 on Windows 10 Pro 1909 64bit.

but using mozregression, I seemed to reproduce the issue in 72 as well. Another user was able to reproduce on 71 as well.

Memory report attached.

Component: Memory Allocator → Untriaged
Product: Core → Firefox

The memory usage is all JS, mostly classes, including more weak maps than I've ever seen in a report before.

│ │ │ ├──4,197.87 MB (91.43%) -- window(https://www.wunderground.com/weather/us/ny/manhattan/40.75,-74.00)
│ │ │ │ ├──4,187.76 MB (91.21%) -- js-realm(https://www.wunderground.com/weather/us/ny/manhattan/40.75,-74.00)
│ │ │ │ │ ├──4,173.67 MB (90.90%) -- classes
│ │ │ │ │ │ ├──1,112.43 MB (24.23%) ++ class(Call)/objects
│ │ │ │ │ │ ├──1,110.35 MB (24.18%) ++ class(Object)/objects
│ │ │ │ │ │ ├────908.20 MB (19.78%) ++ class(Function)/objects
│ │ │ │ │ │ ├────880.65 MB (19.18%) ++ class(Array)/objects
│ │ │ │ │ │ ├────160.01 MB (03.49%) ++ class(WeakMap)/objects

Steve, could this be related to some of the other weak map stuff on file?

Component: Untriaged → JavaScript Engine
Flags: needinfo?(sphink)
Product: Firefox → Core
Whiteboard: [MemShrink:P1]
Summary: Weather Underground page rapidly uses a lot of memory, causes janking when switching tabs → Weather Underground page rapidly uses a lot of JS memory

I tried reproducing it, but wasn't sure how long I had to wait. When I measured after a minute or so, it was at 4GB and spewing out of memory errors... I'd say I can reproduce! (4GB in the content process, same pattern that mccr8 showed.)

Assignee: nobody → sphink

Interestingly, this issue does not appear if I enable Enhanced Tracking Protection and/or uBlock Origin. This suggests that the scripts in question are tracking or ad scripts which are caught by the aforementioned tools.

I can also reproduce in 72.0.2. I cannot reproduce in Chrome, fwiw.

When I try to dump the CC/GC graph, it produces a couple of log files but always has two files still named "incomplete-{gc,cc}*". Usually they're zero-length, once I got a bunch of (incomplete) data in the 3.3GB GC log.

I'm having trouble getting a small enough log to analyze.

I cannot reproduce this currently with Firefox 73.0 in a clean profile on Ubuntu 19.10, even with Enhanced Tracking Protection disabled. There are no "too much recursion" errors in the web console and no memory growth.

Severity: normal → S3
Status: NEW → RESOLVED
Closed: 2 years ago
Flags: needinfo?(sphink)
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: