New issue
Advanced search Search tips

Issue 870352 link

Starred by 5 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug



Sign in to add a comment

Memory for injected Code is never released

Reported by michael....@uni-due.de, Aug 2

Issue description

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

Steps to reproduce the problem:
1. Use the WebDriver to inject JS Code (I'm using Nigthwatch.JS/Selenium)
2. Click Elements or test visibility

What is the expected behavior?
Remote control should not have an significant or permanent impact on the used memory.

What went wrong?
Each action (like a click) in Nightwatch.JS permanently occupies memory in Chrome. The strings are hold due to "source" reference of compiled code.
I'm trying to test a large application with memory leaks for a few days. Unfortunately, the injected strings block several 100MB after some time.
The images shows the situation after a few seconds running time.

Did this work before? N/A 

Chrome version: 68.0.3440.84  Channel: stable
OS Version: 6.1 (Windows 7, Windows Server 2008 R2)
Flash Version: 

I tried to comprehend this problem by creating a minimal example:
1. Open blank webpage
2. Write in console: console.log("Hallo")
3. Try to free that memory:
  - clear Console
  - clear console history
  - remove all snapshots
  - close and reopen devTools
  - trigger GC
  - occupy more and more memory (until the 4GB tab limit, because I heard the "compile code cache" is reduced if too much memory is in use)

I'm not able to free the memory, which was allocated due to the console input.
 
chrome_nightwatchMemory.PNG
394 KB View Download
Components: -Blink Tests>WebDriver
Cc: pfeldman@chromium.org
Components: -Tests>WebDriver Platform>DevTools
ChromeDriver only passes the JS code to Chrome, and has no control over how it is stored in memory.

Pavel: Is this issue in DevTools, or deeper in the JavaScript implementation?
Labels: Needs-Triage-M68
Cc: vamshi.kommuri@chromium.org
Labels: Triaged-ET TE-NeedsTriageHelp
Thanks for filing the issue!

The issue seems to be out of scope for us triage it from our end i.e., using a WebDriver to inject JS Code and test the issue further, hence adding label "TE-NeedsTriageHelp" and requesting someone from respective team to have a look into it and help in further triaging it.
Owner: alph@chromium.org
Status: Assigned (was: Unconfirmed)
Components: -Platform>DevTools Platform>DevTools>JavaScript
Owner: kozy@chromium.org
Most likely my current work on removing redundant source copy on inspector side will help here as well, I will update this issue as soon as my CLs are landed.
Cc: kozy@chromium.org
 Issue 852746  has been merged into this issue.

Sign in to add a comment