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

Issue 640578 link

Starred by 5 users

Issue metadata

Status: Duplicate
Merged: issue 120186
Owner:
Closed: Nov 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows
Pri: 1
Type: Bug



Sign in to add a comment

empty requestAnimationFrame() callback leaks memory

Reported by chkspea...@gmail.com, Aug 24 2016

Issue description

UserAgent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36

What steps will reproduce the problem?
(1)Load index.html
(2)Wait and see the memory usage in the task manager

What is the expected result?
Memory used by Chrome remains relatively stable

What happens instead?
After 14 hours the memory usages are above than 200Mb. 

 
index.html
450 bytes View Download
 Issue 640860  has been merged into this issue.
Components: Blink>JavaScript
Components: -Blink>JavaScript Blink>DOM
Labels: Needs-TestConfirmation
Cc: tkonch...@chromium.org
Labels: OS-Windows
Status: Untriaged (was: Unconfirmed)
ABle to reproduce the issue on win10 chrome version 52.0.2743.116 - memory keeps on increasing

Waited for 4 hors and memory increased to 81MB approx

Confirming the issue. This is working fine on firefox

Will work and update the regression details soon
640578.png
124 KB View Download
Labels: -Needs-TestConfirmation -Pri-3 M-55 Pri-2
Observed that the memory is increasing from M30 builds to latest canary. Hence can be considered a non regression issue.

Comment 8 by tkent@chromium.org, Sep 26 2016

Components: -Blink>DOM Blink>Scheduling Blink>Animation
I observed memory usage increase even with the following code:

<script>
function update() {
    requestAnimationFrame(update);
}
requestAnimationFrame(update);
</script>

Also, confirmed that node count was correctly decreased by GC.

Components: -Blink>Scheduling
Labels: Performance-Memory OS-Linux
Status: Available (was: Untriaged)
Summary: empty requestAnimationFrame() callback leaks memory (was: innerHTML property has been used to increase or remove the document node can cause a memory leak )
Running Linux Chrome stable 53.
Observed that the size of a V8 heap snapshot didn't change from 3.3MB as the tab process memory usage increased by 1MB.

Comment 10 by suzyh@chromium.org, Sep 26 2016

Labels: Update-Fortnightly
Owner: alancutter@chromium.org
Cc: haraken@chromium.org
Labels: Stability-Memory
What's the update here? A memory leak like this is pretty serious.
Tested using Linux Chrome 56 with the original test case and --enable-heap-profiling.
Recorded a trace over the course of 5 minutes taking a memory trace before and after (but not during as it adds too much overhead).

The test was in the renderer with pid 12785.

Memory increased by ~4MB which was consistent with what I saw in Chrome's task manager.
Between the before and after traces:
 - blink_gc free_size increased by 1.4MB, mostly in HashTable and NormalPage4.
 - malloc's size increased by ~3MB, 1MB to <unspecified> and 2MB to memory metadata_fragmentation_caches.
trace_raf_before.json.gz
662 KB Download
trace_raf_after.json.gz
963 KB Download
Components: -Blink>Animation Blink>MemoryAllocator
I'm not sure how to interpret these numbers or whether I'm looking into the most useful data.

Could someone with experience in memory usage investigation share what they think of this?
Status: Assigned (was: Available)
Cc: alancutter@chromium.org
Labels: -Pri-2 Pri-1
Owner: hajimehoshi@chromium.org
hajimehoshi@: Would you take a look at this?

Bumping up the priority to P1.

Mergedinto: 120186
Status: Duplicate (was: Assigned)

Sign in to add a comment