iframe memory leaks
Reported by
a...@teamstats.net,
Dec 21 2017
|
||||||||||
Issue descriptionUserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.84 Safari/537.36 Steps to reproduce the problem: 1. Go to https://www.teamstats.net/leak-test.html 2. Observe page showing 4 iframes that load another document that only contains a static image. 3. Observe iframe src being cleared and then same document reloaded every 4 seconds. 4. Observe memory usage continually grow in Task Manager What is the expected behavior? Memory should be released and Garbage Collected What went wrong? Memory usage increases indefnitely, eventually crashing browser tab. Did this work before? No Chrome version: 63.0.3239.84 Channel: n/a OS Version: OS X 10.12.6 Flash Version: Shockwave Flash 28.0 r0 This is a simplified demo, I used 4 instances of the iframe to speed up the demonstration of the increase in memory usage. Issue 609137 describes the same problem but the author claimed it had been fixed, unfortunately it hasn't.
,
Dec 21 2017
It seems upon further testing that the memory usage for the url provided seems to top out between 550-580MB and stays in that range. For a more real world usage that doesn't stop at 550MB please see https://www.teamstats.net/ad-leak-test.html which loads adverts in and refreshes at timed intervals.
,
Dec 21 2017
We see this happening as well and considering google's extensive use of iframes in their ad serving products (think DFP, Adsense, etc) I would hope this becomes a high priority for them.
,
Dec 21 2017
,
Dec 25 2017
,
Dec 28 2017
Unable to reproduce the issue on reported chrome version 63.0.3239.84 and on the latest canary 65.0.3305.0 using Windows 10 with the below mentioned steps. 1) Launched Chrome reported version 2) Navigated to URL: https://www.teamstats.net/leak-test.html 3) Page loads with four iframes which reloads every 4 seconds 4) Opened task manager and observed meory usage 5) Memory increases and one point it remains constant and page didn't got crashed @Reporter: Please have a look at the attached screen cast and let us know whether we have missed any steps in reproduicng the issue, try to test this issue by creating new person which don't have any apps or extensions in it and let us know if the issue still persists. Thanks!
,
Dec 28 2017
,
Dec 29 2017
The issue had nothing to do with crashes but rather with memory leakage. The Screencast does not do anything to test or measure garbage collection. Suggest you escalate this to a dev who has experience diagnosing memory leaks.
,
Dec 29 2017
As the previous poster rightly says, the crashes I have experienced are as a result of memory leaks which are the issue here. I did note in the comments following my initial report that the memory usage stopped in the original test, but when loading more intensive content it did not. Regardless of a crash occurring, it is clear that memory is being allocated and not reclaimed when it should be. Your screencast does not actually show the memory usage stabilise, but it does show the amount of memory continue to grow.
,
Dec 29 2017
Thank you for providing more feedback. Adding requester "sc00335628@techmahindra.com" to the cc list and removing "Needs-Feedback" label. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Jan 8 2018
I'm able to recreate this issue. We are having a very similar problem with iframes leaking memory. Using the test given memory usage for the tabs process went over 1GB within 10 minutes. Forcing garbage collector to run using dev tools brings the private memory down to ~200MB and the total memory for the tab to ~250MB. I believe the unique image src tags are causing the images to be cached and are never cleared. Adding the sandbox attribute to the iframes causes javascript to no longer run on the sub-frames which fixes the issue. If you add sandbox="allow-scripts" the issue returns. I did not allow cross origin - so we know no DOM nodes are being referenced cross-frame. What's very interesting and what I believe shows this is a chrome issue is all memory snapshots and recordings show the same number of documents, JS memory, DOM Nodes, and DOM Listeners before and after the memory leak (See attached images). Google Chrome 63.0.3239.132 (Official Build) (64-bit) (cohort: 63_win_132) Revision 2e6edcfee630baa3775f37cb11796b1603a64360-refs/branch-heads/3239@{#709} OS Windows JavaScript V8 6.3.292.49 Flash 28.0.0.126 User Agent Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36
,
Jan 8 2018
,
Jan 11 2018
As per comment#8 and #9, could someone from Blink>MemoryAllocator team take a look into this issue. Thanks!
,
Jan 11 2018
,
Apr 20 2018
I'm experiencing a similar issue with iframes. The script tags loaded inside the iframes are not being released from the memory. we use iframes to display ads in our product. Any solution to this problem? I'm using the latest build Version 65.0.3325.181 (Official Build) (64-bit)
,
Apr 26 2018
Running into this issue as well when rendering ads in iframes in a SPA. Crashes around 7 minutes into the session. I have a heap snapshot of a failed session if that's useful, but it's 1.4gb so i'll upload it if it's useful to a dev. Chrome Version 65.0.3325.181 (Official Build) (64-bit)
,
Apr 26 2018
I don't think this is a bug in the allocator, rather it's a memory leak in Blink, related to iframes/images. Tentatively, I am a little suspicious about an ongoing experiment keeping resources alive in-memory for subsequent navigations (SavePreviousDocumentResources). +kinuko could this be related? I'm not sure if this experiment was enabled in M65 (per c#15).
,
Apr 27 2018
,
May 24 2018
yuzus: Would you help us triage here, or would you mind taking a look?
,
May 24 2018
|
||||||||||
►
Sign in to add a comment |
||||||||||
Comment 1 by a...@teamstats.net
, Dec 21 2017