Open Bug 1873235 Opened 1 year ago Updated 28 days ago

Leaking page repeatedly triggers GC without freeing any memory

Categories

(Core :: JavaScript: GC, enhancement, P2)

enhancement

Tracking

()

People

(Reporter: jonco, Unassigned)

References

(Blocks 3 open bugs)

Details

(Keywords: perf:resource-use)

Pages that allocate memory up to the heap limit can enter a state where GC happens repeatedly without freeing up any memory. One example is bug 1867074 where this is caused by a leak.

Bug 1505622 was a previous attempt to fix problems like this.

Severity: -- → N/A
Priority: -- → P2
Blocks: GCOOM

bug 1853495 has a testcase/STR that should repro this (based on :joncos comment : https://bugzilla.mozilla.org/show_bug.cgi?id=1875304#c3)

Here is a profile I got recently: https://share.firefox.dev/3xCwn18

The content process includes the tab for chat.mozilla.org, and it likely leaks memory overtime (my browser session has lasted about a month and a half).

I've had two recently, one for Amazon and one for Hacker News. The latter is https://share.firefox.dev/4fIakac

The Amazon site was more or less functional. Very laggy, but things seem to work. (It's possible I only scrolled and clicked links and otherwise did things that did not require JS.) I didn't try interacting with HN.

For other people reporting this, was the tab at all functional for you?

Oh! I just looked at Florian's profile, and it was a very long CC, in particular the final slice was a non-interruptible 4.1sec. There are no GCs in that profile. My profile is doing back to back Major GCs. So they're not exactly the same.

In mine, you can look at the GCMajor marker and see that the heap goes from 3.98GB -> 3.98GB, which is the usual symptom of GC thrashing near the heap limit. The CC marker doesn't have heap size information, but it does report 590 suspected objects (which sounds small) and 4,620,955 GC objects visited (which sounds big).

So... two different problems, but perhaps both are related to lots of GC objects?

See Also: → 1938084
You need to log in before you can comment on or make changes to this bug.