Bug 231022

Summary: Regression (r283238)[ MacOS wk1 ] fast/mediacapturefromelement/CanvasCaptureMediaStream-webgl-events.html is timing out
Product: WebKit Reporter: ayumi_kojima
Component: MediaAssignee: Kimmo Kinnunen <kkinnunen>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, changseok, dino, eric.carlson, esprehn+autocc, ews-watchlist, glenn, gyuyoung.kim, hta, jer.noble, kkinnunen, kondapallykalyan, philipj, sergio, tommyw, webkit-bot-watchers-bugzilla, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Mac (Intel)   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=230613
Attachments:
Description Flags
Patch
none
Patch none

Description ayumi_kojima 2021-09-30 09:08:08 PDT
fast/mediacapturefromelement/CanvasCaptureMediaStream-webgl-events.html

Is timing out on macOS wk1.

History: https://results.webkit.org/?suite=layout-tests&test=fast%2Fmediacapturefromelement%2FCanvasCaptureMediaStream-webgl-events.html

Diff:

--- /Volumes/Data/worker/bigsur-release-applesilicon-tests-wk1/build/layout-test-results/fast/mediacapturefromelement/CanvasCaptureMediaStream-webgl-events-expected.txt
+++ /Volumes/Data/worker/bigsur-release-applesilicon-tests-wk1/build/layout-test-results/fast/mediacapturefromelement/CanvasCaptureMediaStream-webgl-events-actual.txt
@@ -1,3 +1,4 @@
+FAIL: Timed out waiting for notifyDone to be called
 Exercises the potential events on CanvasCaptureMediaStream.
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
@@ -9,8 +10,4 @@
 PASS Plugged stream to video tag.
 PASS Drawing to canvas.
 PASS Video play callback succeeded.
-PASS Video canplaythrough callback succeeded.
-PASS successfullyParsed is true
 
-TEST COMPLETE
-
Comment 1 Radar WebKit Bug Importer 2021-09-30 09:08:55 PDT
<rdar://problem/83722125>
Comment 2 ayumi_kojima 2021-09-30 09:28:39 PDT
I was able to reproduce the timeout using run-webkit-tests fast/mediacapturefromelement/CanvasCaptureMediaStream-webgl-events.html -1

Test timed out with r283238 and passed with r283234. I was not able to test in-between because there are no revisions available to test.
Comment 3 youenn fablet 2021-09-30 09:35:51 PDT
Probably https://trac.webkit.org/changeset/283238/webkit where WK2 impl is different from WK1.
Comment 4 Kimmo Kinnunen 2021-10-01 02:56:43 PDT
*** Bug 230624 has been marked as a duplicate of this bug. ***
Comment 5 Kimmo Kinnunen 2021-10-01 03:23:31 PDT
Created attachment 439836 [details]
Patch
Comment 6 youenn fablet 2021-10-01 03:37:11 PDT
Comment on attachment 439836 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=439836&action=review

> Source/WebCore/Modules/mediastream/CanvasCaptureMediaStreamTrack.h:81
> +

Unnecessary

> Source/WebCore/html/CanvasBase.h:146
> +    HashSet<CanvasDisplayBufferObserver*> m_displayBufferObservers;

Can we make these WeakHashSet by making CanvasDisplayBufferObserver a CanMakeWeakPtr<>?

> Source/WebCore/html/HTMLCanvasElement.cpp:1062
> +        // composited and thus doesn't need preparation. Unfortunately

I am not sure we have tests with detached canvas, that might be worth adding, and making sure we match the spec or other browsers.
Comment 7 Kimmo Kinnunen 2021-10-01 05:03:21 PDT
Created attachment 439839 [details]
Patch
Comment 8 EWS 2021-10-04 00:48:19 PDT
Committed r283489 (242462@main): <https://commits.webkit.org/242462@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 439839 [details].