Bug 196784

Summary: Regression(r244144) ProcessSwap.ReuseSuspendedProcessLoadHTMLString API test is flaky
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: Tools / TestsAssignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, beidson, commit-queue, ggaren, koivisto, lforschler, webkit-bot-watchers-bugzilla, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=196714
Bug Depends on:    
Bug Blocks: 196774    
Attachments:
Description Flags
Patch
none
Patch none

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>