RESOLVED FIXED 210044
SWServer should not run a service worker that is terminating
https://bugs.webkit.org/show_bug.cgi?id=210044
Summary SWServer should not run a service worker that is terminating
youenn fablet
Reported 2020-04-06 04:50:25 PDT
SWServer should not run a service worker that is terminating Otherwise https://build.webkit.org/results/Apple%20iOS%2013%20Simulator%20Debug%20WK2%20(Tests)/r259556%20(2976)/http/wpt/service-workers/service-worker-spinning-fetch.https-crash-log.txt ASSERTION FAILED: result.isNewEntry ./workers/service/context/SWContextManager.cpp(61) : void WebCore::SWContextManager::registerServiceWorkerThreadForInstall(Ref<WebCore::ServiceWorkerThreadProxy> &&) 1 0x2cc9dcc09 WTFCrash 2 0x2d1e434cb WTFCrashWithInfo(int, char const*, char const*, int) 3 0x2d6337f75 WebCore::SWContextManager::registerServiceWorkerThreadForInstall(WTF::Ref<WebCore::ServiceWorkerThreadProxy, WTF::DumbPtrTraits<WebCore::ServiceWorkerThreadProxy> >&&) 4 0x2b95974e0 WebKit::WebSWContextManagerConnection::installServiceWorker(WebCore::ServiceWorkerContextData const&, WTF::String&&) 5 0x2b9bc5bb9 void IPC::callMemberFunctionImpl<WebKit::WebSWContextManagerConnection, void (WebKit::WebSWContextManagerConnection::*)(WebCore::ServiceWorkerContextData const&, WTF::String&&), std::__1::tuple<WebCore::ServiceWorkerContextData, WTF::String>, 0ul, 1ul>(WebKit::WebSWContextManagerConnection*, void (WebKit::WebSWContextManagerConnection::*)(WebCore::ServiceWorkerContextData const&, WTF::String&&), std::__1::tuple<WebCore::ServiceWorkerContextData, WTF::String>&&, std::__1::integer_sequence<unsigned long, 0ul, 1ul>) 6 0x2b9bbf570 void IPC::callMemberFunction<WebKit::WebSWContextManagerConnection, void (WebKit::WebSWContextManagerConnection::*)(WebCore::ServiceWorkerContextData const&, WTF::String&&), std::__1::tuple<WebCore::ServiceWorkerContextData, WTF::String>, std::__1::integer_sequence<unsigned long, 0ul, 1ul> >(std::__1::tuple<WebCore::ServiceWorkerContextData, WTF::String>&&, WebKit::WebSWContextManagerConnection*, void (WebKit::WebSWContextManagerConnection::*)(WebCore::ServiceWorkerContextData const&, WTF::String&&)) 7 0x2b9bbe91e void IPC::handleMessage<Messages::WebSWContextManagerConnection::InstallServiceWorker, WebKit::WebSWContextManagerConnection, void (WebKit::WebSWContextManagerConnection::*)(WebCore::ServiceWorkerContextData const&, WTF::String&&)>(IPC::Decoder&, WebKit::WebSWContextManagerConnection*, void (WebKit::WebSWContextManagerConnection::*)(WebCore::ServiceWorkerContextData const&, WTF::String&&)) 8 0x2b9bbe125 WebKit::WebSWContextManagerConnection::didReceiveMessage(IPC::Connection&, IPC::Decoder&) 9 0x2b951b9f2 WebKit::NetworkProcessConnection::didReceiveMessage(IPC::Connection&, IPC::Decoder&) 10 0x2b8119de9 IPC::Connection::dispatchMessage(IPC::Decoder&) 11 0x2b811a742 IPC::Connection::dispatchMessage(std::__1::unique_ptr<IPC::Decoder, std::__1::default_delete<IPC::Decoder> >) 12 0x2b811ae20 IPC::Connection::dispatchOneIncomingMessage() 13 0x2b8139a8e IPC::Connection::enqueueIncomingMessage(std::__1::unique_ptr<IPC::Decoder, std::__1::default_delete<IPC::Decoder> >)::$_7::operator()() 14 0x2b813999e WTF::Detail::CallableWrapper<IPC::Connection::enqueueIncomingMessage(std::__1::unique_ptr<IPC::Decoder, std::__1::default_delete<IPC::Decoder> >)::$_7, void>::call() 15 0x2cca08062 WTF::Function<void ()>::operator()() const 16 0x2cca7e6d8 WTF::RunLoop::performWork() 17 0x2cca7fe61 WTF::RunLoop::performWork(void*) 18 0x2c4213c71 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ 19 0x2c4213b9c __CFRunLoopDoSource0 20 0x2c4213374 __CFRunLoopDoSources0 21 0x2c420df6e __CFRunLoopRun 22 0x2c420d884 CFRunLoopRunSpecific 23 0x1011ec831 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] 24 0x1011eca45 -[NSRunLoop(NSRunLoop) run] 25 0x2c5e605ae _xpc_objc_main 26 0x2c5e62976 xpc_main 27 0x2b888427b WebKit::XPCServiceMain(int, char const**)
Attachments
Patch (6.18 KB, patch)
2020-04-06 05:05 PDT, youenn fablet
no flags
Patch (18.25 KB, patch)
2020-04-06 06:16 PDT, youenn fablet
no flags
Patch (18.27 KB, patch)
2020-04-07 04:46 PDT, youenn fablet
no flags
Patch (18.36 KB, patch)
2020-04-07 06:37 PDT, youenn fablet
no flags
Patch (18.43 KB, patch)
2020-04-07 07:40 PDT, youenn fablet
no flags
Patch (18.43 KB, patch)
2020-04-07 08:23 PDT, youenn fablet
no flags
Patch for landing (18.38 KB, patch)
2020-04-10 00:39 PDT, youenn fablet
no flags
youenn fablet
Comment 1 2020-04-06 05:05:07 PDT
youenn fablet
Comment 2 2020-04-06 06:16:28 PDT
youenn fablet
Comment 3 2020-04-07 04:46:06 PDT
youenn fablet
Comment 4 2020-04-07 06:37:00 PDT
youenn fablet
Comment 5 2020-04-07 07:40:37 PDT
youenn fablet
Comment 6 2020-04-07 08:23:09 PDT
Chris Dumez
Comment 7 2020-04-08 10:18:16 PDT
Comment on attachment 395684 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=395684&action=review > Source/WebCore/ChangeLog:10 > + Also, if the service worker is not able toterminate properly, we will kill the service worker process so there is no reason typo: toterminate
youenn fablet
Comment 8 2020-04-10 00:39:28 PDT
Created attachment 396061 [details] Patch for landing
EWS
Comment 9 2020-04-10 03:50:40 PDT
Committed r259859: <https://trac.webkit.org/changeset/259859> All reviewed patches have been landed. Closing bug and clearing flags on attachment 396061 [details].
Radar WebKit Bug Importer
Comment 10 2020-04-10 03:51:13 PDT
Note You need to log in before you can comment on or make changes to this bug.