New issue
Advanced search Search tips

Issue 912153 link

Starred by 1 user

Issue metadata

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

Blocking:
issue 909723



Sign in to add a comment

DevTools leaks script objects

Project Member Reported by herhut@chromium.org, Dec 5

Issue description

While debugging an issue around OOM on page reload today, I discovered that opening devtools may impact the reason for running OOM.

When devtools is open (or opened), we create a WasmTranslation to be able to map WebAssembly byte code to a textual representation for presentation in dev tools. As disassembling bytecode is costly and doing so eagerly when opening devtools leads to long pauses, we aim to do it lazily. This, however, requires that the WasmTranslation holds on the the wirebytes for later decoding. That is implemented by holding a reference to the corresponding WasmModuleObject.

Debugtools seem to keep the translation alive long enough after a page reload, that the module remains while the new module is being compiled. Hence we need twice the address space than under normal page load conditions.
 
Cc: u...@chromium.org
Cc: alph@chromium.org
Components: -Blink>JavaScript>WebAssembly Platform>DevTools
Labels: -Pri-2 Pri-1
Owner: dgozman@chromium.org
Status: Assigned (was: Available)
Summary: DevTools leaks script objects (was: WasmTranslation may keep wasm module alive, triggering OOM on page reload)
This is another instance of https://bugs.chromium.org/p/v8/issues/detail?id=7527
I attached an example that shows that the scripts leak even if DevTools is initially closed.

The strong handles responsible for the leak can be found by searching for "kGlobalDebuggerScriptHandleLabel" in the Chromium source.
A fix would be to turn these handles to weak handles (if possible).

Dmitry, who would be the right owner for this? v8:7527 is assigned to kozyatinskiy@


devtools-script-leak.html
431 bytes View Download
Blocking: 909723

Sign in to add a comment