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.
,
Aug 3
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?
,
Aug 6
,
Aug 8
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.
,
Aug 25
,
Aug 25
,
Aug 25
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.
,
Sep 25
|
||||||
►
Sign in to add a comment |
||||||
Comment 1 by tkent@chromium.org
, Aug 3