Closed Bug 1282585 Opened 3 years ago Closed 3 years ago

CDM crash in mozilla::MediaDecoder::SetCDMProxy

Categories

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

Unspecified
Windows 7
defect
Not set
critical

Tracking

()

RESOLVED FIXED
mozilla50
Tracking Status
firefox47 --- wontfix
firefox48 + fixed
firefox49 --- fixed
firefox50 --- unaffected

People

(Reporter: cpeterson, Assigned: cpearce)

Details

(Keywords: crash)

Crash Data

Attachments

(2 files)

@ cpearce: this looks like a new crash signature that started climbing last week and affects mostly Firefox 47 and a few 48 clients. Unexpectedly, about 90% of the crash reports have hulu.com URLs.


This bug was filed from the Socorro interface and is 
report bp-4fef9d31-fa00-44c0-be16-69dc62160622.
=============================================================

 0 	xul.dll 	mozilla::MediaDecoder::SetCDMProxy(mozilla::CDMProxy*) 	dom/media/MediaDecoder.cpp:1633
1 	xul.dll 	mozilla::dom::HTMLMediaElement::FinishDecoderSetup(mozilla::MediaDecoder*, mozilla::MediaResource*, nsIStreamListener**) 	dom/html/HTMLMediaElement.cpp:2912
2 	xul.dll 	mozilla::dom::HTMLMediaElement::LoadResource() 	dom/html/HTMLMediaElement.cpp:1293
3 	xul.dll 	mozilla::dom::HTMLMediaElement::SelectResource() 	dom/html/HTMLMediaElement.cpp:956
4 	xul.dll 	mozilla::dom::HTMLMediaElement::SelectResourceWrapper() 	dom/html/HTMLMediaElement.cpp:904
5 	xul.dll 	nsRunnableMethodImpl<void ( nsIDocument::*)(void), 1>::Run() 	xpcom/glue/nsThreadUtils.h:870
6 	xul.dll 	mozilla::dom::nsSyncSection::Run() 	dom/html/HTMLMediaElement.cpp:820
7 	xul.dll 	mozilla::CycleCollectedJSRuntime::ProcessStableStateQueue() 	xpcom/base/CycleCollectedJSRuntime.cpp:1294
8 	xul.dll 	XPCJSRuntime::AfterProcessTask(unsigned int) 	js/xpconnect/src/XPCJSRuntime.cpp:3743
9 	xul.dll 	nsThread::ProcessNextEvent(bool, bool*) 	xpcom/threads/nsThread.cpp:1009
10 	xul.dll 	mozilla::ipc::MessagePump::Run(base::MessagePump::Delegate*) 	ipc/glue/MessagePump.cpp:95
11 	xul.dll 	MessageLoop::RunHandler() 	ipc/chromium/src/base/message_loop.cc:227
12 	xul.dll 	MessageLoop::Run() 	ipc/chromium/src/base/message_loop.cc:201
13 	xul.dll 	nsBaseAppShell::Run() 	widget/nsBaseAppShell.cpp:156
14 	xul.dll 	nsAppShell::Run() 	widget/windows/nsAppShell.cpp:262
15 	xul.dll 	nsAppStartup::Run() 	toolkit/components/startup/nsAppStartup.cpp:281
16 	xul.dll 	XREMain::XRE_mainRun() 	toolkit/xre/nsAppRunner.cpp:4337
17 	xul.dll 	XREMain::XRE_main(int, char** const, nsXREAppData const*) 	toolkit/xre/nsAppRunner.cpp:4434
18 	xul.dll 	XRE_main 	toolkit/xre/nsAppRunner.cpp:4540
19 	firefox.exe 	do_main 	browser/app/nsBrowserApp.cpp:220
20 	firefox.exe 	NS_internal_main(int, char**, char**) 	browser/app/nsBrowserApp.cpp:360
21 	firefox.exe 	wmain 	toolkit/xre/nsWindowsWMain.cpp:135
22 	firefox.exe 	__tmainCRTStartup 	f:/dd/vctools/crt/crtw32/startup/crt0.c:255
23 	kernel32.dll 	BaseThreadInitThunk 	
24 	ntdll.dll 	RtlUserThreadStart
Flags: needinfo?(cpearce)
Looks like here the CDM has crashed shortly after startup, before we've finished associating the corresponding MediaKeys with the HTMLMediaElement. We probably can get away with some null checks in here.
Nightly and Aurora are immune to this crash, because I removed the offending line of code in bug 1271242. Beta is still affected.
Attached file Testcase
Testcase.
Assignee: nobody → cpearce
Flags: needinfo?(cpearce)
Comment on attachment 8766176 [details]
Bug 1282585 - Ensure content process doesn't crash if CDM crashes before MediaKeys attaches to media element or media element loads.

https://reviewboard.mozilla.org/r/61182/#review58060
Attachment #8766176 - Flags: review?(jwwang) → review+
Pushed by cpearce@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/e2525c03c65f
Ensure content process doesn't crash if CDM crashes before MediaKeys attaches to media element or media element loads. r=jwwang
https://hg.mozilla.org/mozilla-central/rev/e2525c03c65f
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla50
[Tracking Requested - why for this release]:

This is a CDM process crash that has been climbing in Beta 48 and Release 47 now that Amazon is using Widevine. cpearce says (in comment 2) Nightly 50 and Aurora 49 are immune to this crash, so we should uplift this fix to Beta 48.
Track this as this crash affects 47/48.
Hi Chris, do you want to uplift this for 48 if this patch is not too risky.
Flags: needinfo?(cpearce)
Comment on attachment 8766176 [details]
Bug 1282585 - Ensure content process doesn't crash if CDM crashes before MediaKeys attaches to media element or media element loads.

Approval Request Comment
[Feature/regressing bug #]: EME
[User impact if declined]: Under some conditions when using EME, the content process can crash. I believe this happens if the CDM process crashes before EME has had a chance to startup properly; so it should be rare.
[Describe test coverage new/current, TreeHerder]: We have lots of EME mochitests.
[Risks and why]: Fairly low, just adding null checks.
[String/UUID change made/needed]: None.
Flags: needinfo?(cpearce)
Attachment #8766176 - Flags: approval-mozilla-beta?
Attachment #8766176 - Flags: approval-mozilla-aurora?
Comment on attachment 8766176 [details]
Bug 1282585 - Ensure content process doesn't crash if CDM crashes before MediaKeys attaches to media element or media element loads.

This patch fixes CDM crash. Take it in 48 beta 6 and aurora.
Attachment #8766176 - Flags: approval-mozilla-beta?
Attachment #8766176 - Flags: approval-mozilla-beta+
Attachment #8766176 - Flags: approval-mozilla-aurora?
Attachment #8766176 - Flags: approval-mozilla-aurora+
You need to log in before you can comment on or make changes to this bug.