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

Issue 819710 link

Starred by 2 users

Issue metadata

Status: WontFix
Owner:
Closed: Jul 20
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows , Mac
Pri: 1
Type: Bug



Sign in to add a comment

v8 fails to OOM-crash background tabs at 2GB memory usage

Project Member Reported by erikc...@chromium.org, Mar 7 2018

Issue description

Context: There's a recent large spike in crashes going into M64 stable. See
https://docs.google.com/document/d/19Ubr6GlTDUQzyujFhQhfuNr3bw14m_SGHLwlXeSBpi4/edit?ts=5a819383#

Around the time of this roll out, I noticed a large spike in renderer crashes on my personal machine. Coincidence? I started to investigate.

Repro steps:
1) Open a tab to http://poe.trade/search/hichusigakugon.
2) Wait. Watch memory usage go up.

Okay. In and of itself, not super exciting. Just another website that leaks memory. But I have two observations:

1) Open 10 tabs [9 in the background] and repeat this procedure. The foreground tab will OOM [great!] but all 9 background tabs will stay at 2GB private memory usage. That's really weird! This implies that for some reason, we're not properly OOMing background tabs that *should* be OOMing. This in turn greatly reduces available memory on the machine.

2) When trying to use Devtools to take heap snapshots to investigate this problem, the snapshot size doesn't match the actual private memory usage. Summing across the retained sizes does the right thing, but all the percentages are wrong.

(1) seems quite concerning from a performance perspective. (2) seems like it might be a devtools bug.

I've attached a screenshot that demonstrates both (1) and (2).
 
Screen Shot 2018-03-07 at 2.15.10 PM.png
474 KB View Download
Summary: v8 fails to OOM-crash background tabs at 2GB memory usage (was: Request for assistance debugging OOMs on poe.trade)
Attaching a memory-infra trace that shows a bunch of background tabs happily sitting away at just over 2GB v8 memory usage.
trace_trace_poe_trade.json.gz
1.6 MB Download

Comment 3 by alph@chromium.org, Mar 8 2018

regarding (2)
Is it 2GB private memory or 2GB of v8 heap memory?
If latter, are there worker threads? The heap snapshot is for a single isolate only (main by default). There's a combobox on the profilers panel to select worker isolates.
> Is it 2GB private memory or 2GB of v8 heap memory?

Both. But trying to take a heap snapshot of a 2GB heap just blows up the renderer. In the screenshot, I've taken a heap snapshot of a 600MB renderer.

I see, so the percentages are just not meaningful in this case? Sounds good. Thanks for the response.

Comment 5 by alph@chromium.org, Mar 8 2018

The snapshot is per isolate. The percentages are relative to isolate's used v8 heap size. I'm trying to repro to take a look...

Comment 6 by alph@chromium.org, Mar 8 2018

Unable to repro (2).
There are no workers on the page, just the main isolate. In my experiments the snapshot size always matched Task Manager's live JavaScript memory column. Tried for v8 heap sizes up to 500MB.
Hm. I was also not able to repro (2). I'll open a new bug if I can come up with a clean repro for that.
Cc: clemensh@chromium.org mstarzinger@chromium.org
Labels: -Pri-3 Pri-1
Owner: titzer@chromium.org
Status: Assigned (was: Untriaged)
titzer@ could Wasm-off-v8-heap the reasons here?
If this happens on M64, then wasm-jit-to-native cannot be the reason. It was only enabled in M65.
I tried opening to  this page and it does not appear to be still leaking memory.

Does this behavior still reproduce with another leaking webpage?
Status: WontFix (was: Assigned)
Just coming back to clean this out. Since it did not repro in c8 or c10, it may already be fixed. Please reopen or file another issue if it reoccurs.

Sign in to add a comment