Closed Bug 1248229 Opened 8 years ago Closed 8 years ago

"Assertion failure: !mStream->IsDestroyed() (Can't connect a destroyed stream.)" after cycle collection

Categories

(Core :: Audio/Video: Playback, defect, P1)

defect

Tracking

()

RESOLVED FIXED
mozilla47
Tracking Status
firefox47 --- fixed

People

(Reporter: jruderman, Assigned: jwwang)

Details

(Keywords: assertion, testcase)

Attachments

(4 files)

1. Fix the path in the testcase to be correct on your computer
2. Create a profile with:
     e10 disabled
     https://www.squarefree.com/extensions/domFuzzLite3.xpi installed
3. Run: firefox -profile <profiledir> w.html
4. Wait one second

Assertion failure: !mStream->IsDestroyed() (Can't connect a destroyed stream.), at dom/media/mediasink/OutputStreamManager.cpp:33

Security-sensitive out of caution. Some bugs that involve cycle collection are UAFs, and I don't know whether this one is.
Attached file stack
P1/10 for evaluation.  Note: appears to be MediaSink stuff

Probably something related to how the OutputStreamManager handles the mStreams list and Disconnect() perhaps being called on it.  Wonder if it repros under rr....
Rank: 10
Component: Audio/Video → Audio/Video: Playback
Priority: -- → P1
Assignee: nobody → jwwang
Part 1 - add test case to test if playback can work correctly after GC.
Attachment #8720721 - Flags: review?(roc)
Part 2 - GC might happen in between OutputStreamManager::Disconnect() and OutputStreamManager::Connect(). We need to check if the stream is already destroyed before trying to connect it.
Attachment #8720722 - Flags: review?(roc)
Could this result in a use-after-free, or just something safer like a null deref?
Thanks for the review!
(In reply to Andrew McCreight [:mccr8] from comment #6)
> Could this result in a use-after-free, or just something safer like a null
> deref?

The later. Here is the try run without the fix (only part 1 is applied):
https://treeherder.mozilla.org/logviewer.html#?job_id=16885404&repo=try
Group: media-core-security
https://hg.mozilla.org/mozilla-central/rev/85c911ca1bb8
https://hg.mozilla.org/mozilla-central/rev/e4345d1fa465
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla47
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: