Issue metadata
Sign in to add a comment
|
Memory leak in Chrome when using WebSockets
Reported by
mileston...@gmail.com,
Jul 6 2016
|
||||||||||||||||||||||||
Issue descriptionUserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.106 Safari/537.36 Example URL: Steps to reproduce the problem: 1. Download and install nodejs (https://nodejs.org/en/) 2. Download and unzip the attached prototype 3. Open shell and navigate to the folder extracted in point 2 4. Start the server by typing: node server.js 5. Open Chrome and navigate to http://localhost:8888 6. Let it run for several hours and monitor the memory (Task manager on Windows). What is the expected behavior? Memory usage should be stable. What went wrong? Memory usage increase continuously. Did this work before? N/A Is it a problem with Flash or HTML5? HTML5 Does this work in other browsers? N/A Chrome version: 51.0.2704.106 Channel: stable OS Version: 10.0 Flash Version: Shockwave Flash 22.0 r0 Time lapsed video can be seen here: https://youtu.be/8Lwsb0dp8-U Almost the same behavior can observed with Firefox with one exception - it needs to have Content Security Policy for WebSockets enabled. (Link to Firefox bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1280916). In Chrome the leak can be seen without CSP enabled.
,
Jul 25 2016
Is this really a WebSocket issue? The WebSocket connection only downloads binary data, and operations on blob / image / canvas look more suspicious.
,
Jul 25 2016
This may be a dupe of 587093 related to changing large images consuming ever increasing memory.
,
Aug 4 2016
When I tried the repro replacing websockets with fetch() (ping-ponging between local URLs), but still grabbing bytes, still creating new blobs, still creating object URLs, and still using them to draw into the canvas, I did not observe an obvious leak, but I also did not let it run for several hours. Perhaps the reporter can try and eliminate some of the complexity in the repro?
,
Aug 5 2016
I did my best to simplify the prototype (the main browser logic is 33 lines of code (main.js) and the main function 24 lines). I don't know what means "replacing websockets with fetch()" but can someone let the prototype run for several hours and confirm/reject that there is a memory leak with arguments?
,
Aug 5 2016
I believe this is a dup of 570268. There are multiple issues there, the primary one being that image resources aren't counted in the v8 memory metrics so it doesn't know to GC. Please follow that bug, and we'll see if this test case continues to repro after that is fixed.
,
Jun 15 2018
,
Jun 15 2018
|
|||||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||||
Comment 1 by yini...@chromium.org
, Jul 12 2016