Open Bug 1559561 Opened 5 years ago Updated 2 years ago

av1.mp4 test fails on 32-bit Windows 7 with CoInitializeEx() E_OUTOFMEMORY

Categories

(Core :: Audio/Video: Playback, enhancement, P3)

x86
Windows
enhancement

Tracking

()

Tracking Status
firefox69 --- affected

People

(Reporter: cpeterson, Unassigned)

References

Details

AV1-in-MP4 support was disabled on Win32 in bug 1417050 and re-enabled in bug 1475564, but the check to disable the av1.mp4 test on Win32 wasn't removed at that time:

https://searchfox.org/mozilla-central/rev/1133b6716d9a8131c09754f3f29288484896b8b6/dom/media/test/manifest.js#325-328

Unfortunately, we can't re-enable the av1.mp4 test on Win32 because it still has problems.

In an opt build on 32-bit Windows 7, the test fails with NS_ERROR_DOM_MEDIA_FATAL_ERR:

07:48:45 INFO - TEST-UNEXPECTED-FAIL | dom/media/test/test_playback.html | av1.mp4 should not fire 'error' event NS_ERROR_DOM_MEDIA_FATAL_ERR (0x806e0005)

In debug builds on 32-bit Windows 7, CoInitializeEx() asserts with E_OUTOFMEMORY in RemoteDecoderManagerParent::StartupThreads(). But if I make RemoteDecoderManagerParent::StartupThreads() ignore E_OUTOFMEMORY instead of asserting, the av1.mp4 test case seems to pass, even though the same test case fails in an opt build..?!

11:05:57 INFO - GECKO(5064) | Assertion failure: (((HRESULT)(hr)) >= 0), at z:/build/build/src/dom/media/ipc/RemoteDecoderManagerParent.cpp:87

Here is my current understanding of the av1.mp4 test failures on 32-bit Windows 7:

OS Firefox Build av1.mp4 Test
32-bit Windows 7 Debug CoInitializeEx() returns E_OUTOFMEMORY and asserts, but the test seems to pass if this error is ignored?!
32-bit Windows 7 Opt CoInitializeEx() returns S_OK, but the test then fails with NS_ERROR_DOM_MEDIA_FATAL_ERR
64-bit Windows 10 Debug Test passes
64-bit Windows 10 Opt Test passes

I built today's m-c with

ac_add_options --target=i686
ac_add_options --enable-debug

then commented out if (!win32) here, and then ran mach test dom/media/test/test_playback.html, and I did not hit the CoInitializeEx assertion -- it passed all 960 tests. Am I missing something in the repro?

(In reply to David Major [:dmajor] from comment #1)

then commented out if (!win32) here, and then ran mach test dom/media/test/test_playback.html, and I did not hit the CoInitializeEx assertion -- it passed all 960 tests. Am I missing something in the repro?

Are you testing on Windows 7? I don't have a Windows dev environment (or Windows 7) to test this locally, but I reproduced this assertion failure reliably on Try:

https://treeherder.mozilla.org/#/jobs?repo=try&revision=658bd804cd2f451690b6cd9b8efc776652ce6fc4

https://treeherder.mozilla.org/#/jobs?repo=try&revision=c570c449d72ca46947650fb64e2470108533e839

If you don't have this running locally, how did you determine that hr == E_OUTOFMEMORY?

(In reply to David Major [:dmajor] from comment #3)

If you don't have this running locally, how did you determine that hr == E_OUTOFMEMORY?

I added some assertions:

https://hg.mozilla.org/try/rev/462b9edad1741a399171727d1fbd8eee4530b2ab

and pushed to Try:

https://treeherder.mozilla.org/#/jobs?repo=try&revision=658bd804cd2f451690b6cd9b8efc776652ce6fc4

(In reply to Chris Peterson [:cpeterson] from comment #4)

(In reply to David Major [:dmajor] from comment #3)

If you don't have this running locally, how did you determine that hr == E_OUTOFMEMORY?

I added some assertions:

https://hg.mozilla.org/try/rev/462b9edad1741a399171727d1fbd8eee4530b2ab

and pushed to Try:

https://treeherder.mozilla.org/#/
jobs?repo=try&revision=658bd804cd2f451690b6cd9b8efc776652ce6fc4

That hits "Assertion failure: mCanSend, at z:/build/build/src/dom/media/ipc/RemoteDecoderChild.cpp:80".

(In reply to David Major [:dmajor] from comment #5)

That hits "Assertion failure: mCanSend, at z:/build/build/src/dom/media/ipc/RemoteDecoderChild.cpp:80".

I think that mCanSend assertion failure (in RemoteDecoderChild::RecvShutdownComplete()) is in response to the decoder process shutting down after the CoInitializeEx() failure. I'm not sure why the CoInitializeEx assertion failure for E_OUTOFMEMORY is not shown in the log snippet.

The full logs from that Try push are no longer available, but you can see the CoInitializeEx assertion failure (but without the assertions for specific HRESULT values) followed by the mCanSend assertion failure in this log when my patches from bug 1484720 landed in autoland:

https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=249900077&repo=autoland&lineNumber=6175

11:05:57 INFO - GECKO(5064) | Assertion failure: (((HRESULT)(hr)) >= 0), at z:/build/build/src/dom/media/ipc/RemoteDecoderManagerParent.cpp:87
6206	11:06:24 INFO - GECKO(5064) | Assertion failure: mCanSend, at z:/build/build/src/dom/media/ipc/RemoteDecoderChild.cpp:80
6251	11:06:24 ERROR - GECKO(5064) | A content process crashed and MOZ_CRASHREPORTER_SHUTDOWN is set, shutting down
6379	11:06:44 INFO - PROCESS-CRASH | Main app process exited normally | application crashed [@ nsresult mozilla::detail::RunnableFunction<`lambda at z:/build/build/src/dom/media/ipc/RemoteDecoderManagerParent.cpp:84:30'>::Run()]

linked from backout comment in bug 1484720 comment 6.

Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.