Bug 196104 - Prewarmed processes should be usable with any website data store
Summary: Prewarmed processes should be usable with any website data store
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords: InRadar
Depends on: 196451
Blocks:
  Show dependency treegraph
 
Reported: 2019-03-21 12:22 PDT by Chris Dumez
Modified: 2019-04-01 12:07 PDT (History)
10 users (show)

See Also:


Attachments
Patch (58.10 KB, patch)
2019-03-21 12:31 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (58.83 KB, patch)
2019-03-21 12:41 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (59.08 KB, patch)
2019-03-21 12:43 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews106 for mac-highsierra-wk2 (2.73 MB, application/zip)
2019-03-21 16:02 PDT, EWS Watchlist
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2019-03-21 12:22:41 PDT
Prewarmed processes should be usable with any website data store to avoid wasting them.
Comment 1 Chris Dumez 2019-03-21 12:31:22 PDT
Created attachment 365590 [details]
Patch
Comment 2 Chris Dumez 2019-03-21 12:41:13 PDT
Created attachment 365592 [details]
Patch
Comment 3 Chris Dumez 2019-03-21 12:43:17 PDT
Created attachment 365593 [details]
Patch
Comment 4 Chris Dumez 2019-03-21 13:30:44 PDT
Comment on attachment 365593 [details]
Patch

Will need to rebase.
Comment 5 Chris Dumez 2019-03-21 13:42:24 PDT
Comment on attachment 365593 [details]
Patch

Actually no need to rebase.
Comment 6 EWS Watchlist 2019-03-21 16:02:30 PDT
Comment on attachment 365593 [details]
Patch

Attachment 365593 [details] did not pass mac-wk2-ews (mac-wk2):
Output: https://webkit-queues.webkit.org/results/11605278

New failing tests:
imported/w3c/web-platform-tests/mediacapture-record/MediaRecorder-constructor.html
Comment 7 EWS Watchlist 2019-03-21 16:02:32 PDT
Created attachment 365632 [details]
Archive of layout-test-results from ews106 for mac-highsierra-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews106  Port: mac-highsierra-wk2  Platform: Mac OS X 10.13.6
Comment 8 Chris Dumez 2019-03-21 21:02:09 PDT
Comment on attachment 365632 [details]
Archive of layout-test-results from ews106 for mac-highsierra-wk2

Unrelated.
Comment 9 Chris Dumez 2019-03-22 10:01:20 PDT
Comment on attachment 365593 [details]
Patch

Clearing flags on attachment: 365593

Committed r243384: <https://trac.webkit.org/changeset/243384>
Comment 10 Chris Dumez 2019-03-22 10:01:21 PDT
All reviewed patches have been landed.  Closing bug.
Comment 11 Radar WebKit Bug Importer 2019-03-22 10:31:10 PDT
<rdar://problem/49158775>
Comment 12 Philippe Normand 2019-03-25 02:52:00 PDT
This patch broke GTK, there's quite a few crashes now, example backtrace:

