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

Issue 640922 link

Starred by 1 user

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 3
Type: Bug



Sign in to add a comment

JavaScript memory leaks

Reported by quake314...@gmail.com, Aug 25 2016

Issue description

Chrome Version: 52.0.2734.116
OS: Windows 10 64-bit
<b>See <http://www.chromium.org/for-testers/providing-memory-details> to</b>
provide memory usage snapshots.

URL (if applicable) where the memory bloat occurred: ch.gswtech.com.pl

Can you reproduce this memory bloat?

Open the website and wait.

What steps will reproduce this memory bloat (or if it's not reproducible,
what were you doing until then)?
(1) Go to the above URL (test site)
(2) Wait a couple of hours
(3) The memory gradually rises

I need to display a website using an embedded chromium, which will be running at least 12 hours a day. During tests I noticed huge memory leaks. When left for the night chrome has been using up to (and over) 2GB of RAM, which eventually causes process to crash. There is only JavaScript running on the test page.

 
Cc: tkonch...@chromium.org
Components: Blink>JavaScript
Labels: -Pri-3 M-54 OS-Windows Pri-2 Type-Bug
Status: Untriaged (was: Unconfirmed)
Able to reproduce the issue on win10 chrome version 52.0.2734.116 and canary 54.0.2839.2 on navigating to ch.gswtech.com.pl waited for 1 hr and observed the memory increase as shown in the screenshot.


memory.png
145 KB View Download
Cc: haraken@chromium.org jarin@chromium.org
Status: Available (was: Untriaged)
After a first, quick look: It is not creating new dom elements on the fly without end. We should have a look at it.

No clue if it is V8 or Blink memory related though.
jQuery.now() Is creating lots of new Date()'s
That is the source of the leak.
It should use Date.now() instead.
Matthias said, "jQuery.now() Is creating lots of new Date()'s" ...

Is there a bug in the Date object?  No matter how rapidly it is called, such objects should be automatically garbage-collected, like any JavaScript object.

Indeed, it is very common for JavaScript code to frequently invoke ((new Date()).getTime()) to get an integer timestamp value, and I have never seen a leak caused by that code.

On the other hand, if the page's code is assigning the Date objects into an array or structure, and that array is constantly growing, then the page could begin to use a great deal of memory, but it is still not really a "leak", because the memory will be recovered when the browser navigates to another page (and the prior page's memory is freed).

Has anyone noticed what happens when the browser is then navigated to "about:blank"?  Is the memory freed?
Labels: Pri-3
This bug is available, yet hasn't been updated in >180 days. Dropping the priority.
Project Member

Comment 6 by sheriffbot@chromium.org, Aug 3

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Status: Available (was: Untriaged)

Sign in to add a comment