imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audiocontext-interface/processing-after-resume.https.html Test is a flaky failure according to history on macOS. First occurrence of failure is at r268163 but I believe the change that restarted the testing for this test at r268161 might be a better regression point. History: https://results.webkit.org/?suite=layout-tests&test=imported%2Fw3c%2Fweb-platform-tests%2Fwebaudio%2Fthe-audio-api%2Fthe-audiocontext-interface%2Fprocessing-after-resume.https.html&platform=mac Diff: --- /Volumes/Data/slave/catalina-debug-tests-wk2/build/layout-test-results/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audiocontext-interface/processing-after-resume.https-expected.txt +++ /Volumes/Data/slave/catalina-debug-tests-wk2/build/layout-test-results/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audiocontext-interface/processing-after-resume.https-actual.txt @@ -1,3 +1,3 @@ -PASS Test consistency of processing after resume() +FAIL Test consistency of processing after resume() assert_equals: node1 processed frame count expected 128 but got 0
<rdar://problem/70159546>
Test expectation while investigated: https://trac.webkit.org/changeset/268301/webkit
Looks like I was able to reproduce like so: Tools/Scripts/run-webkit-tests imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audiocontext-interface/processing-after-resume.https.html --repeat-each=100 -g --additional-env-var=JSC_collectContinuously=true --force -1 Diff: @@ -1,3 +1,3 @@ -PASS Test consistency of processing after resume() +FAIL Test consistency of processing after resume() assert_equals: construct time before resume expected 0.19156462585034015 but got 0.20317460317460317
Created attachment 413068 [details] Patch
Comment on attachment 413068 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=413068&action=review > Source/WebCore/ChangeLog:13 > + still increase a bit, a short while after the suspend promise has been resolved. To address the issue, we now to a round s/to/do/ > Source/WebCore/platform/audio/cocoa/AudioDestinationCocoa.cpp:132 > + dispatchToRenderThread(WTFMove(callCompletionHandlerOnMainThread)); dispatchToRenderThread takes a function not a completion handler. Should we make it take a CompletionHandler? It seems it should always call the function in normal cases.
Comment on attachment 413068 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=413068&action=review >> Source/WebCore/platform/audio/cocoa/AudioDestinationCocoa.cpp:132 >> + dispatchToRenderThread(WTFMove(callCompletionHandlerOnMainThread)); > > dispatchToRenderThread takes a function not a completion handler. > Should we make it take a CompletionHandler? It seems it should always call the function in normal cases. I do not believe this is currently possible because there is an assertion in CompletionHandler enforcing that the CompletionHandler gets called on the thread it was constructed on.
Created attachment 413164 [details] Patch
Committed r269383: <https://trac.webkit.org/changeset/269383> All reviewed patches have been landed. Closing bug and clearing flags on attachment 413164 [details].
The only test filed under this bug was: - imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audiocontext-interface/processing-after-resume.https.html GTK post-commit test bot reports the test has been failing consistently for the last 4000 revisions. Diff: --- /home/buildbot/worker/gtk-linux-64-release-tests/build/layout-test-results/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audiocontext-interface/processing-after-resume.https-expected.txt +++ /home/buildbot/worker/gtk-linux-64-release-tests/build/layout-test-results/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audiocontext-interface/processing-after-resume.https-actual.txt @@ -1,3 +1,3 @@ -PASS Test consistency of processing after resume() +FAIL Test consistency of processing after resume() assert_equals: construct time before resume expected 0.06965986394557823 but got 0.07546485260770976