#0  0x00007f433f1e39d0 in _ZN6WebKit16WebsiteDataStore29resolveDirectoriesIfNecessaryEv () from /home/slave/webkitgtk/gtk-linux-64-release/build/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#1  0x00007f433f1ec60a in _ZN6WebKit15WebProcessProxy24platformGetLaunchOptionsERNS_15ProcessLauncher13LaunchOptionsE () from /home/slave/webkitgtk/gtk-linux-64-release/build/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#2  0x00007f433f05a229 in _ZN6WebKit21AuxiliaryProcessProxy16getLaunchOptionsERNS_15ProcessLauncher13LaunchOptionsE () from /home/slave/webkitgtk/gtk-linux-64-release/build/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#3  0x00007f433f0e13a2 in _ZN6WebKit15WebProcessProxy16getLaunchOptionsERNS_15ProcessLauncher13LaunchOptionsE () from /home/slave/webkitgtk/gtk-linux-64-release/build/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#4  0x00007f433f05715b in _ZN6WebKit21AuxiliaryProcessProxy7connectEv () from /home/slave/webkitgtk/gtk-linux-64-release/build/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#5  0x00007f433f0d0a98 in _ZN6WebKit15WebProcessProxy6createERNS_14WebProcessPoolEPNS_16WebsiteDataStoreENS0_11IsPrewarmedENS0_19ShouldLaunchProcessE () from /home/slave/webkitgtk/gtk-linux-64-release/build/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#6  0x00007f433f0dd120 in _ZN6WebKit14WebProcessPool19createNewWebProcessEPNS_16WebsiteDataStoreENS_15WebProcessProxy11IsPrewarmedE () from /home/slave/webkitgtk/gtk-linux-64-release/build/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#7  0x00007f433f09afab in _ZN6WebKit12WebPageProxy21didFinishLoadForFrameEmmRKNS_8UserDataE () from /home/slave/webkitgtk/gtk-linux-64-release/build/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#8  0x00007f433eeb0ee2 in _ZN3IPC13handleMessageIN8Messages12WebPageProxy21DidFinishLoadForFrameEN6WebKit12WebPageProxyEMS5_FvmmRKNS4_8UserDataEEEEvRNS_7DecoderEPT0_T1_ () from /home/slave/webkitgtk/gtk-linux-64-release/build/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#9  0x00007f433eead38c in _ZN6WebKit12WebPageProxy17didReceiveMessageERN3IPC10ConnectionERNS1_7DecoderE () from /home/slave/webkitgtk/gtk-linux-64-release/build/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#10 0x00007f433efcfa89 in _ZN3IPC18MessageReceiverMap15dispatchMessageERNS_10ConnectionERNS_7DecoderE () from /home/slave/webkitgtk/gtk-linux-64-release/build/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#11 0x00007f433f0c5162 in _ZN6WebKit15WebProcessProxy17didReceiveMessageERN3IPC10ConnectionERNS1_7DecoderE () from /home/slave/webkitgtk/gtk-linux-64-release/build/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#12 0x00007f433efc849f in _ZN3IPC10Connection15dispatchMessageERNS_7DecoderE () from /home/slave/webkitgtk/gtk-linux-64-release/build/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#13 0x00007f433efc9d5b in _ZN3IPC10Connection15dispatchMessageESt10unique_ptrINS_7DecoderESt14default_deleteIS2_EE () from /home/slave/webkitgtk/gtk-linux-64-release/build/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#14 0x00007f433efcb2d3 in _ZN3IPC10Connection24dispatchIncomingMessagesEv () from /home/slave/webkitgtk/gtk-linux-64-release/build/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#15 0x0000564a59da73a8 in _ZN3WTF7RunLoop11performWorkEv ()
#16 0x0000564a59e05079 in _ZZN3WTF7RunLoopC4EvENUlPvE_4_FUNES1_ ()
#17 0x00007f433ca0165a in g_main_dispatch () at ../../Source/glib-2.58.1/glib/gmain.c:3182
#18 g_main_context_dispatch () at ../../Source/glib-2.58.1/glib/gmain.c:3847
#19 0x00007f433ca019e8 in g_main_context_iterate () at ../../Source/glib-2.58.1/glib/gmain.c:3920
#20 0x00007f433ca01d02 in g_main_loop_run () at ../../Source/glib-2.58.1/glib/gmain.c:4116
#21 0x0000564a59e05ac0 in _ZN3WTF7RunLoop3runEv ()
#22 0x0000564a59d8c7a2 in _ZN3WTR14TestController16platformRunUntilERbN3WTF7SecondsE ()
#23 0x0000564a59d733d1 in _ZN3WTR14TestInvocation6invokeEv ()
#24 0x0000564a59d60712 in _ZN3WTR14TestController7runTestEPKc ()
#25 0x0000564a59d60edb in _ZN3WTR14TestController20runTestingServerLoopEv ()
#26 0x0000564a59d61288 in _ZN3WTR14TestControllerC2EiPPKc ()
#27 0x0000564a59d54c41 in main ()
Comment 13 Philippe Normand 2019-03-25 03:28:43 PDT
STDERR: 
STDERR: warning: core file may not match specified executable file.
STDERR: ASSERTION FAILED: m_websiteDataStore
STDERR: ../../Source/WebKit/UIProcess/WebProcessProxy.h(124) : WebKit::WebsiteDataStore& WebKit::WebProcessProxy::websiteDataStore() const
STDERR: 1   0x55666d630ca4 /home/slave/webkitgtk/gtk-linux-64-debug-tests/build/WebKitBuild/Debug/bin/WebKitTestRunner(WTFCrash+0x9) [0x55666d630ca4]
STDERR: 2   0x7fec8ea8a1b6 /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Debug/lib/libwebkit2gtk-4.0.so.37(WebKit::WebProcessProxy::websiteDataStore() const+0x46) [0x7fec8ea8a1b6]
STDERR: 3   0x7fec8ee75a63 /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Debug/lib/libwebkit2gtk-4.0.so.37(WebKit::WebProcessProxy::platformGetLaunchOptions(WebKit::ProcessLauncher::LaunchOptions&)+0xbd) [0x7fec8ee75a63]
STDERR: 4   0x7fec8ea6c7f3 /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Debug/lib/libwebkit2gtk-4.0.so.37(WebKit::AuxiliaryProcessProxy::getLaunchOptions(WebKit::ProcessLauncher::LaunchOptions&)+0x1eb) [0x7fec8ea6c7f3]
STDERR: 5   0x7fec8eb8fb85 /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Debug/lib/libwebkit2gtk-4.0.so.37(WebKit::WebProcessProxy::getLaunchOptions(WebKit::ProcessLauncher::LaunchOptions&)+0x3f) [0x7fec8eb8fb85]
STDERR: 6   0x7fec8ea6c876 /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Debug/lib/libwebkit2gtk-4.0.so.37(WebKit::AuxiliaryProcessProxy::connect()+0x80) [0x7fec8ea6c876]
STDERR: 7   0x7fec8eb8f004 /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Debug/lib/libwebkit2gtk-4.0.so.37(WebKit::WebProcessProxy::create(WebKit::WebProcessPool&, WebKit::WebsiteDataStore*, WebKit::WebProcessProxy::IsPrewarmed, WebKit::WebProcessProxy::ShouldLaunchProcess)+0x6a) [0x7fec8eb8f004]
STDERR: 8   0x7fec8eb873a5 /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Debug/lib/libwebkit2gtk-4.0.so.37(WebKit::WebProcessPool::createNewWebProcess(WebKit::WebsiteDataStore*, WebKit::WebProcessProxy::IsPrewarmed)+0x31) [0x7fec8eb873a5]
STDERR: 9   0x7fec8eb884f4 /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Debug/lib/libwebkit2gtk-4.0.so.37(WebKit::WebProcessPool::prewarmProcess()+0x32) [0x7fec8eb884f4]
STDERR: 10  0x7fec8eb8a5ad /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Debug/lib/libwebkit2gtk-4.0.so.37(WebKit::WebProcessPool::didReachGoodTimeToPrewarm()+0x7f) [0x7fec8eb8a5ad]
STDERR: 11  0x7fec8eae9898 /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Debug/lib/libwebkit2gtk-4.0.so.37(WebKit::WebPageProxy::notifyProcessPoolToPrewarm()+0x2e) [0x7fec8eae9898]
STDERR: 12  0x7fec8eafadb0 /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Debug/lib/libwebkit2gtk-4.0.so.37(WebKit::WebPageProxy::didFinishLoadForFrame(unsigned long, unsigned long, WebKit::UserData const&)+0x466) [0x7fec8eafadb0]
STDERR: 13  0x7fec8e640ae0 /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Debug/lib/libwebkit2gtk-4.0.so.37(void IPC::callMemberFunctionImpl<WebKit::WebPageProxy, void (WebKit::WebPageProxy::*)(unsigned long, unsigned long, WebKit::UserData const&), std::tuple<unsigned long, unsigned long, WebKit::UserData>, 0ul, 1ul, 2ul>(WebKit::WebPageProxy*, void (WebKit::WebPageProxy::*)(unsigned long, unsigned long, WebKit::UserData const&), std::tuple<unsigned long, unsigned long, WebKit::UserData>&&, std::integer_sequence<unsigned long, 0ul, 1ul, 2ul>)+0xb6) [0x7fec8e640ae0]
STDERR: 14  0x7fec8e6331fc /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Debug/lib/libwebkit2gtk-4.0.so.37(void IPC::callMemberFunction<WebKit::WebPageProxy, void (WebKit::WebPageProxy::*)(unsigned long, unsigned long, WebKit::UserData const&), std::tuple<unsigned long, unsigned long, WebKit::UserData>, std::integer_sequence<unsigned long, 0ul, 1ul, 2ul> >(std::tuple<unsigned long, unsigned long, WebKit::UserData>&&, WebKit::WebPageProxy*, void (WebKit::WebPageProxy::*)(unsigned long, unsigned long, WebKit::UserData const&))+0x41) [0x7fec8e6331fc]
STDERR: 15  0x7fec8e622965 /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Debug/lib/libwebkit2gtk-4.0.so.37(void IPC::handleMessage<Messages::WebPageProxy::DidFinishLoadForFrame, WebKit::WebPageProxy, void (WebKit::WebPageProxy::*)(unsigned long, unsigned long, WebKit::UserData const&)>(IPC::Decoder&, WebKit::WebPageProxy*, void (WebKit::WebPageProxy::*)(unsigned long, unsigned long, WebKit::UserData const&))+0xa3) [0x7fec8e622965]
STDERR: 16  0x7fec8e614272 /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Debug/lib/libwebkit2gtk-4.0.so.37(WebKit::WebPageProxy::didReceiveMessage(IPC::Connection&, IPC::Decoder&)+0x2068) [0x7fec8e614272]
STDERR: 17  0x7fec8e9609ed /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Debug/lib/libwebkit2gtk-4.0.so.37(IPC::MessageReceiverMap::dispatchMessage(IPC::Connection&, IPC::Decoder&)+0x125) [0x7fec8e9609ed]
STDERR: 18  0x7fec8ea6cba1 /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Debug/lib/libwebkit2gtk-4.0.so.37(WebKit::AuxiliaryProcessProxy::dispatchMessage(IPC::Connection&, IPC::Decoder&)+0x2f) [0x7fec8ea6cba1]
STDERR: 19  0x7fec8eb91cf3 /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Debug/lib/libwebkit2gtk-4.0.so.37(WebKit::WebProcessProxy::didReceiveMessage(IPC::Connection&, IPC::Decoder&)+0x2b) [0x7fec8eb91cf3]
STDERR: 20  0x7fec8e93e994 /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Debug/lib/libwebkit2gtk-4.0.so.37(IPC::Connection::dispatchMessage(IPC::Decoder&)+0x184) [0x7fec8e93e994]
STDERR: 21  0x7fec8e93eb09 /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Debug/lib/libwebkit2gtk-4.0.so.37(IPC::Connection::dispatchMessage(std::unique_ptr<IPC::Decoder, std::default_delete<IPC::Decoder> >)+0x173) [0x7fec8e93eb09]
STDERR: 22  0x7fec8e93f1ea /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Debug/lib/libwebkit2gtk-4.0.so.37(IPC::Connection::dispatchIncomingMessages()+0x1dc) [0x7fec8e93f1ea]
STDERR: 23  0x7fec8e93e6c6 /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Debug/lib/libwebkit2gtk-4.0.so.37(+0x9e6a6c6) [0x7fec8e93e6c6]
STDERR: 24  0x7fec8e945bf6 /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Debug/lib/libwebkit2gtk-4.0.so.37(+0x9e71bf6) [0x7fec8e945bf6]
STDERR: 25  0x55666d5f0296 /home/slave/webkitgtk/gtk-linux-64-debug-tests/build/WebKitBuild/Debug/bin/WebKitTestRunner(WTF::Function<void ()>::operator()() const+0x5e) [0x55666d5f0296]
STDERR: 26  0x55666d66406e /home/slave/webkitgtk/gtk-linux-64-debug-tests/build/WebKitBuild/Debug/bin/WebKitTestRunner(WTF::RunLoop::performWork()+0xbc) [0x55666d66406e]
STDERR: 27  0x55666d6daee6 /home/slave/webkitgtk/gtk-linux-64-debug-tests/build/WebKitBuild/Debug/bin/WebKitTestRunner(+0x282ee6) [0x55666d6daee6]
STDERR: 28  0x55666d6daf0a /home/slave/webkitgtk/gtk-linux-64-debug-tests/build/WebKitBuild/Debug/bin/WebKitTestRunner(+0x282f0a) [0x55666d6daf0a]
STDERR: 29  0x55666d6dae86 /home/slave/webkitgtk/gtk-linux-64-debug-tests/build/WebKitBuild/Debug/bin/WebKitTestRunner(+0x282e86) [0x55666d6dae86]
STDERR: 30  0x55666d6daeb5 /home/slave/webkitgtk/gtk-linux-64-debug-tests/build/WebKitBuild/Debug/bin/WebKitTestRunner(+0x282eb5) [0x55666d6daeb5]
STDERR: 31  0x7fec8400765a /home/slave/webkitgtk/gtk-linux-64-debug-tests/build/WebKitBuild/DependenciesGTK/Root/lib/libglib-2.0.so.0(g_main_context_dispatch+0x13a) [0x7fec8400765a]
Comment 14 Chris Dumez 2019-03-25 08:20:56 PDT
(In reply to Philippe Normand from comment #13)
> STDERR: 
> STDERR: warning: core file may not match specified executable file.
> STDERR: ASSERTION FAILED: m_websiteDataStore
> STDERR: ../../Source/WebKit/UIProcess/WebProcessProxy.h(124) :
> WebKit::WebsiteDataStore& WebKit::WebProcessProxy::websiteDataStore() const
> STDERR: 1   0x55666d630ca4
> /home/slave/webkitgtk/gtk-linux-64-debug-tests/build/WebKitBuild/Debug/bin/
> WebKitTestRunner(WTFCrash+0x9) [0x55666d630ca4]
> STDERR: 2   0x7fec8ea8a1b6
> /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Debug/lib/
> libwebkit2gtk-4.0.so.37(WebKit::WebProcessProxy::websiteDataStore()
> const+0x46) [0x7fec8ea8a1b6]
> STDERR: 3   0x7fec8ee75a63
> /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Debug/lib/
> libwebkit2gtk-4.0.so.37(WebKit::WebProcessProxy::
> platformGetLaunchOptions(WebKit::ProcessLauncher::LaunchOptions&)+0xbd)
> [0x7fec8ee75a63]
> STDERR: 4   0x7fec8ea6c7f3
> /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Debug/lib/
> libwebkit2gtk-4.0.so.37(WebKit::AuxiliaryProcessProxy::
> getLaunchOptions(WebKit::ProcessLauncher::LaunchOptions&)+0x1eb)
> [0x7fec8ea6c7f3]
> STDERR: 5   0x7fec8eb8fb85
> /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Debug/lib/
> libwebkit2gtk-4.0.so.37(WebKit::WebProcessProxy::getLaunchOptions(WebKit::
> ProcessLauncher::LaunchOptions&)+0x3f) [0x7fec8eb8fb85]
> STDERR: 6   0x7fec8ea6c876
> /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Debug/lib/
> libwebkit2gtk-4.0.so.37(WebKit::AuxiliaryProcessProxy::connect()+0x80)
> [0x7fec8ea6c876]
> STDERR: 7   0x7fec8eb8f004
> /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Debug/lib/
> libwebkit2gtk-4.0.so.37(WebKit::WebProcessProxy::create(WebKit::
> WebProcessPool&, WebKit::WebsiteDataStore*,
> WebKit::WebProcessProxy::IsPrewarmed,
> WebKit::WebProcessProxy::ShouldLaunchProcess)+0x6a) [0x7fec8eb8f004]
> STDERR: 8   0x7fec8eb873a5
> /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Debug/lib/
> libwebkit2gtk-4.0.so.37(WebKit::WebProcessPool::createNewWebProcess(WebKit::
> WebsiteDataStore*, WebKit::WebProcessProxy::IsPrewarmed)+0x31)
> [0x7fec8eb873a5]
> STDERR: 9   0x7fec8eb884f4
> /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Debug/lib/
> libwebkit2gtk-4.0.so.37(WebKit::WebProcessPool::prewarmProcess()+0x32)
> [0x7fec8eb884f4]
> STDERR: 10  0x7fec8eb8a5ad
> /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Debug/lib/
> libwebkit2gtk-4.0.so.37(WebKit::WebProcessPool::
> didReachGoodTimeToPrewarm()+0x7f) [0x7fec8eb8a5ad]
> STDERR: 11  0x7fec8eae9898
> /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Debug/lib/
> libwebkit2gtk-4.0.so.37(WebKit::WebPageProxy::
> notifyProcessPoolToPrewarm()+0x2e) [0x7fec8eae9898]
> STDERR: 12  0x7fec8eafadb0
> /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Debug/lib/
> libwebkit2gtk-4.0.so.37(WebKit::WebPageProxy::didFinishLoadForFrame(unsigned
> long, unsigned long, WebKit::UserData const&)+0x466) [0x7fec8eafadb0]
> STDERR: 13  0x7fec8e640ae0
> /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Debug/lib/
> libwebkit2gtk-4.0.so.37(void
> IPC::callMemberFunctionImpl<WebKit::WebPageProxy, void
> (WebKit::WebPageProxy::*)(unsigned long, unsigned long, WebKit::UserData
> const&), std::tuple<unsigned long, unsigned long, WebKit::UserData>, 0ul,
> 1ul, 2ul>(WebKit::WebPageProxy*, void (WebKit::WebPageProxy::*)(unsigned
> long, unsigned long, WebKit::UserData const&), std::tuple<unsigned long,
> unsigned long, WebKit::UserData>&&, std::integer_sequence<unsigned long,
> 0ul, 1ul, 2ul>)+0xb6) [0x7fec8e640ae0]
> STDERR: 14  0x7fec8e6331fc
> /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Debug/lib/
> libwebkit2gtk-4.0.so.37(void IPC::callMemberFunction<WebKit::WebPageProxy,
> void (WebKit::WebPageProxy::*)(unsigned long, unsigned long,
> WebKit::UserData const&), std::tuple<unsigned long, unsigned long,
> WebKit::UserData>, std::integer_sequence<unsigned long, 0ul, 1ul, 2ul>
> >(std::tuple<unsigned long, unsigned long, WebKit::UserData>&&,
> WebKit::WebPageProxy*, void (WebKit::WebPageProxy::*)(unsigned long,
> unsigned long, WebKit::UserData const&))+0x41) [0x7fec8e6331fc]
> STDERR: 15  0x7fec8e622965
> /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Debug/lib/
> libwebkit2gtk-4.0.so.37(void
> IPC::handleMessage<Messages::WebPageProxy::DidFinishLoadForFrame,
> WebKit::WebPageProxy, void (WebKit::WebPageProxy::*)(unsigned long, unsigned
> long, WebKit::UserData const&)>(IPC::Decoder&, WebKit::WebPageProxy*, void
> (WebKit::WebPageProxy::*)(unsigned long, unsigned long, WebKit::UserData
> const&))+0xa3) [0x7fec8e622965]
> STDERR: 16  0x7fec8e614272
> /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Debug/lib/
> libwebkit2gtk-4.0.so.37(WebKit::WebPageProxy::didReceiveMessage(IPC::
> Connection&, IPC::Decoder&)+0x2068) [0x7fec8e614272]
> STDERR: 17  0x7fec8e9609ed
> /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Debug/lib/
> libwebkit2gtk-4.0.so.37(IPC::MessageReceiverMap::dispatchMessage(IPC::
> Connection&, IPC::Decoder&)+0x125) [0x7fec8e9609ed]
> STDERR: 18  0x7fec8ea6cba1
> /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Debug/lib/
> libwebkit2gtk-4.0.so.37(WebKit::AuxiliaryProcessProxy::dispatchMessage(IPC::
> Connection&, IPC::Decoder&)+0x2f) [0x7fec8ea6cba1]
> STDERR: 19  0x7fec8eb91cf3
> /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Debug/lib/
> libwebkit2gtk-4.0.so.37(WebKit::WebProcessProxy::didReceiveMessage(IPC::
> Connection&, IPC::Decoder&)+0x2b) [0x7fec8eb91cf3]
> STDERR: 20  0x7fec8e93e994
> /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Debug/lib/
> libwebkit2gtk-4.0.so.37(IPC::Connection::dispatchMessage(IPC::
> Decoder&)+0x184) [0x7fec8e93e994]
> STDERR: 21  0x7fec8e93eb09
> /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Debug/lib/
> libwebkit2gtk-4.0.so.37(IPC::Connection::dispatchMessage(std::unique_ptr<IPC:
> :Decoder, std::default_delete<IPC::Decoder> >)+0x173) [0x7fec8e93eb09]
> STDERR: 22  0x7fec8e93f1ea
> /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Debug/lib/
> libwebkit2gtk-4.0.so.37(IPC::Connection::dispatchIncomingMessages()+0x1dc)
> [0x7fec8e93f1ea]
> STDERR: 23  0x7fec8e93e6c6
> /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Debug/lib/
> libwebkit2gtk-4.0.so.37(+0x9e6a6c6) [0x7fec8e93e6c6]
> STDERR: 24  0x7fec8e945bf6
> /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Debug/lib/
> libwebkit2gtk-4.0.so.37(+0x9e71bf6) [0x7fec8e945bf6]
> STDERR: 25  0x55666d5f0296
> /home/slave/webkitgtk/gtk-linux-64-debug-tests/build/WebKitBuild/Debug/bin/
> WebKitTestRunner(WTF::Function<void ()>::operator()() const+0x5e)
> [0x55666d5f0296]
> STDERR: 26  0x55666d66406e
> /home/slave/webkitgtk/gtk-linux-64-debug-tests/build/WebKitBuild/Debug/bin/
> WebKitTestRunner(WTF::RunLoop::performWork()+0xbc) [0x55666d66406e]
> STDERR: 27  0x55666d6daee6
> /home/slave/webkitgtk/gtk-linux-64-debug-tests/build/WebKitBuild/Debug/bin/
> WebKitTestRunner(+0x282ee6) [0x55666d6daee6]
> STDERR: 28  0x55666d6daf0a
> /home/slave/webkitgtk/gtk-linux-64-debug-tests/build/WebKitBuild/Debug/bin/
> WebKitTestRunner(+0x282f0a) [0x55666d6daf0a]
> STDERR: 29  0x55666d6dae86
> /home/slave/webkitgtk/gtk-linux-64-debug-tests/build/WebKitBuild/Debug/bin/
> WebKitTestRunner(+0x282e86) [0x55666d6dae86]
> STDERR: 30  0x55666d6daeb5
> /home/slave/webkitgtk/gtk-linux-64-debug-tests/build/WebKitBuild/Debug/bin/
> WebKitTestRunner(+0x282eb5) [0x55666d6daeb5]
> STDERR: 31  0x7fec8400765a
> /home/slave/webkitgtk/gtk-linux-64-debug-tests/build/WebKitBuild/
> DependenciesGTK/Root/lib/libglib-2.0.so.0(g_main_context_dispatch+0x13a)
> [0x7fec8400765a]


You should not assume that a WebProcessProxy has a websiteDataStore when it launches. The WebsiteDataStore gets set later. I am unsure why the GTK port needs to know about the WebsiteDataStore to figure out the launch parameters of the WebProcess. You either need to stop doing that or you need to stop delaying the setting of the WebsiteDataStore on the GTK port. I would not recommend the latter option since it is bad for perf and it would make your port different from others.
Comment 15 Philippe Normand 2019-03-25 08:47:49 PDT
The "offending" bits:

https://trac.webkit.org/browser/webkit/trunk/Source/WebKit/UIProcess/glib/WebProcessProxyGLib.cpp#L44

Michael, Carlos, any idea?
Comment 16 Chris Dumez 2019-03-25 09:16:11 PDT
(In reply to Philippe Normand from comment #15)
> The "offending" bits:
> 
> https://trac.webkit.org/browser/webkit/trunk/Source/WebKit/UIProcess/glib/
> WebProcessProxyGLib.cpp#L44
> 
> Michael, Carlos, any idea?

Odd, every port used to pass applicationCacheDirectory via Initialization parameters, and now pass it later via WebsiteDataStore parameters. For some reason, GTK passes it with the launchParameters. Hopefully, that code can be refactored to do whatever works needs to be done with the applicationCacheDirectory happen later, after launch.
Comment 17 Michael Catanzaro 2019-03-25 09:28:54 PDT
So the problem is these two lines of code in WebProcessProxy::platformGetLaunchOptions?

websiteDataStore().resolveDirectoriesIfNecessary();	    launchOptions.extraInitializationData.set("applicationCacheDirectory", websiteDataStore().resolvedApplicationCacheDirectory());

It's there to be used in bubblewrapSpawn() in BubblewrapLauncher.cpp. Patrick might know why it's done this way. (Why is it different from other website data locations?)
Comment 18 Chris Dumez 2019-03-25 09:46:07 PDT
(In reply to Philippe Normand from comment #13)
> STDERR: 
> STDERR: warning: core file may not match specified executable file.
> STDERR: ASSERTION FAILED: m_websiteDataStore
> STDERR: ../../Source/WebKit/UIProcess/WebProcessProxy.h(124) :
> WebKit::WebsiteDataStore& WebKit::WebProcessProxy::websiteDataStore() const
> STDERR: 1   0x55666d630ca4
> /home/slave/webkitgtk/gtk-linux-64-debug-tests/build/WebKitBuild/Debug/bin/
> WebKitTestRunner(WTFCrash+0x9) [0x55666d630ca4]
> STDERR: 2   0x7fec8ea8a1b6
> /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Debug/lib/
> libwebkit2gtk-4.0.so.37(WebKit::WebProcessProxy::websiteDataStore()
> const+0x46) [0x7fec8ea8a1b6]
> STDERR: 3   0x7fec8ee75a63
> /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Debug/lib/
> libwebkit2gtk-4.0.so.37(WebKit::WebProcessProxy::
> platformGetLaunchOptions(WebKit::ProcessLauncher::LaunchOptions&)+0xbd)
> [0x7fec8ee75a63]
> STDERR: 4   0x7fec8ea6c7f3
> /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Debug/lib/
> libwebkit2gtk-4.0.so.37(WebKit::AuxiliaryProcessProxy::
> getLaunchOptions(WebKit::ProcessLauncher::LaunchOptions&)+0x1eb)
> [0x7fec8ea6c7f3]
> STDERR: 5   0x7fec8eb8fb85
> /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Debug/lib/
> libwebkit2gtk-4.0.so.37(WebKit::WebProcessProxy::getLaunchOptions(WebKit::
> ProcessLauncher::LaunchOptions&)+0x3f) [0x7fec8eb8fb85]
> STDERR: 6   0x7fec8ea6c876
> /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Debug/lib/
> libwebkit2gtk-4.0.so.37(WebKit::AuxiliaryProcessProxy::connect()+0x80)
> [0x7fec8ea6c876]
> STDERR: 7   0x7fec8eb8f004
> /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Debug/lib/
> libwebkit2gtk-4.0.so.37(WebKit::WebProcessProxy::create(WebKit::
> WebProcessPool&, WebKit::WebsiteDataStore*,
> WebKit::WebProcessProxy::IsPrewarmed,
> WebKit::WebProcessProxy::ShouldLaunchProcess)+0x6a) [0x7fec8eb8f004]
> STDERR: 8   0x7fec8eb873a5
> /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Debug/lib/
> libwebkit2gtk-4.0.so.37(WebKit::WebProcessPool::createNewWebProcess(WebKit::
> WebsiteDataStore*, WebKit::WebProcessProxy::IsPrewarmed)+0x31)
> [0x7fec8eb873a5]
> STDERR: 9   0x7fec8eb884f4
> /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Debug/lib/
> libwebkit2gtk-4.0.so.37(WebKit::WebProcessPool::prewarmProcess()+0x32)
> [0x7fec8eb884f4]
> STDERR: 10  0x7fec8eb8a5ad
> /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Debug/lib/
> libwebkit2gtk-4.0.so.37(WebKit::WebProcessPool::
> didReachGoodTimeToPrewarm()+0x7f) [0x7fec8eb8a5ad]
> STDERR: 11  0x7fec8eae9898
> /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Debug/lib/
> libwebkit2gtk-4.0.so.37(WebKit::WebPageProxy::
> notifyProcessPoolToPrewarm()+0x2e) [0x7fec8eae9898]
> STDERR: 12  0x7fec8eafadb0
> /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Debug/lib/
> libwebkit2gtk-4.0.so.37(WebKit::WebPageProxy::didFinishLoadForFrame(unsigned
> long, unsigned long, WebKit::UserData const&)+0x466) [0x7fec8eafadb0]
> STDERR: 13  0x7fec8e640ae0
> /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Debug/lib/
> libwebkit2gtk-4.0.so.37(void
> IPC::callMemberFunctionImpl<WebKit::WebPageProxy, void
> (WebKit::WebPageProxy::*)(unsigned long, unsigned long, WebKit::UserData
> const&), std::tuple<unsigned long, unsigned long, WebKit::UserData>, 0ul,
> 1ul, 2ul>(WebKit::WebPageProxy*, void (WebKit::WebPageProxy::*)(unsigned
> long, unsigned long, WebKit::UserData const&), std::tuple<unsigned long,
> unsigned long, WebKit::UserData>&&, std::integer_sequence<unsigned long,
> 0ul, 1ul, 2ul>)+0xb6) [0x7fec8e640ae0]
> STDERR: 14  0x7fec8e6331fc
> /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Debug/lib/
> libwebkit2gtk-4.0.so.37(void IPC::callMemberFunction<WebKit::WebPageProxy,
> void (WebKit::WebPageProxy::*)(unsigned long, unsigned long,
> WebKit::UserData const&), std::tuple<unsigned long, unsigned long,
> WebKit::UserData>, std::integer_sequence<unsigned long, 0ul, 1ul, 2ul>
> >(std::tuple<unsigned long, unsigned long, WebKit::UserData>&&,
> WebKit::WebPageProxy*, void (WebKit::WebPageProxy::*)(unsigned long,
> unsigned long, WebKit::UserData const&))+0x41) [0x7fec8e6331fc]
> STDERR: 15  0x7fec8e622965
> /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Debug/lib/
> libwebkit2gtk-4.0.so.37(void
> IPC::handleMessage<Messages::WebPageProxy::DidFinishLoadForFrame,
> WebKit::WebPageProxy, void (WebKit::WebPageProxy::*)(unsigned long, unsigned
> long, WebKit::UserData const&)>(IPC::Decoder&, WebKit::WebPageProxy*, void
> (WebKit::WebPageProxy::*)(unsigned long, unsigned long, WebKit::UserData
> const&))+0xa3) [0x7fec8e622965]
> STDERR: 16  0x7fec8e614272
> /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Debug/lib/
> libwebkit2gtk-4.0.so.37(WebKit::WebPageProxy::didReceiveMessage(IPC::
> Connection&, IPC::Decoder&)+0x2068) [0x7fec8e614272]
> STDERR: 17  0x7fec8e9609ed
> /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Debug/lib/
> libwebkit2gtk-4.0.so.37(IPC::MessageReceiverMap::dispatchMessage(IPC::
> Connection&, IPC::Decoder&)+0x125) [0x7fec8e9609ed]
> STDERR: 18  0x7fec8ea6cba1
> /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Debug/lib/
> libwebkit2gtk-4.0.so.37(WebKit::AuxiliaryProcessProxy::dispatchMessage(IPC::
> Connection&, IPC::Decoder&)+0x2f) [0x7fec8ea6cba1]
> STDERR: 19  0x7fec8eb91cf3
> /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Debug/lib/
> libwebkit2gtk-4.0.so.37(WebKit::WebProcessProxy::didReceiveMessage(IPC::
> Connection&, IPC::Decoder&)+0x2b) [0x7fec8eb91cf3]
> STDERR: 20  0x7fec8e93e994
> /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Debug/lib/
> libwebkit2gtk-4.0.so.37(IPC::Connection::dispatchMessage(IPC::
> Decoder&)+0x184) [0x7fec8e93e994]
> STDERR: 21  0x7fec8e93eb09
> /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Debug/lib/
> libwebkit2gtk-4.0.so.37(IPC::Connection::dispatchMessage(std::unique_ptr<IPC:
> :Decoder, std::default_delete<IPC::Decoder> >)+0x173) [0x7fec8e93eb09]
> STDERR: 22  0x7fec8e93f1ea
> /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Debug/lib/
> libwebkit2gtk-4.0.so.37(IPC::Connection::dispatchIncomingMessages()+0x1dc)
> [0x7fec8e93f1ea]
> STDERR: 23  0x7fec8e93e6c6
> /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Debug/lib/
> libwebkit2gtk-4.0.so.37(+0x9e6a6c6) [0x7fec8e93e6c6]
> STDERR: 24  0x7fec8e945bf6
> /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Debug/lib/
> libwebkit2gtk-4.0.so.37(+0x9e71bf6) [0x7fec8e945bf6]
> STDERR: 25  0x55666d5f0296
> /home/slave/webkitgtk/gtk-linux-64-debug-tests/build/WebKitBuild/Debug/bin/
> WebKitTestRunner(WTF::Function<void ()>::operator()() const+0x5e)
> [0x55666d5f0296]
> STDERR: 26  0x55666d66406e
> /home/slave/webkitgtk/gtk-linux-64-debug-tests/build/WebKitBuild/Debug/bin/
> WebKitTestRunner(WTF::RunLoop::performWork()+0xbc) [0x55666d66406e]
> STDERR: 27  0x55666d6daee6
> /home/slave/webkitgtk/gtk-linux-64-debug-tests/build/WebKitBuild/Debug/bin/
> WebKitTestRunner(+0x282ee6) [0x55666d6daee6]
> STDERR: 28  0x55666d6daf0a
> /home/slave/webkitgtk/gtk-linux-64-debug-tests/build/WebKitBuild/Debug/bin/
> WebKitTestRunner(+0x282f0a) [0x55666d6daf0a]
> STDERR: 29  0x55666d6dae86
> /home/slave/webkitgtk/gtk-linux-64-debug-tests/build/WebKitBuild/Debug/bin/
> WebKitTestRunner(+0x282e86) [0x55666d6dae86]
> STDERR: 30  0x55666d6daeb5
> /home/slave/webkitgtk/gtk-linux-64-debug-tests/build/WebKitBuild/Debug/bin/
> WebKitTestRunner(+0x282eb5) [0x55666d6daeb5]
> STDERR: 31  0x7fec8400765a
> /home/slave/webkitgtk/gtk-linux-64-debug-tests/build/WebKitBuild/
> DependenciesGTK/Root/lib/libglib-2.0.so.0(g_main_context_dispatch+0x13a)
> [0x7fec8400765a]

I am confused why you're not returning early here:
void WebProcessPool::didReachGoodTimeToPrewarm()
{
    if (!configuration().isAutomaticProcessWarmingEnabled() || !configuration().processSwapsOnNavigation() || usesSingleWebProcess())
        return;

processSwapsOnNavigation should be disabled for GTK port AFAIK.

In any case, having configuration().isAutomaticProcessWarmingEnabled() return false on GTK port for now would fix your crashes I believe. Process pre-warming is the only case where we do not know which data store to use upon launch.