Bug 196784 - Regression(r244144) ProcessSwap.ReuseSuspendedProcessLoadHTMLString API test is flaky
Summary: Regression(r244144) ProcessSwap.ReuseSuspendedProcessLoadHTMLString API test ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords: InRadar
Depends on:
Blocks: 196774
  Show dependency treegraph
 
Reported: 2019-04-10 14:31 PDT by Chris Dumez
Modified: 2019-04-10 23:49 PDT (History)
8 users (show)

See Also:


Attachments
Patch (4.29 KB, patch)
2019-04-10 16:36 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (1.86 KB, patch)
2019-04-10 16:50 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2019-04-10 14:31:27 PDT
ProcessSwap.ReuseSuspendedProcessLoadHTMLString API test is flaky:

    TestWebKitAPI.ProcessSwap.ReuseSuspendedProcessLoadHTMLString
        
        /Volumes/Data/worker/macOS-High-Sierra-Release-Build-EWS/build/Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:2444
        Expected equality of these values:
          applePID
            Which is: 70197
          [webView _webProcessIdentifier]
            Which is: 70198
Comment 1 Chris Dumez 2019-04-10 14:46:19 PDT
I have trouble reproducing on my first machine, will try on another machine.
Comment 2 Chris Dumez 2019-04-10 16:11:57 PDT
Flakiness was indeed introduced by r244144.
Comment 3 Chris Dumez 2019-04-10 16:16:03 PDT
I see SuspendedPageProxy::pageEnteredAcceleratedCompositingMode() getting called and it destroys the SuspendedPageProxy because m_suspensionState == SuspensionState::FailedToSuspend.

Suspension likely fails because there is no HistoryItem in WebContent process side. I believe failure to suspend is expected here.

Depending on how fast SuspendedPageProxy::pageEnteredAcceleratedCompositingMode() gets called, the SuspendedPageProxy may or may not still be there when we need it for the navigation.
Comment 4 Chris Dumez 2019-04-10 16:36:27 PDT
Created attachment 367176 [details]
Patch
Comment 5 Chris Dumez 2019-04-10 16:50:11 PDT
Created attachment 367178 [details]
Patch
Comment 6 WebKit Commit Bot 2019-04-10 23:48:25 PDT
Comment on attachment 367178 [details]
Patch

Clearing flags on attachment: 367178

Committed r244186: <https://trac.webkit.org/changeset/244186>
Comment 7 WebKit Commit Bot 2019-04-10 23:48:26 PDT
All reviewed patches have been landed.  Closing bug.
Comment 8 Radar WebKit Bug Importer 2019-04-10 23:49:20 PDT
<rdar://problem/49804290>