RESOLVED FIXED 189037
Add error information to help debug test failure in WKNavigation.ProcessCrashDuringCallback
https://bugs.webkit.org/show_bug.cgi?id=189037
Summary Add error information to help debug test failure in WKNavigation.ProcessCrash...
Sihui Liu
Reported 2018-08-27 17:15:29 PDT
WKNavigation.ProcessCrashDuringCallback is failing after r235321, which seems to be an irrelevant change. Add some error information to help debug the failure.
Attachments
Patch (6.37 KB, patch)
2018-08-27 17:18 PDT, Sihui Liu
no flags
Patch (6.42 KB, patch)
2018-08-28 10:13 PDT, Sihui Liu
no flags
Patch (6.42 KB, patch)
2018-08-28 12:13 PDT, Sihui Liu
no flags
Patch for landing (6.26 KB, patch)
2018-08-28 13:48 PDT, Sihui Liu
no flags
Sihui Liu
Comment 1 2018-08-27 17:18:33 PDT
Sihui Liu
Comment 2 2018-08-28 10:13:31 PDT
Chris Dumez
Comment 3 2018-08-28 11:59:47 PDT
What does the failure look like?
Sihui Liu
Comment 4 2018-08-28 12:03:25 PDT
(In reply to Chris Dumez from comment #3) > What does the failure look like? https://build.webkit.org/builders/Apple%20High%20Sierra%20Debug%20WK2%20%28Tests%29/builds/4651/steps/run-api-tests/logs/stdio /Volumes/Data/slave/highsierra-debug/build/Tools/TestWebKitAPI/Tests/WebKitCocoa/WebContentProcessDidTerminate.mm:232 Value of: !!error Actual: false Expected: true
Chris Dumez
Comment 5 2018-08-28 12:08:55 PDT
Comment on attachment 348304 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=348304&action=review > Tools/TestWebKitAPI/Tests/WebKitCocoa/WebContentProcessDidTerminate.mm:233 > + EXPECT_EQ(error.code, WKErrorWebContentProcessTerminated); I believe the parameters are reversed. Left side should be expected value iirc.
Sihui Liu
Comment 6 2018-08-28 12:13:54 PDT
Sihui Liu
Comment 7 2018-08-28 12:16:28 PDT
(In reply to Chris Dumez from comment #5) > Comment on attachment 348304 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=348304&action=review > > > Tools/TestWebKitAPI/Tests/WebKitCocoa/WebContentProcessDidTerminate.mm:233 > > + EXPECT_EQ(error.code, WKErrorWebContentProcessTerminated); > > I believe the parameters are reversed. Left side should be expected value > iirc. I saw this WKContentExtensionStoreStore.mm so I thought it's correct... Fixed.
Chris Dumez
Comment 8 2018-08-28 12:18:57 PDT
(In reply to Sihui Liu from comment #7) > (In reply to Chris Dumez from comment #5) > > Comment on attachment 348304 [details] > > Patch > > > > View in context: > > https://bugs.webkit.org/attachment.cgi?id=348304&action=review > > > > > Tools/TestWebKitAPI/Tests/WebKitCocoa/WebContentProcessDidTerminate.mm:233 > > > + EXPECT_EQ(error.code, WKErrorWebContentProcessTerminated); > > > > I believe the parameters are reversed. Left side should be expected value > > iirc. > > I saw this WKContentExtensionStoreStore.mm so I thought it's correct... > Fixed. Yes, people get it wrong all the time.
Chris Dumez
Comment 9 2018-08-28 12:21:08 PDT
Comment on attachment 348320 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=348320&action=review r=me > Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm:4576 > + NSError* callbackError = [NSError errorWithDomain:WKErrorDomain code:static_cast<int>(error) userInfo:nil]; FYI, we use star on right size for NS types. But in this case, I'd rather we drop this local variable completely: completionHandlerBlock(nil, [NSError errorWithDomain:WKErrorDomain code:static_cast<int>(error) userInfo:nil]); > Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm:4591 > + NSError* callbackError = [NSError errorWithDomain:WKErrorDomain code:static_cast<int>(error) userInfo:nil]; ditto. > Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm:4605 > + NSError* callbackError = [NSError errorWithDomain:WKErrorDomain code:static_cast<int>(error) userInfo:nil]; ditto.
Sihui Liu
Comment 10 2018-08-28 13:48:02 PDT
Created attachment 348338 [details] Patch for landing
WebKit Commit Bot
Comment 11 2018-08-28 14:26:29 PDT
Comment on attachment 348338 [details] Patch for landing Clearing flags on attachment: 348338 Committed r235440: <https://trac.webkit.org/changeset/235440>
WebKit Commit Bot
Comment 12 2018-08-28 14:26:30 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 13 2018-08-28 14:27:25 PDT
Ryan Haddad
Comment 14 2018-08-29 16:25:43 PDT
Do we now have the needed information to resolve the issue? This test is consistently failing on iOS bots. https://build.webkit.org/builders/Apple%20iOS%2011%20Simulator%20Release%20WK2%20%28Tests%29/builds/7110/steps/run-api-tests/logs/stdio
Chris Dumez
Comment 15 2018-08-29 16:47:53 PDT
(In reply to Ryan Haddad from comment #14) > Do we now have the needed information to resolve the issue? This test is > consistently failing on iOS bots. > > https://build.webkit.org/builders/ > Apple%20iOS%2011%20Simulator%20Release%20WK2%20%28Tests%29/builds/7110/steps/ > run-api-tests/logs/stdio Probably the WebView is getting destroyed *before* we realize the WebProcess has exited. When The WebView gets destroyed, we call WebPageProxy::close() which causes error WKErrorWebViewInvalidated as we see in the new test output.
Chris Dumez
Comment 16 2018-08-29 16:53:36 PDT
(In reply to Chris Dumez from comment #15) > (In reply to Ryan Haddad from comment #14) > > Do we now have the needed information to resolve the issue? This test is > > consistently failing on iOS bots. > > > > https://build.webkit.org/builders/ > > Apple%20iOS%2011%20Simulator%20Release%20WK2%20%28Tests%29/builds/7110/steps/ > > run-api-tests/logs/stdio > > Probably the WebView is getting destroyed *before* we realize the WebProcess > has exited. When The WebView gets destroyed, we call WebPageProxy::close() > which causes error WKErrorWebViewInvalidated as we see in the new test > output. We should probably drop this line: webView = nullptr; Not sure why I did this in the first place.
Note You need to log in before you can comment on or make changes to this bug.