Bug 109407 - [WK2] Several Web inspector tests crash after r142160
Summary: [WK2] Several Web inspector tests crash after r142160
Status: RESOLVED DUPLICATE of bug 109305
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit EFL (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
Depends on: 109409
Blocks: 108785
  Show dependency treegraph
Reported: 2013-02-11 00:53 PST by Chris Dumez
Modified: 2013-02-11 11:05 PST (History)
10 users (show)

See Also:

Patch (1.88 KB, patch)
2013-02-11 02:40 PST, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (1.88 KB, patch)
2013-02-11 02:42 PST, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (1.87 KB, patch)
2013-02-11 03:03 PST, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (1.87 KB, patch)
2013-02-11 03:05 PST, 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 2013-02-11 00:53:04 PST
After the rollout in http://trac.webkit.org/changeset/142384, a lot of Web inspector test cases started crashes on EFL WK2 debug built bot:

Backtrace looks like:
crash log for WebKitTestRunner (pid 7660):
STDOUT: <empty>
STDERR: 6   0x7fa347f8bf28 WTF::OwnPtr<_Ecore_Timer>::operator=(std::nullptr_t)
STDERR: 7   0x7fa347f8bc60 WebCore::RunLoop::TimerBase::timerFired(void*)
STDERR: 8   0x7fa343d543de _ecore_timer_expired_call
STDERR: 9   0x7fa343d545ab _ecore_timer_expired_timers_call
STDERR: 10  0x7fa343d514b1
STDERR: 11  0x7fa343d51b47 ecore_main_loop_begin
STDERR: 12  0x7fa347f8ba2f WebCore::RunLoop::run()
STDERR: 13  0x7fa34bd254f5 WebProcessMainEfl
STDERR: 14  0x400804 main
STDERR: 15  0x7fa34ae0b76d __libc_start_main
STDERR: 16  0x400729
STDERR: LEAK: 2 WebFrame
STDERR: LEAK: 2 JSLazyEventListener
STDERR: LEAK: 67 RenderObject
STDERR: LEAK: 175 CachedResource
STDERR: LEAK: 101 WebCoreNode
STDERR: 1   0x7f8cc67dea5b
STDERR: 2   0x7f8cbd24fcb0
STDERR: 3   0x7f8cbeadd0c2 WebKit::WebInspectorProxy::enableRemoteInspection()
STDERR: 4   0x7f8cbeaeeede WebKit::WebPageProxy::initializeWebPage()
STDERR: 5   0x7f8cbeaeeb4a WebKit::WebPageProxy::reattachToWebProcess()
STDERR: 6   0x7f8cbeaefa6a WebKit::WebPageProxy::loadAlternateHTMLString(WTF::String const&, WTF::String const&, WTF::String const&)
STDERR: 7   0x7f8cbeb48882 WKPageLoadAlternateHTMLString
STDERR: 8   0x7f8cbeca445d ewk_view_html_string_load
STDERR: 9   0x7f8cbecabad3 WebKit::PageClientBase::processDidCrash()
STDERR: 10  0x7f8cbeafbd6b WebKit::WebPageProxy::processDidCrash()
STDERR: 11  0x7f8cbeb3497c WebKit::WebProcessProxy::didClose(CoreIPC::Connection*)
STDERR: 12  0x7f8cbea151b9 CoreIPC::Connection::dispatchConnectionDidClose()
STDERR: 13  0x7f8cbea243ea WTF::FunctionWrapper<void (CoreIPC::Connection::*)()>::operator()(CoreIPC::Connection*)
STDERR: 14  0x7f8cbea241c4 WTF::BoundFunctionImpl<WTF::FunctionWrapper<void (CoreIPC::Connection::*)()>, void (CoreIPC::Connection*)>::operator()()
STDERR: 15  0x7f8cc681395c WTF::Function<void ()>::operator()() const
STDERR: 16  0x7f8cc2476c0f WebCore::RunLoop::performWork()
STDERR: 17  0x7f8cc300ca9e WebCore::RunLoop::wakeUpEvent(void*, void*, unsigned int)
STDERR: 18  0x7f8cbde2e6c1
STDERR: 19  0x7f8cbde2d601
STDERR: 20  0x7f8cbde2db47 ecore_main_loop_begin
STDERR: 21  0x4363c3 WTR::TestController::platformRunUntil(bool&, double)
STDERR: 22  0x420214 WTR::TestController::runUntil(bool&, WTR::TestController::TimeoutDuration)
STDERR: 23  0x41f5bd WTR::TestController::resetStateToConsistentValues()
STDERR: 24  0x427ac5 WTR::TestInvocation::invoke()
STDERR: 25  0x41ff34 WTR::TestController::runTest(char const*)
STDERR: 26  0x42006d WTR::TestController::runTestingServerLoop()
STDERR: 27  0x420107 WTR::TestController::run()
STDERR: 28  0x41d7a5 WTR::TestController::TestController(int, char const**)
STDERR: 29  0x43655e main
STDERR: 30  0x7f8cbc98c76d __libc_start_main
STDERR: 31  0x41c089
STDERR: LEAK: 1 WebPageProxy
STDERR: LEAK: 1 WebContext
STDERR: ERROR: Thread name "com.apple.WebKit.ChildProcess.WatchDogQueue" is longer than 31 characters and will be truncated by Visual Studio
STDERR: /home/buildslave-1/webkit-buildslave/efl-linux-64-debug-wk2/build/Source/WTF/wtf/Threading.cpp(78) : WTF::ThreadIdentifier WTF::createThread(WTF::ThreadFunction, void*, const char*)
Comment 1 Sudarsana Nagineni (babu) 2013-02-11 01:49:26 PST
MiniBrowser is asserting with the same backtrace when the Web Process crashes. Looks like it's a regression from r142160.

#0  0x00007fb8a0cb7c42 in WebKit::WebInspectorProxy::enableRemoteInspection (this=0x0) at WebKit/Source/WebKit2/UIProcess/WebInspectorProxy.cpp:285
285	    if (!m_remoteInspectionPageId)
(gdb) bt
#0  0x00007fb8a0cb7c42 in WebKit::WebInspectorProxy::enableRemoteInspection (this=0x0) at WebKit/Source/WebKit2/UIProcess/WebInspectorProxy.cpp:285
#1  0x00007fb8a0cc9a5e in WebKit::WebPageProxy::initializeWebPage (this=0x18f0b10) at WebKit/Source/WebKit2/UIProcess/WebPageProxy.cpp:439
#2  0x00007fb8a0cc96ca in WebKit::WebPageProxy::reattachToWebProcess (this=0x18f0b10) at WebKit/Source/WebKit2/UIProcess/WebPageProxy.cpp:399
#3  0x00007fb8a0cca5ea in WebKit::WebPageProxy::loadAlternateHTMLString (this=0x18f0b10, htmlString="The web process has crashed.", baseURL="(null)", 
    unreachableURL="file://WebKit/LayoutTests/inspector/styles/styles-include-host-rules-crash.html") at WebKit/Source/WebKit2/UIProcess/WebPageProxy.cpp:617
