Bug 210044 - SWServer should not run a service worker that is terminating
Summary: SWServer should not run a service worker that is terminating
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Service Workers (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: youenn fablet
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-04-06 04:50 PDT by youenn fablet
Modified: 2020-04-10 03:51 PDT (History)
2 users (show)

See Also:


Attachments
Patch (6.18 KB, patch)
2020-04-06 05:05 PDT, youenn fablet
no flags Details | Formatted Diff | Diff
Patch (18.25 KB, patch)
2020-04-06 06:16 PDT, youenn fablet
no flags Details | Formatted Diff | Diff
Patch (18.27 KB, patch)
2020-04-07 04:46 PDT, youenn fablet
no flags Details | Formatted Diff | Diff
Patch (18.36 KB, patch)
2020-04-07 06:37 PDT, youenn fablet
no flags Details | Formatted Diff | Diff
Patch (18.43 KB, patch)
2020-04-07 07:40 PDT, youenn fablet
no flags Details | Formatted Diff | Diff
Patch (18.43 KB, patch)
2020-04-07 08:23 PDT, youenn fablet
no flags Details | Formatted Diff | Diff
Patch for landing (18.38 KB, patch)
2020-04-10 00:39 PDT, youenn fablet
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description youenn fablet 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**)
Comment 1 youenn fablet 2020-04-06 05:05:07 PDT
Created attachment 395558 [details]
Patch
Comment 2 youenn fablet 2020-04-06 06:16:28 PDT
Created attachment 395560 [details]
Patch
Comment 3 youenn fablet 2020-04-07 04:46:06 PDT
Created attachment 395670 [details]
Patch
Comment 4 youenn fablet 2020-04-07 06:37:00 PDT
Created attachment 395673 [details]
Patch
Comment 5 youenn fablet 2020-04-07 07:40:37 PDT
Created attachment 395679 [details]
Patch
Comment 6 youenn fablet 2020-04-07 08:23:09 PDT
Created attachment 395684 [details]
Patch
Comment 7 Chris Dumez 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
Comment 8 youenn fablet 2020-04-10 00:39:28 PDT
Created attachment 396061 [details]
Patch for landing
Comment 9 EWS 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].
Comment 10 Radar WebKit Bug Importer 2020-04-10 03:51:13 PDT
<rdar://problem/61576626>