New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 794200 link

Starred by 2 users

Issue metadata

Status: Duplicate
Merged: issue 750256
Owner:
Last visit > 30 days ago
Closed: Dec 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug



Sign in to add a comment

memory leak when WASM is used in child frame

Reported by thomas.b...@2020spaces.com, Dec 12 2017

Issue description

UserAgent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.84 Safari/537.36

Steps to reproduce the problem:
1. Use wasm module in child frame
2. Restart child frame
3. Previous Wasm module memory & code not cleared by GC

What is the expected behavior?
GC should clear wasm code & memory when reloading child frame

What went wrong?
Memory snapshot show that memory increase for each reload instead of being cleared

Did this work before? N/A 

Chrome version: 63.0.3239.84  Channel: stable
OS Version: 6.1 (Windows 7, Windows Server 2008 R2)
Flash Version:
 
ChromeWasmMemoryLeak.PNG
141 KB View Download
memleak.zip
9.0 MB Download
Components: -Blink Blink>JavaScript
Cc: titzer@chromium.org bbudge@chromium.org bradnelson@chromium.org eholk@chromium.org
Owner: eholk@chromium.org
Status: Assigned (was: Unconfirmed)
Presumably this is from address space being consumed for each memory.
Eric, can you repro this?
Also, do we have an issue filed on changing navigation to clear all the live memory objects?

Comment 3 by titzer@chromium.org, Dec 13 2017

Hi, do you have a detailed repro for this issue so that we can verify that the application is not holding onto something that transitively holds onto the WASM instance (and therefore memory)?
Yes, I attached a small zipped web site with this issue.

Inside you will find 2 pages:
 -The main page: memleak.htm
 -and the iframe content: wasmiframe.htm

To reproduce:
 1_Open Chrome and start the developer tools, memory tab
 2_Open the memleak.htm page
 3_Take a heap snapshot
 4_Click on the "reload iframe" button, wait for the tank game to start
 5_loop on #3

As you can see in the attached screenshot, the heap is growing constantly and if you look at the heap you will see the previous ArrayBuffer & code not released.

Hope this helps,
Let me know if you need anything else.

Thanks.

-Thomas

Comment 5 by eholk@chromium.org, Dec 13 2017

Thanks for the repro. If you don't open dev tools, do you still see the memory leak? If you close and re-open dev tools, does the memory get reclaimed?
No, if I don't open the devtools at all, I don't see the memory leak (According to the Chrome task manager).

If I close and re-open the devtools, then the leak is still there. GC does not get rid of the unused objects.

Comment 7 by eholk@chromium.org, Dec 13 2017

Mergedinto: 750256
Status: Duplicate (was: Assigned)
This looks like  https://crbug.com/750256  to me.

Sign in to add a comment