#4  0x00007fb8a0d23402 in WKPageLoadAlternateHTMLString (pageRef=0x18f0b10, htmlStringRef=0x22808c0, baseURLRef=0x21fd890, unreachableURLRef=0x21fca50)
    at WebKit/Source/WebKit2/UIProcess/API/C/WKPage.cpp:78
#5  0x00007fb8a0e7efdd in ewk_view_html_string_load (ewkView=0x18e22e0, html=0x7fb8a10d826f "The web process has crashed.", baseUrl=0x0, unreachableUrl=
    0x228b9a0 "file://WebKit/LayoutTests/inspector/styles/styles-include-host-rules-crash.html") at WebKit/Source/WebKit2/UIProcess/API/efl/ewk_view.cpp:280
#6  0x00007fb8a0e86653 in WebKit::PageClientBase::processDidCrash (this=0x18efb70) at WebKit/Source/WebKit2/UIProcess/efl/PageClientBase.cpp:137
#7  0x00007fb8a0cd68eb in WebKit::WebPageProxy::processDidCrash (this=0x18f0b10) at WebKit/Source/WebKit2/UIProcess/WebPageProxy.cpp:3652
#8  0x00007fb8a0d0f4fc in WebKit::WebProcessProxy::didClose (this=0x18efbd0) at WebKit/Source/WebKit2/UIProcess/WebProcessProxy.cpp:402
#9  0x00007fb8a0befd39 in CoreIPC::Connection::dispatchConnectionDidClose (this=0x19f8340) at WebKit/Source/WebKit2/Platform/CoreIPC/Connection.cpp:660
#10 0x00007fb8a0bfef6a in WTF::FunctionWrapper<void (CoreIPC::Connection::*)()>::operator() (this=0x7fb834000980, c=0x19f8340) at WebKit/Source/WTF/wtf/Functional.h:218
Comment 2 Chris Dumez 2013-02-11 02:24:58 PST
Yes, babu is right.
Comment 3 Chris Dumez 2013-02-11 02:28:29 PST
1. WebPageProxy::processDidCrash() invalidates m_inspector
2. WebPageProxy::reattachToWebProcess() calls WebPageProxy::initializeWebPage()
3. WebPageProxy::initializeWebPage() uses m_inspector
4. WebPageProxy::reattachToWebProcess() initializes m_inspector

I believe that in WebPageProxy::reattachToWebProcess(), m_inspector should be initialized *BEFORE* calling WebPageProxy::initializeWebPage() since WebPageProxy::initializeWebPage() requires m_inspector to be initialized.
Comment 4 Chris Dumez 2013-02-11 02:40:50 PST
Created attachment 187531 [details]

This should fix the crash on UIProcess side.

The crash on WebProcess side is tracked via Bug 109409.
Comment 5 Chris Dumez 2013-02-11 02:42:04 PST
Created attachment 187532 [details]

Fix bug title.
Comment 6 Chris Dumez 2013-02-11 03:03:57 PST
Created attachment 187536 [details]
Comment 7 Chris Dumez 2013-02-11 03:05:42 PST
Created attachment 187537 [details]

Fix bug title.
Comment 8 Alexey Proskuryakov 2013-02-11 10:10:35 PST
Duplicate of bug 109305? That one also has a patch up for review.
Comment 9 Chris Dumez 2013-02-11 10:30:46 PST

*** This bug has been marked as a duplicate of bug 109305 ***