New issue
Advanced search Search tips

Issue 733765 link

Starred by 2 users

Issue metadata

Status: WontFix
Owner:
Closed: Aug 3
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 1
Type: Bug



Sign in to add a comment

Potential memory leak with WebMStreamParser

Project Member Reported by etienneb@chromium.org, Jun 15 2017

Issue description

I'm using the chromium ToT version, keeping tabs open for multiple days.
A tab was opened on Youtube listening to Jazz music.

I'm periodically taken memory dumps using memory-infra.
By using a diffing tools, we can determine remaining allocated between two
memory dumps with points to potential memory leak.

It seems to me there is a memory leak with the stream parser.
See attached stackframes.
 
bug1.png
38.3 KB View Download
bug2.png
44.6 KB View Download
bug3.png
41.7 KB View Download
potential leaked objects:
  192196 + 192196 + 71986 + ...  => >500K
The process moved from 138M to 322M in two days.
Cc: jsb...@chromium.org
Components: Blink>Media>Audio
Labels: -Pri-3 Performance-Memory M-61 Pri-1

Comment 4 by jsb...@chromium.org, Jun 15 2017

Cc: -jsb...@chromium.org chcunningham@chromium.org wolenetz@chromium.org
Components: Internals>Media>Audio
Doesn't look webaudio-ish. Chromium side looks like media/formats or media/filters, Blink side looks like modules/mediasource

chcunningham@chromium.org or wolenetz@chromium.org - can you help direct this to the right place?


If someone needs some help on this one,... I'm still listening to music.
I can also attach a debugger if needed.
StreamParserBuffers are what are being allocated and managed in those ranges. We expect they can potentially grow in footprint over time (with some limits). Can you take some memory heap snapshot(s) and/or profile (https://developers.google.com/web/tools/chrome-devtools/memory-problems/heap-snapshots) to help us identify what's taking so much space over time (at least, in the renderer/tab process)?
Components: Internals>Media>FFmpeg Internals>Media>Source
Labels: Needs-Feedback
JS HeapDump can be found here:
  https://drive.google.com/open?id=0B2eVPm4kQyHoTWNpQmRMZmZwemc
Total Resident Memory : 377M
Looking at one of the memory dumps shared privately, I'm not certain this is unexpected. In the MediaSource demuxer (which holds onto parsed compressed media buffers for play-out into the decoder), we allow up to 150MB per video track, and 12MB per audio track, of compressed media to be buffered by the web app. The web app itself can have copies of some/all/more than this (and can have more than 1 track of each type over time), and the media pipeline continually has a bunch of frames allocated for decode outputs (though in cases, they may not be in the same process as the renderer).

In one case, I'm seeing about 140MB from "malloc" in the dump from one process (with thread id 76136 like those in the OP, above) associated with a youtube playback (total resident 270.7MB). This fits under the 150MB video track buffer limit.

tl;dr: I'm not sure there's a leak in media pipeline here.

Components: -Blink>Media>Audio

Comment 12 Deleted

The renderer went OOM after waiting a few days.
Owner: etienneb@chromium.org
Status: Assigned (was: Untriaged)
etienne: We need to follow up further. Could the OOM have happened because of profiling overhead?

e.g. If we run w/o native heap profiling, how does memory usage on this tab change over the course of several days?
OOM happened when I launched a memory dump.
Which probably means the process was in a critical memory pressure and the tracing overhead just killed it.

I'm running a new instances, which may take a few days, to repro again.
This is coming up again in a trace.
I'm adding more metrics in case it can help.
webparser.png
8.2 KB View Download
webparser1.png
40.1 KB View Download
webparser2.png
36.6 KB View Download
webpaser3.png
38.5 KB View Download
The same thing happened this week-end with my browser (canary).
I'll start to think that Chrome doesn't like Jazz :(

See attachments.

Unfortunately, I was not able to grab a trace. When the renderer is too bloated, it's quite common that tracing + memory infra failed, and crash the process.
youtube1.png
25.9 KB View Download
youtube.png
30.4 KB View Download
Components: -Internals>Media>FFmpeg
Status: WontFix (was: Assigned)
Don't think this is a leak. Closing as WontFix since MSE may accrue up to 180mb of these buffers before automatic GC kicks in.

Sign in to add a comment