Closed Bug 1666116 Opened 4 years ago Closed 3 years ago

Intermittent TestAudioTrackGraph.SourceTrack | Expected: (preSilenceSamples) <= (128U + 2 * inputRate / 100), actual: 10712 vs 1010 @ /builds/worker/checkouts/gecko/dom/media/gtest/TestAudioTrackGraph.cpp:373 | test completed (time: 110ms)

Categories

(Core :: Audio/Video: MediaStreamGraph, defect, P2)

defect

Tracking

()

RESOLVED FIXED
85 Branch
Tracking Status
firefox85 --- fixed

People

(Reporter: intermittent-bug-filer, Assigned: pehrsons)

References

Details

(Keywords: intermittent-failure)

Attachments

(5 files)

Filed by: rmaries [at] mozilla.com
Parsed log: https://treeherder.mozilla.org/logviewer.html#?job_id=316181119&repo=mozilla-central
Full log: https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/LxhvOvlDRMSYVFsXu1ayZg/runs/0/artifacts/public/logs/live_backing.log


[task 2020-09-19T22:14:25.083Z] 22:14:25     INFO -  TEST-PASS | TestAudioTrackGraph.ErrorStateCrash | test completed (time: 93ms)
[task 2020-09-19T22:14:25.083Z] 22:14:25     INFO -  TEST-START | TestAudioTrackGraph.SourceTrack
[task 2020-09-19T22:14:25.083Z] 22:14:25     INFO -  [5636, CubebOperation #1] WARNING: Could not set the audio stream volume in GraphDriver.cpp: 'rv == CUBEB_OK', file /builds/worker/checkouts/gecko/dom/media/GraphDriver.cpp, line 693
[task 2020-09-19T22:14:25.138Z] 22:14:25     INFO -  [5636, CubebOperation #1] WARNING: Could not set the audio stream volume in GraphDriver.cpp: 'rv == CUBEB_OK', file /builds/worker/checkouts/gecko/dom/media/GraphDriver.cpp, line 693
[task 2020-09-19T22:14:25.193Z] 22:14:25     INFO -  PreSilence: 10712
[task 2020-09-19T22:14:25.193Z] 22:14:25  WARNING -  TEST-UNEXPECTED-FAIL | TestAudioTrackGraph.SourceTrack | Expected: (preSilenceSamples) <= (128U + 2 * inputRate / 100), actual: 10712 vs 1010 @ /builds/worker/checkouts/gecko/dom/media/gtest/TestAudioTrackGraph.cpp:373
[task 2020-09-19T22:14:25.193Z] 22:14:25  WARNING -  TEST-UNEXPECTED-FAIL | TestAudioTrackGraph.SourceTrack | test completed (time: 110ms)```
Assignee: nobody → apehrson
Status: NEW → ASSIGNED
Component: Audio/Video → Audio/Video: MediaStreamGraph
Priority: P5 → P2

Unittests using GoFaster mode may start iterating the audio driver faster before
its fallback has completed handover to the audio callback. This causes the
preSilenceSamples check to spike and the test fails.

Waiting for the fallback to finish handing over fixes this.

To accomodate this, this patch also constifies some methods as needed to check
InIteration() when const. It also waits for audio drivers to start per the above
in TestCrossGraphTrack as that test may otherwise exhibit this bug with bug
1605314 applied.

It stems from Result<RefPtr<MockCubeb::AudioThreadAutoUnforcer>, nsresult> being a must-use type.
It boils down to:
/builds/worker/workspace/obj-build/dist/include/mozilla/Maybe.h:259:15: note:
'union Union' is a must-use type because member 'val' is a must-use type
'detail::MaybeStorage<Result<RefPtr<MockCubeb::AudioThreadAutoUnforcer>, nsresult>, false>::NonConstT'
(aka 'Result<RefPtr<MockCubeb::AudioThreadAutoUnforcer>, nsresult>')
NonConstT val;
^

It has been observed on try to take a long time to start the fake audio thread.
On Mac it would regularly take around half a second. This patch mitigates that
start-up time being long by making sure the thread is already started.

Pushed by pehrsons@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/06ced7ee7c2c
Account for fallback in NotifyWhenGraphStarted. r=padenot
https://hg.mozilla.org/integration/autoland/rev/3225cdc96f82
Work around a static-analysis error causing bustages. r=padenot
https://hg.mozilla.org/integration/autoland/rev/c529b6732b08
Avoid switching audio driver twice in audio-input gtests, for determinism. r=padenot
https://hg.mozilla.org/integration/autoland/rev/dba15089f5d3
Pre-create the fake audio thread for timing sensitive tests. r=padenot
Flags: needinfo?(apehrson)
Pushed by pehrsons@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/9e2a2c13ef60
Account for fallback in NotifyWhenGraphStarted. r=padenot
https://hg.mozilla.org/integration/autoland/rev/93aef991a475
Work around a static-analysis error causing bustages. r=padenot
https://hg.mozilla.org/integration/autoland/rev/351419be5c0d
Reduce non-determinism in CrossGraphPort gtest with the help of stream start-freezing. r=padenot
https://hg.mozilla.org/integration/autoland/rev/506522ae896e
Avoid switching audio driver twice in audio-input gtests, for determinism. r=padenot
https://hg.mozilla.org/integration/autoland/rev/fedcb7e94929
Pre-create the fake audio thread for timing sensitive tests. r=padenot

Thanks. Things have been shifted around in bug 1676365.

Flags: needinfo?(apehrson)
Pushed by pehrsons@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/69bc5617b415
Account for fallback in NotifyWhenGraphStarted. r=padenot
https://hg.mozilla.org/integration/autoland/rev/15fc59a6b0d2
Work around a static-analysis error causing bustages. r=padenot
https://hg.mozilla.org/integration/autoland/rev/e45fb2b1f2a1
Reduce non-determinism in CrossGraphPort gtest with the help of stream start-freezing. r=padenot
https://hg.mozilla.org/integration/autoland/rev/29c4d6296400
Avoid switching audio driver twice in audio-input gtests, for determinism. r=padenot
https://hg.mozilla.org/integration/autoland/rev/d493fa5e5cc6
Pre-create the fake audio thread for timing sensitive tests. r=padenot
See Also: → 1586370
See Also: → 1767549
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: