Closed Bug 1142527 Opened 9 years ago Closed 9 years ago

Intermittent test_dormant_playback.html | application crashed [@ mozilla::WMFVideoMFTManager::InitializeDXVA()] after "Assertion failure: !mDXVA2Manager, at WMFVideoMFTManager.cpp:143"

Categories

(Core :: Audio/Video, defect)

x86
Windows 8
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla39
Tracking Status
firefox37 --- unaffected
firefox38 --- fixed
firefox39 --- fixed
firefox-esr31 --- unaffected

People

(Reporter: cbook, Assigned: sotaro)

References

()

Details

(Keywords: assertion, crash, intermittent-failure)

Attachments

(2 files, 1 obsolete file)

Windows 8 64-bit mozilla-inbound debug test mochitest-3

https://treeherder.mozilla.org/logviewer.html#?job_id=7530070&repo=mozilla-inbound

06:09:37 INFO - Assertion failure: !mDXVA2Manager, at c:\builds\moz2_slave\m-in-w64-d-0000000000000000000\build\src\dom\media\fmp4\wmf\WMFVideoMFTManager.cpp:143
06:09:49 INFO - #01: mozilla::WMFMediaDataDecoder::AllocateMediaResources() [dom/media/fmp4/wmf/WMFMediaDataDecoder.cpp:163]
06:09:49 INFO - #02: mozilla::MP4Reader::RequestCodecResource() [dom/media/fmp4/MP4Reader.cpp:301]
06:09:49 INFO - #03: mozilla::MP4Reader::PreReadMetadata() [dom/media/fmp4/MP4Reader.cpp:375]
06:09:49 INFO - #04: mozilla::MediaDecoderStateMachine::DecodeMetadata() [dom/media/MediaDecoderStateMachine.cpp:2216]
06:09:49 INFO - #05: mozilla::MediaDecoderStateMachine::CallDecodeMetadata() [dom/media/MediaDecoderStateMachine.cpp:2196]
06:09:49 INFO - #06: nsRunnableMethodImpl<void ( mozilla::MediaDecoderStateMachine::*)(void),1>::Run() [xpcom/glue/nsThreadUtils.h:668]
06:09:49 INFO - #07: mozilla::MediaTaskQueue::Runner::Run() [dom/media/MediaTaskQueue.cpp:233]
06:09:49 INFO - #08: nsThreadPool::Run() [xpcom/threads/nsThreadPool.cpp:227]
06:09:49 INFO - #09: nsThread::ProcessNextEvent(bool,bool *) [xpcom/threads/nsThread.cpp:855]
06:09:49 INFO - #10: NS_ProcessNextEvent(nsIThread *,bool) [xpcom/glue/nsThreadUtils.cpp:265]
06:09:49 INFO - #11: mozilla::ipc::MessagePumpForNonMainThreads::Run(base::MessagePump::Delegate *) [ipc/glue/MessagePump.cpp:339]
06:09:49 INFO - #12: MessageLoop::RunHandler() [ipc/chromium/src/base/message_loop.cc:227]
06:09:49 INFO - #13: MessageLoop::Run() [ipc/chromium/src/base/message_loop.cc:201]
06:09:49 INFO - #14: nsThread::ThreadFunc(void *) [xpcom/threads/nsThread.cpp:358]
06:09:50 INFO - #15: PR_NativeRunThread [nsprpub/pr/src/threads/combined/pruthr.c:406]
06:09:50 INFO - #16: pr_root [nsprpub/pr/src/md/windows/w95thred.c:91]
06:09:50 INFO - #17: MSVCR120 + 0x24f7f 

06:09:57 WARNING - PROCESS-CRASH | dom/media/test/test_dormant_playback.html | application crashed [@ mozilla::WMFVideoMFTManager::InitializeDXVA()]
06:09:57 INFO - Crash dump filename: c:\users\cltbld~1.t-w\appdata\local\temp\tmpmf0ygw.mozrunner\minidumps\ec8b999d-21c9-4494-81c0-a94a63b3d132.dmp
06:09:57 INFO - Operating system: Windows NT
06:09:57 INFO - 6.2.9200
06:09:57 INFO - CPU: amd64
06:09:57 INFO - family 6 model 30 stepping 5
06:09:57 INFO - 8 CPUs
06:09:57 INFO - Crash reason: EXCEPTION_BREAKPOINT
06:09:57 INFO - Crash address: 0x7f994ec2540
06:09:57 INFO - Thread 74 (crashed)
06:09:57 INFO - 0 xul.dll!mozilla::WMFVideoMFTManager::InitializeDXVA() [WMFVideoMFTManager.cpp:95104fe1b071 : 143 + 0x5a]
06:09:57 INFO - rbx = 0x000000000000008f r12 = 0x0000000000000000
06:09:57 INFO - r13 = 0x0000000000000001 r14 = 0x000000ba9997f130
06:09:57 INFO - r15 = 0x000000ba88086b40 rip = 0x000007f994ec2540
06:09:57 INFO - rsp = 0x000000ba9997efa0 rbp = 0x000000ba9997f089
06:09:57 INFO - Found by: given as instruction pointer in context
06:09:57 INFO - 1 xul.dll!mozilla::WMFVideoMFTManager::Init() [WMFVideoMFTManager.cpp:95104fe1b071 : 172 + 0x4]
06:09:57 INFO - rbx = 0x000000000000008f r12 = 0x0000000000000000
06:09:57 INFO - r13 = 0x0000000000000001 r14 = 0x000000ba9997f130
06:09:57 INFO - r15 = 0x000000ba88086b40 rip = 0x000007f994ec2051
06:09:57 INFO - rsp = 0x000000ba9997efe0 rbp = 0x000000ba9997f089
06:09:57 INFO - Found by: call frame info
06:09:57 INFO - 2 xul.dll!mozilla::WMFMediaDataDecoder::AllocateMediaResources() [WMFMediaDataDecoder.cpp:95104fe1b071 : 163 + 0x37]
06:09:57 INFO - rbx = 0x000000000000008f r12 = 0x0000000000000000
06:09:57 INFO - r13 = 0x0000000000000001 r14 = 0x000000ba9997f130
06:09:57 INFO - r15 = 0x000000ba88086b40 rip = 0x000007f994ec0622
06:09:57 INFO - rsp = 0x000000ba9997f0f0 rbp = 0x000000ba9997f089
06:09:57 INFO - Found by: call frame info
06:09:57 INFO - 3 xul.dll!mozilla::MP4Reader::RequestCodecResource() [MP4Reader.cpp:95104fe1b071 : 299 + 0xc]
06:09:57 INFO - rbx = 0x000000000000008f r12 = 0x0000000000000000
06:09:57 INFO - r13 = 0x0000000000000001 r14 = 0x000000ba9997f130
06:09:57 INFO - r15 = 0x000000ba88086b40 rip = 0x000007f994eb54f4
06:09:57 INFO - rsp = 0x000000ba9997f130 rbp = 0x000000ba9997f089
06:09:57 INFO - Found by: call frame info
06:09:57 INFO - 4 xul.dll!mozilla::MP4Reader::PreReadMetadata() [MP4Reader.cpp:95104fe1b071 : 373 + 0x4]
06:09:57 INFO - rbx = 0x000000000000008f r12 = 0x0000000000000000
06:09:57 INFO - r13 = 0x0000000000000001 r14 = 0x000000ba9997f130
06:09:57 INFO - r15 = 0x000000ba88086b40 rip = 0x000007f994eb4287
06:09:57 INFO - rsp = 0x000000ba9997f170 rbp = 0x000000ba9997f089
Flags: needinfo?(matt.woodrow)
Summary: Intermittent test_dormant_playback.html | application crashed [@ mozilla::WMFVideoMFTManager::InitializeDXVA()] | Assertion failure: !mDXVA2Manager, at c:\builds\moz2_slave\m-in-w64-d-0000000000000000000\build\src\dom\media\fmp4\wmf\WMFVideoMFTManager.cpp → Intermittent test_dormant_playback.html | application crashed [@ mozilla::WMFVideoMFTManager::InitializeDXVA()] after "Assertion failure: !mDXVA2Manager, at WMFVideoMFTManager.cpp:143"
I don't think bug 1131638 caused this, it should only have had any effect when the SharedDecoderManager is in use (MSE-only), which isn't the case for this test.

Bug 1128381 changed a bunch of dormant code, but I can't see anything in that either. Any thoughts jya?
Flags: needinfo?(matt.woodrow) → needinfo?(jyavenard)
bug 1128381 only enabled the use of the SharedDecoderManager on mac and for decoders using the AVCC wrapper.

Windows doesn't use the AVCC wrapper.

And how     mVideo.mDecoder->AllocateMediaResources(); was always called for windows didn't change. It was always called before
Flags: needinfo?(jyavenard)
Depends on: 1141816
Blocks: 1123535
No longer depends on: 1141816
Sorry, please ignore comment 9.
No longer blocks: 1123535, 1128357
I am going to investigate the problem.
Assignee: nobody → sotaro.ikeda.g
In current implementation, the following function call could be unbalanced if enter/exit happen very often.
- AllocateMediaResources()
- ReleaseMediaResources()

But WMFVideoMFTManager does not expect it. Until recently, on tryserver, such unbalanced call seems to increased by some reasons. It might be happen because of task balance change by other bugs.

One simper fix might be to make the following function calls balanced. 
- AllocateMediaResources()
- ReleaseMediaResources()
Attachment #8577518 - Flags: review?(cpearce)
Attachment #8577518 - Flags: review?(cpearce) → review+
Keywords: leave-open
The assertion failure seems to be addressed by the commit.
Blocks: 1050031
Blocks: 1128357
No longer blocks: 1131638
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
cpearce, do we need to uplift the fix to firefox38?
Flags: needinfo?(cpearce)
(In reply to Sotaro Ikeda [:sotaro] from comment #133)
> cpearce, do we need to uplift the fix to firefox38?

Bug 1128357 is also in firefox38.
Keywords: leave-open
Target Milestone: --- → mozilla39
Comment on attachment 8577518 [details] [diff] [review]
patch - Always call ReleaseMediaResources() when entering dormant

Approval Request Comment
[Feature/regressing bug #]: Making video decoders "dormant" when they're not visible
[User impact if declined]: Potentially we can get crashes, and crashes during mochitests.
[Describe test coverage new/current, TreeHerder]: We have lots of media mochitest.
[Risks and why]: Should be low risk, this fixed a pretty frequent crash in mochitests.
[String/UUID change made/needed]: None.
Attachment #8577518 - Flags: approval-mozilla-aurora?
Attachment #8577518 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Flags: needinfo?(cpearce)
The code on Aurora is different enough that I'm not comfortable rebasing this myself.
Flags: needinfo?(sotaro.ikeda.g)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: