Bug 221742

Summary: REGRESSION (r272414?): [macOS] TestWebKitAPI.GPUProcess.CrashWhilePlayingVideo is a flaky failure
Product: WebKit Reporter: Ryan Haddad <ryanhaddad>
Component: MediaAssignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: ap, cdumez, eric.carlson, jenner, jer.noble, peng.liu6, webkit-bot-watchers-bugzilla, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: Other   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch none

Ryan Haddad
Reported 2021-02-10 21:13:17 PST
The following test is a flaky failure on iOS and macOS bots: TestWebKitAPI.GPUProcess.CrashWhilePlayingVideo LEAK: 1 WebProcessPool LEAK: 1 WebPageProxy /Volumes/Data/slave/bigsur-debug/build/Tools/TestWebKitAPI/Tests/WebKitCocoa/GPUProcess.mm:282 Value of: [webView _isPlayingAudio] Actual: false Expected: true https://results.webkit.org/?suite=api-tests&test=TestWebKitAPI.MediaSessionTest.RemoteCommands
Attachments
Patch (1.84 KB, patch)
2021-05-04 15:59 PDT, Chris Dumez
no flags
Patch (4.23 KB, patch)
2021-05-05 13:45 PDT, Chris Dumez
no flags
Patch (4.18 KB, patch)
2021-05-06 07:48 PDT, Chris Dumez
no flags
Radar WebKit Bug Importer
Comment 1 2021-02-10 21:13:29 PST
Ryan Haddad
Comment 2 2021-02-10 21:14:15 PST
Ryan Haddad
Comment 3 2021-02-10 21:16:50 PST
It looks like this test has been flaky on iOS for a while, but the macOS flakiness is relatively new (appears to have started with https://trac.webkit.org/changeset/272414/webkit according to test history)
Ryan Haddad
Comment 4 2021-02-10 21:21:04 PST
(In reply to Ryan Haddad from comment #3) > It looks like this test has been flaky on iOS for a while Looking more closely, that is known and tracked by https://bugs.webkit.org/show_bug.cgi?id=221499
Alexey Proskuryakov
Comment 5 2021-02-11 15:17:42 PST
Dupe of bug 221499?
Alexey Proskuryakov
Comment 6 2021-02-11 15:18:17 PST
Sorry, I now see that you said that - but should we dupe?
Ryan Haddad
Comment 7 2021-02-12 13:44:23 PST
(In reply to Alexey Proskuryakov from comment #6) > Sorry, I now see that you said that - but should we dupe? The macOS failure is still in need of investigation.
Chris Dumez
Comment 8 2021-05-04 15:59:10 PDT
EWS
Comment 9 2021-05-05 07:48:12 PDT
Committed r277018 (237334@main): <https://commits.webkit.org/237334@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 427708 [details].
Chris Dumez
Comment 10 2021-05-05 12:15:19 PDT
Reopening since the test is still flaky.
Chris Dumez
Comment 11 2021-05-05 13:45:34 PDT
youenn fablet
Comment 12 2021-05-06 00:47:51 PDT
Comment on attachment 427803 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=427803&action=review > Tools/ChangeLog:10 > + relying on [webView _isPlayingAudio]. Also use a test page with a single video element instead Does this uncover a potential issue with _isPlayingAudio in case of crash? > Tools/TestWebKitAPI/Tests/WebKitCocoa/GPUProcess.mm:320 > + [webView objectByEvaluatingJavaScriptWithUserGesture:@"document.getElementsByTagName('video')[0].play() && true"]; Why not just doing @"play()"?
Chris Dumez
Comment 13 2021-05-06 07:47:45 PDT
(In reply to youenn fablet from comment #12) > Comment on attachment 427803 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=427803&action=review > > > Tools/ChangeLog:10 > > + relying on [webView _isPlayingAudio]. Also use a test page with a single video element instead > > Does this uncover a potential issue with _isPlayingAudio in case of crash? Maybe, we'll see if this speculative fix is successful. > > Tools/TestWebKitAPI/Tests/WebKitCocoa/GPUProcess.mm:320 > > + [webView objectByEvaluatingJavaScriptWithUserGesture:@"document.getElementsByTagName('video')[0].play() && true"]; > > Why not just doing @"play()"? Good point, will update.
Chris Dumez
Comment 14 2021-05-06 07:48:41 PDT
Chris Dumez
Comment 15 2021-05-06 07:50:08 PDT
(In reply to Chris Dumez from comment #13) > (In reply to youenn fablet from comment #12) > > Comment on attachment 427803 [details] > > Patch > > > > View in context: > > https://bugs.webkit.org/attachment.cgi?id=427803&action=review > > > > > Tools/ChangeLog:10 > > > + relying on [webView _isPlayingAudio]. Also use a test page with a single video element instead > > > > Does this uncover a potential issue with _isPlayingAudio in case of crash? > > Maybe, we'll see if this speculative fix is successful. Although I don't think this has anything to do with crash recovery since _isPlayingAudio would refuse to become true *before* the crash on the bots.
EWS
Comment 16 2021-05-06 10:21:03 PDT
Committed r277101 (237403@main): <https://commits.webkit.org/237403@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 427884 [details].
Robert Jenner
Comment 17 2021-05-06 14:05:16 PDT
*** Bug 225475 has been marked as a duplicate of this bug. ***
Alexey Proskuryakov
Comment 18 2021-05-06 17:36:27 PDT
Given the above, do we need a separate bug about [webView _isPlayingAudio] not working reliably? Please file one if we do.
Chris Dumez
Comment 19 2021-05-10 08:56:03 PDT
No recent API test failures on macOS, it looks like this was successful.
Note You need to log in before you can comment on or make changes to this bug.