Summary: | Regression(r238330) ProcessSwap.WebInspector API test is a flaky crash in debug | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Chris Dumez <cdumez> | ||||
Component: | Web Inspector | Assignee: | Joseph Pecoraro <joepeck> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | bburg, commit-queue, hi, inspector-bugzilla-changes, joepeck, koivisto, rniwa, ryanhaddad, timothy, tsavell, 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=191814 | ||||||
Bug Depends on: | |||||||
Bug Blocks: | 191740 | ||||||
Attachments: |
|
Description
Chris Dumez
2018-11-17 14:11:58 PST
I was unable to reproduce locally. I can reproduce it locally on iMac Pro: $ ./Tools/Scripts/run-api-tests --debug ProcessSwap.WebInspector Running tests _RegisterApplication(), FAILED TO establish the default connection to the WindowServer, _CGSDefaultConnection() is NULL. Received data during response processing, queuing it. _RegisterApplication(), FAILED TO establish the default connection to the WindowServer, _CGSDefaultConnection() is NULL. _RegisterApplication(), FAILED TO establish the default connection to the WindowServer, _CGSDefaultConnection() is NULL. ASSERTION FAILED: !m_frontendConnection /Volumes/Data/webkit2/Source/WebKit/WebProcess/WebPage/WebInspector.cpp(80) : void WebKit::WebInspector::setFrontendConnection(IPC::Attachment) 1 0x11f66f419 WTFCrash 2 0x10af0d19b WTFCrashWithInfo(int, char const*, char const*, int) 3 0x10bf349ea WebKit::WebInspector::setFrontendConnection(IPC::Attachment) 4 0x10bff5d78 void IPC::callMemberFunctionImpl<WebKit::WebInspector, void (WebKit::WebInspector::*)(IPC::Attachment), std::__1::tuple<IPC::Attachment>, 0ul>(WebKit::WebInspector*, void (WebKit::WebInspector::*)(IPC::Attachment), std::__1::tuple<IPC::Attachment>&&, std::__1::integer_sequence<unsigned long, 0ul>) 5 0x10bff5ca0 void IPC::callMemberFunction<WebKit::WebInspector, void (WebKit::WebInspector::*)(IPC::Attachment), std::__1::tuple<IPC::Attachment>, std::__1::integer_sequence<unsigned long, 0ul> >(std::__1::tuple<IPC::Attachment>&&, WebKit::WebInspector*, void (WebKit::WebInspector::*)(IPC::Attachment)) 6 0x10bff56d4 void IPC::handleMessage<Messages::WebInspector::SetFrontendConnection, WebKit::WebInspector, void (WebKit::WebInspector::*)(IPC::Attachment)>(IPC::Decoder&, WebKit::WebInspector*, void (WebKit::WebInspector::*)(IPC::Attachment)) 7 0x10bff495c WebKit::WebInspector::didReceiveMessage(IPC::Connection&, IPC::Decoder&) 8 0x10c01efe2 WebKit::WebPage::didReceiveMessage(IPC::Connection&, IPC::Decoder&) 9 0x10afbc5da IPC::MessageReceiverMap::dispatchMessage(IPC::Connection&, IPC::Decoder&) 10 0x10bcbc45d WebKit::WebProcess::didReceiveMessage(IPC::Connection&, IPC::Decoder&) 11 0x10af5466c IPC::Connection::dispatchMessage(IPC::Decoder&) 12 0x10af46a51 IPC::Connection::dispatchMessage(std::__1::unique_ptr<IPC::Decoder, std::__1::default_delete<IPC::Decoder> >) 13 0x10af55437 IPC::Connection::dispatchOneIncomingMessage() 14 0x10af75f68 IPC::Connection::enqueueIncomingMessage(std::__1::unique_ptr<IPC::Decoder, std::__1::default_delete<IPC::Decoder> >)::$_14::operator()() 15 0x10af75e79 WTF::Function<void ()>::CallableWrapper<IPC::Connection::enqueueIncomingMessage(std::__1::unique_ptr<IPC::Decoder, std::__1::default_delete<IPC::Decoder> >)::$_14>::call() 16 0x11f696c5d WTF::Function<void ()>::operator()() const 17 0x11f6ef90d WTF::RunLoop::performWork() 18 0x11f6f01b4 WTF::RunLoop::performWork(void*) ... Received data during response processing, queuing it. Received data during response processing, queuing it. LEAK: 2 WebProcessPool /Volumes/Data/webkit2/Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:2076 Expected: (pid2) != (pid3), actual: 36821 vs 36821 /Volumes/Data/webkit2/Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:2077 Expected equality of these values: numberOfDecidePolicyCalls Which is: 4 3 (In reply to Ryosuke Niwa from comment #3) > I can reproduce it locally on iMac Pro: > > $ ./Tools/Scripts/run-api-tests --debug ProcessSwap.WebInspector This also reproduces the issue for me. I'm taking a look. (In reply to Joseph Pecoraro from comment #4) > (In reply to Ryosuke Niwa from comment #3) > > I can reproduce it locally on iMac Pro: > > > > $ ./Tools/Scripts/run-api-tests --debug ProcessSwap.WebInspector > > This also reproduces the issue for me. I'm taking a look. FYI, https://bugs.webkit.org/show_bug.cgi?id=191814 is probably more urgent. My understanding of what is going on so far is: • WebProcess (A) asks UIProcess for inspector • UIProcess launches InspectorProcess • InspectorProcess launches, sends new connection attachment (1) to UIProcess (on way to WebProcess) * UIProcess navigates * Swaps WebProcess (A) swaps to (B) * Asks InspectorProcess for a new connection * InspectorProcess, sends new connection attachment (2) to UIProcess (on way to WebProcess) • UIProcess receives (1) sends to current WebProcess (B) • UIProcess receives (2) sends to current WebProcess (B) So this looks like its just message ordering due to very quickly performing actions in the UIProcess before receiving messages from the InspectorProcess. In this case it would be harmless for WebProcess (B) to use the latest IPC attachment, and in fact we will always want to use the most current IPC::Attachment. I just want to verify a few things, like that we aren't getting messages in suspended processes. Maybe it's possible for the UIProcess avoid sending multiple messages to a WebProcess but just using the latest is the simplest path forward. Created attachment 355255 [details]
[PATCH] Proposed Fix
Comment on attachment 355255 [details] [PATCH] Proposed Fix Clearing flags on attachment: 355255 Committed r238369: <https://trac.webkit.org/changeset/238369> All reviewed patches have been landed. Closing bug. |