Unreferenced media elements with MediaSources can leak due to NETWORK_LOADING

VERIFIED FIXED in Firefox 36

Status

()

P1
normal
VERIFIED FIXED
4 years ago
4 years ago

People

(Reporter: karlt, Assigned: karlt)

Tracking

(Blocks: 1 bug)

Trunk
mozilla37
x86_64
Linux
Points:
---
Dependency tree / graph
Bug Flags:
in-testsuite -
qe-verify +

Firefox Tracking Flags

(firefox36 verified, firefox37 verified)

Details

Attachments

(3 attachments)

(Assignee)

Description

4 years ago
Media elements keep a self reference when networkState is NETWORK_LOADING.
Usually a load request would eventually time out, networkState would change, and the self reference would be removed, but this will not happen when the source is a MediaSource.
(Assignee)

Updated

4 years ago
Depends on: 1114888
(Assignee)

Comment 1

4 years ago
Created attachment 8542394 [details]
webm/vorbis audio file for testcase
(Assignee)

Comment 2

4 years ago
Created attachment 8542397 [details]
testcase (with explicit URL revocation)

1. Set media.mediasource.enabled and media.mediasource.webm.enabled prefs to
   true, if not already.

2. Load testcase.

3. Observe memory use growing (in top or similar).

4. Load about:memory in another tab.

5. Click "Minimize Memory Use".

Expected: Memory usage reduces somewhat, before growing again.

Actual: Memory use continues to rise.
(Assignee)

Updated

4 years ago
Blocks: 1116382
(Assignee)

Updated

4 years ago
Depends on: 1116384
(Assignee)

Comment 3

4 years ago
Created attachment 8542415 [details] [diff] [review]
allow media elements to be GC'd when their MediaSource is unreferenced r?
Attachment #8542415 - Flags: review?(roc)
(Assignee)

Updated

4 years ago
Depends on: 1116676
Priority: -- → P1
https://hg.mozilla.org/mozilla-central/rev/7f1bd578a2a6
Status: ASSIGNED → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla37
Comment on attachment 8542415 [details] [diff] [review]
allow media elements to be GC'd when their MediaSource is unreferenced r?

Approval Request Comment
[Feature/regressing bug #]: MSE
[User impact if declined]: Less consistent testing, YouTube videos consume more resources.
[Describe test coverage new/current, TBPL]: Landed on m-c.
[Risks and why]: Low. This is a small change and should only affect MSE playback.
[String/UUID change made/needed]: None.
Attachment #8542415 - Flags: approval-mozilla-beta?
status-firefox36: --- → affected
status-firefox37: --- → fixed
Attachment #8542415 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Flags: qe-verify+
Verified using STR from comment 2 and the attached testcases and got the expected results using:
1. Firefox 36 beta 2, build ID: 20150120155007
2. Latest Aurora, build ID: 20150121004011

Tested on Ubuntu 12.04 64-bit.
Status: RESOLVED → VERIFIED
status-firefox36: fixed → verified
status-firefox37: fixed → verified
You need to log in before you can comment on or make changes to this bug.