Hi Everyone,
We're investigating a memory leak where the Memory Footprint stays high, but the JavaScript Memory recovers as expected.
The Memory Footprint does not reduce when we 1) close the sidebar on the tab, or 2) close the tab. Therefore, we suspect there's either:
- A Chrome memory leak bug in the Side Panel or tab renderer process
- The memory is actually associated with our offscreen document or background worker
Given it's the Memory Footprint, our understanding is the memory is associated with a renderer process or DOM nodes. So that would rule out the background worker.
Unfortunately, given that it's not the JS VM, we can't use the DevTools heap analysis to investigate.
According to chrome://memory-internals/ and chrome://tracing with memory-infra available, the bulk of the retained object are from malloc. However, the tracing UI gives no visibility into the content (we just see the allocators "bucket_"s)
Does anyone have any ideas how we might track down:
- Which component of our extension allocated the memory (the content script vs. the side panel vs. the offscreen document)
- What kind of content the retained memory is (e.g., DOM nodes, or extension-specific data). Is there a way to snapshot/dump the contents of the heap?
- What might be retaining the memory?
Thanks,
Todd