[V-T] Artificial testcase rapidly leads to rapid memory use and OOM/system hang
Categories
(Core :: CSS Parsing and Computation, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox142 | --- | fixed |
People
(Reporter: mayankleoboy1, Assigned: nical)
References
(Blocks 2 open bugs)
Details
(Whiteboard: [viewtransitions:m2:gfx])
Attachments
(7 files)
Reporter | ||
Comment 1•3 months ago
|
||
Reporter | ||
Comment 2•3 months ago
|
||
Testcases generated using chatgpt. They lead to rapid memory increase on Firefox and eventual OOM. Works nicely on Chrome.
I am not 100% sure if the issue is specific to V-T, or is in general perf issue.
Reporter | ||
Comment 3•3 months ago
|
||
Reporter | ||
Comment 4•3 months ago
|
||
This seems to work great - generates two animations on the page. Chrome only shows a single animation.
https://share.firefox.dev/3SVi7YS
Reporter | ||
Comment 5•3 months ago
|
||
Vt in iframes. Works great on Firefox.
https://share.firefox.dev/4lsor6z
Reporter | ||
Comment 6•3 months ago
|
||
This leads to explosive OOM on Firefox. Chrome seems to be just fine
Comment 7•3 months ago
|
||
I can't seem to reproduce OOM in comment 6, even if I leave it running for a while. But I do reproduce other issues like the browser chrome flickering... That must be on the WR side, nical can you look at that?
Mayank, I assume you're on windows? Does the OOM reproduce with SW-WR? Do you have any other non-default settings?
Updated•3 months ago
|
Updated•3 months ago
|
Reporter | ||
Comment 8•3 months ago
•
|
||
I use win11. See my about:support in comment 3.
I can repro on a new profile with both hw-wr and sw-wr.
To repro, you may have to click inside the tab or maybe wait for a few seconds.
Edit: Profile with memory tracking : https://share.firefox.dev/4naLgNJ
Reporter | ||
Comment 9•3 months ago
|
||
(In reply to Emilio Cobos Álvarez (:emilio) from comment #7)
I can't seem to reproduce OOM in comment 6, even if I leave it running for a while. But I do reproduce other issues like the browser chrome flickering... That must be on the WR side, nical can you look at that?
I see very bad flickering on Android.
Assignee | ||
Comment 10•2 months ago
|
||
With the OOM'ing test case we are continuously starting new transitions (skipping the previous one), and allocating new images for the old state which are rendered with the offscreen transaction but never deallocated unless switching to another tab (in which case they get all freed in one go). While the test is doing its thing we are never sending a non-offscreen transaction (only offscreen ones) which means we don't get to send the DeleteSnapshotImage commands and the deferred deletion list just keeps growing.
Since we are never pushing a real transaction (replaces references to pending images), we can't just send an IPC message to flush the pending deletion list. We either need to send a new display list, or keep track of what captured elements have been used by a display non-offscreen display list. Those that have not been used can be deleted right away when the transition is skipped (the could be put in a separate deletion list that offscreen transactions are allowed to clear).
Assignee | ||
Comment 11•2 months ago
|
||
Thinking about it more, this requires a pretty contrived situation: the page has no interactive elements and nothing changes so we don't build any transaction, and we continuously start transitions that don't change anything visually (otherwise it would also cause a transaction that would free the old image keys).
Perhaps we can detect that we have sent a number of offscreen transactions without sending a normal one, and skip transitions altogether (without ever starting it). I don't know if that's easy to express. In the mean time I'm exploring marking whether a snapshot key is used so that the ones that aren't can be destroyed more proactively.
Assignee | ||
Comment 12•2 months ago
|
||
I have a not pretty but not terrible fix for this which I can't submit right now because of some infra issues. I'll submit it early next week.
Updated•2 months ago
|
Updated•2 months ago
|
Updated•2 months ago
|
Assignee | ||
Comment 13•2 months ago
|
||
Comment 14•2 months ago
|
||
Comment 15•2 months ago
|
||
Backed out for causing BP bustages @ViewTransition.cpp
Comment 16•2 months ago
|
||
Assignee | ||
Updated•2 months ago
|
Comment 17•2 months ago
|
||
bugherder |
Updated•1 month ago
|
Description
•