Open Bug 1365251 Opened 8 years ago Updated 2 years ago

stylo: Potential process-lifetime leak in recalc_style_at -> preprocess_children -> ensure_element_data

Categories

(Core :: CSS Parsing and Computation, defect, P4)

defect

Tracking

()

Tracking Status
firefox57 --- wontfix

People

(Reporter: jseward, Assigned: jseward)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

This is with the Obama test case, and 8 stylo threads. This may be harmless/intended, but it caught my eye: max-live: 438,912 in 6,858 blocks tot-alloc: 438,912 in 6,858 blocks (avg size 64.00) deaths: 6,858, at avg age 50,573,815,834 (58.09% of prog lifetime) What's interesting is that the max-live and tot-alloc numbers are the same. That implies that this allocation point (stack) allocated blocks without freeing them as it went, and only freed them after all allocations had finished. And they stayed alive for 58% of the process lifetime, which seems a lot if styling is only one of several processing stages for showing a web page.
Attached file DHAT record (deleted) —
Flags: needinfo?(bobbyholley)
Summary: Potential process-lifetime leak in recalc_style_at -> preprocess_children -> ensure_element_data → stylo: Potential process-lifetime leak in recalc_style_at -> preprocess_children -> ensure_element_data
So, ensure_element_data creates the heap-allocated style data that hangs off the DOM elements. Those should stick around until the DOM elements are destroyed, or at least removed from the DOM tree. Does this profile include closing that tab? You can also try explicitly document a document.body.remove() call in the web console and seeing if that corresponds with all this memory being freed. Does max-live give a count of bytes or of allocations? The latter would make sense, the former wouldn't. There are ~15k elements on the obama testcase.
Flags: needinfo?(bobbyholley) → needinfo?(jseward)
Assignee: nobody → jseward
Blocks: stylo-perf
Priority: -- → P1
Priority: P1 → P4
Blocks: stylo-memory
No longer blocks: stylo-perf
status-firefox57=wontfix unless someone thinks this bug should block 57
Flags: needinfo?(jseward)
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: