Renderer crashes due to out of memory for certain webpage |
|||||||
Issue descriptionChrome Version: 70.0.3538.110 (Official Build) (64-bit) OS: Linux URL (if applicable) where the memory bloat occurred: https://www.allmusic.com/album/cloaca-maxima-vol-3-mw0003005617 Can you reproduce this memory bloat? Yes. What steps will reproduce this memory bloat (or if it's not reproducible, what were you doing until then)? (1) Go to page. (2) Wait. For me, something in the order of an hour or a few hours. Renderer crashes after a while, out of memory. Example crash report id: a0a54e22fe70ab6c Two heap snapshots here (use Google corp account): https://drive.google.com/drive/folders/1tufBc5gbU7GfG6NlczFG6vDEUsrxM56c?usp=sharing The question is if the webpage is the problem or if it's a Chromium/Blink bug?
,
Dec 17
to mem sheriff for investigation
,
Dec 18
The crash in [1] is for a system OOM while generating a heap snapshot. This usually happens when taking a snapshot for a "larger" webpage. IIUC, this is a known issue where malloc is limited to 2GB for consecutive memory regions and this limit is sometimes hit during taking a heap snapshot. This would probably require re-designing the data structures to work around that security limit. Not sure that's worth it. Re-assign to alph@, but I guess this is sadly WAI because of security limits. [1] https://crash.corp.google.com/browse?q=reportid=%27a0a54e22fe70ab6c%27
,
Dec 18
It crashes without taking a heap snapshot. I probably put the wrong report ID there. I'll repro now and update with a proper report ID.
,
Dec 18
There were two crash reports generated: fe9f3803af300a9f 1623d4556f95d847
,
Dec 18
Sending back to mem sheriff as per comments 4&5.
,
Dec 19
Setting the component back for visibility.
,
Dec 19
Crashed on Chrome 72.0.3626.14. Did not crash on 60.2.0esr (64-bit).
,
Dec 19
I debugged this together with Ulan on 72.0.3626.14. We can see a steady increase of live memory that's accumulated via a memory leak on the webpage itself. Some code seems to add properties of the form "closure_lm_<number>" to the global window object. Each of these closures retains a native context in v8 which can easily be on the order of MB. The way to debug this: 1. Open DevTools 2. Take heap snapshot 3. Search for "Detached": This will highlight DOM elements that are not attached to the renderer tree. 4. Check the retaining path of "Detached Window" or "Detached HTMLDocument". 5. These retaining paths go through a property on the global window object. One can verify this by just typing "window." into the console. The window object will have all those properties that retain native contexts (windows and documents). At this point it is a memory leak on the webpage for us. Other browsers may (or may not) kill any detached documents at some point which would violate the spec though.
,
Dec 19
Thanks for looking into this! |
|||||||
►
Sign in to add a comment |
|||||||
Comment 1 by grunell@chromium.org
, Nov 29