Closed Bug 941314 Opened 11 years ago Closed 11 years ago

Be more aggressive about GCing and CCing in media mochitests

Categories

(Core :: Audio/Video, defect)

x86_64
All
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla28

People

(Reporter: cpearce, Assigned: cpearce)

References

Details

(Whiteboard: [qa-])

Attachments

(1 file, 2 obsolete files)

Attached patch Patch (obsolete) — Splinter Review
We can be more aggressive about running the GC and CC in the media mochitests. This should help ensure our decoders clean up their resources, hopefully it will help reduce our random failure rate.

https://tbpl.mozilla.org/?tree=Try&rev=42111df3823b
Attachment #8335619 - Flags: review?(paul)
It looks like you should use SpecialPowers.exactGC for this rather than inventing our own heuristics.
Comment on attachment 8335619 [details] [diff] [review]
Patch

Review of attachment 8335619 [details] [diff] [review]:
-----------------------------------------------------------------

::: content/media/test/manifest.js
@@ +635,4 @@
>      SpecialPowers.forceGC();
> +    SpecialPowers.forceCC();
> +    SpecialPowers.forceGC();
> +    SpecialPowers.forceCC();

As kinetik says, exactGC is better for this use case, as advertised in the comment at the top:

http://mxr.mozilla.org/mozilla-central/source/testing/specialpowers/content/specialpowersAPI.js#1236
Attachment #8335619 - Flags: review?(paul)
Attached patch Patch v2 (obsolete) — Splinter Review
Using exactGC() instead.
Attachment #8337439 - Flags: review?(kinetik)
Attachment #8335619 - Attachment is obsolete: true
Comment on attachment 8337439 [details] [diff] [review]
Patch v2

You need to pass a callback as the second argument (first argument (window) can be null) for this to work as it needs to idle the event queue.

With this in place, I wonder if we still need the extra GC in mediaTestCleanup.
Attachment #8337439 - Flags: review?(kinetik) → review-
Using SpecialPowers.exactGC. Tests pass locally, try run pending:

https://tbpl.mozilla.org/?tree=Try&rev=216d3988f7ec
Attachment #8337439 - Attachment is obsolete: true
Attachment #8341481 - Flags: review?(kinetik)
Attachment #8341481 - Flags: review?(kinetik) → review+
Try push: https://tbpl.mozilla.org/?tree=Try&rev=216d3988f7ec

The orange here are known issues.

Had the following failures:
Linux x64 Debug test_unseekable 3 timeouts in 39 runs (Bug 907924)

test_unseekable.html has only ever been logged as timing out 8 times, and only in the past 3 months, so that's a bit suspicious.

MacOSX 10.6 opt: 
* 2 x tests/content/html/content/test/test_bug660959-1.html | application crashed [@ libSystem.B.dylib + 0xd7a] (These crashes are known, we're hanging and forcing a crash to try to get a stack and failing)
* Bug 939633 - Intermittent test_bug419527.xhtml | Test timed out. (known)
* 76176 ERROR TEST-UNEXPECTED-FAIL | /tests/content/canvas/test/webgl/test_webgl_conformance_test_suite.html | [conformance/glsl/misc/shader-with-glprojectionmatrix.vert.html] Timeout in this test page

MacOSX 10.6 debug:
* 2x Bug 846769 (test_bug495300.html assertion failure) in about 40 runs
 ASSERTION: Start time must be before end time: 'startTime < endTime', file ../../../../content/media/ogg/OggReader.cpp, line 1154

But based on this graph, the memory usage is about the same:
http://people.mozilla.org/~sguo/mochimem/viewer.html?url=http%3A//ftp.mozilla.org/pub/mozilla.org/firefox/try-builds/cpearce@mozilla.com-216d3988f7ec/try-macosx64-debug/try_snowleopard-debug_test-mochitest-1-bm75-tests1-macosx-build1658.txt.gz&url=http%3A//ftp.mozilla.org/pub/mozilla.org/firefox/try-builds/fdesre@mozilla.com-5383aaa0f394/try-macosx64-debug/try_snowleopard-debug_test-mochitest-1-bm76-tests1-macosx-build1629.txt.gz

Here on Win7 debug the difference is more noticable (but is only a few tens of MB, but at least it's consistent):
http://people.mozilla.org/~sguo/mochimem/viewer.html?url=http%3A//ftp.mozilla.org/pub/mozilla.org/firefox/try-builds/cpearce@mozilla.com-216d3988f7ec/try-win32-debug/try_win7-ix-debug_test-mochitest-1-bm73-tests1-windows-build1233.txt.gz&url=http%3A//ftp.mozilla.org/pub/mozilla.org/firefox/try-builds/fdesre@mozilla.com-5383aaa0f394/try-win32-debug/try_win7-ix-debug_test-mochitest-1-bm74-tests1-windows-build908.txt.gz&
https://hg.mozilla.org/mozilla-central/rev/dee18b5520fb
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla28
Whiteboard: [qa-]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: