Intermittent dom/media/test/test_seek_between_keyframes.html | single tracking bug
Categories
(Core :: Audio/Video: Playback, defect, P5)
Tracking
()
People
(Reporter: intermittent-bug-filer, Unassigned, NeedInfo)
References
Details
(Keywords: intermittent-failure, intermittent-testcase, Whiteboard: [collect_confirm_failure])
Filed by: asilaghi [at] mozilla.com
Parsed log: https://treeherder.mozilla.org/logviewer?job_id=606664923&repo=autoland&task=TtoTeywKRuOPv-vwn5l_MA.0
Full log: https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/TtoTeywKRuOPv-vwn5l_MA/runs/0/artifacts/public/logs/live_backing.log
[task 2026-11-12T09:51:56.774+00:00] 09:51:56 INFO - TEST-PASS | dom/media/test/test_seek_between_keyframes.html | alpha must be 1.0
[task 2026-11-12T09:51:56.775+00:00] 09:51:56 INFO - Buffered messages finished
[task 2026-11-12T09:51:56.776+00:00] 09:51:56 INFO - TEST-UNEXPECTED-FAIL | dom/media/test/test_seek_between_keyframes.html | must display correct frame (seeked to 8) - got +0, expected 255 epsilon: +/- 4
[task 2026-11-12T09:51:56.776+00:00] 09:51:56 INFO - SimpleTest.isfuzzy@SimpleTest/SimpleTest.js:520:14
[task 2026-11-12T09:51:56.776+00:00] 09:51:56 INFO - doTest/<@dom/media/test/test_seek_between_keyframes.html:99:18
[task 2026-11-12T09:51:56.776+00:00] 09:51:56 INFO - async*add_task/nextTick/<@SimpleTest/SimpleTest.js:2219:34
[task 2026-11-12T09:51:56.776+00:00] 09:51:56 INFO - async*nextTick@SimpleTest/SimpleTest.js:2263:11
[task 2026-11-12T09:51:56.776+00:00] 09:51:56 INFO - setTimeout handler*SimpleTest_setTimeoutShim@SimpleTest/SimpleTest.js:925:41
[task 2026-11-12T09:51:56.776+00:00] 09:51:56 INFO - nextTick@SimpleTest/SimpleTest.js:2177:21
[task 2026-11-12T09:51:56.776+00:00] 09:51:56 INFO - setTimeout handler*SimpleTest_setTimeoutShim@SimpleTest/SimpleTest.js:925:41
[task 2026-11-12T09:51:56.776+00:00] 09:51:56 INFO - add_task@SimpleTest/SimpleTest.js:2161:17
[task 2026-11-12T09:51:56.776+00:00] 09:51:56 INFO - @dom/media/test/test_seek_between_keyframes.html:133:9
[task 2026-11-12T09:51:56.777+00:00] 09:51:56 INFO - TEST-PASS | dom/media/test/test_seek_between_keyframes.html | must display correct frame (seeked to 8)
Comment 1•16 days ago
|
||
I added this test. It skips around in a video, draws the <video> onto a canvas as a bitmap then asserts that the displayed frame is correct. It does that both while playing and paused.
Looks like frame can takes a bit longer to be drawn after the seeked event, so the test is too strict. Right now failures are all on windows with GPU and doing the seek while paused, if it stays that way I think we could just drop seek-while-paused and keep only seek-while-playing. It's not really an essential part of the test.
Unless some spec says this has to work of course, but I don't think it does.
Comment 2•16 days ago
|
||
| gecko-triage | ||
The data agrees with comment 1 by Thomas: the page can get seeked before the new frame is ready to draw. Two details differ from comment 1.
Analysis
The failures are on windows11-64-24h2-hw-ref-shippable opt, in mochitest-media-mda-gpu, at revision e98520026a95 (autoland and mozilla-central). The test came with bug 2080453. Caution: the triage tooling could not read the full CI log, so the log does not tell us the file or the seek phase yet.
The test waits only for seeked, then calls drawImage at once, with no requestVideoFrameCallback and no retry. The test checks each color channel with the same message. Thus the PASS after the FAIL is the green channel check, not a retry.
The seek to 8 expects yellow (255, 255, 0). Red got 0, and green and blue passed, so the drawn frame was green. This is probably the frame of the previous seek to 0.9. In the 7 second stss-extra-entries files, the frame at 0.9 is green, so a leftover frame gives this pixel in both phases. In the 4 second files, the frame at 0.9 is blue, and green fits only the playing phase. Thus the data does not show that only the paused phase fails.
The probable cause is the order in SeekingState::SeekCompleted in MediaDecoderStateMachine.cpp. It resolves the seek promise first, and then the main thread queues seeked. Then the state machine thread calls Redraw (MediaDecoderStateMachine.cpp), which puts the new frame into VideoFrameContainer. Nothing orders the two threads, and drawImage reads the image that the container holds at that time. This order is from 2016, so the new test shows an old race and no recent product change caused it.
Fix direction
The test can wait until the drawn frame shows the seek target before it checks the colors. One way is a poll on animation frames with a time limit. requestVideoFrameCallback is another option, because Redraw gives the frame a new id. Caution: a callback registered after Redraw already ran waits for a next frame, and a paused element does not present one. The lines "Running with file" and "Seek while playing" before each failure in the full log show the file and the phase.
Thomas, could you please look at these facts when you choose the change to the test?
If you'd like to provide feedback on this comment, please use the 👍 or 👎 reaction.
| Comment hidden (Intermittent Failures Robot) |
| Comment hidden (Intermittent Failures Robot) |
Description
•