Bug 180867

Summary: imported/w3c/web-platform-tests/service-workers/service-worker/update.https.html is sometimes crashing in Debug builds
Product: WebKit Reporter: youenn fablet <youennf>
Component: Service WorkersAssignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: beidson, cdumez, commit-queue, jlewis3, ryanhaddad, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

youenn fablet
Reported 2017-12-15 10:03:55 PST
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 com.apple.JavaScriptCore 0x000000011a2dce04 WTFCrash + 36 (Assertions.cpp:272) 1 com.apple.WebCore 0x000000010ddc4fa5 WebCore::SWServer::runServiceWorker(WTF::ObjectIdentifier<WebCore::ServiceWorkerIdentifierType>) + 213 (SWServer.cpp:521) 2 com.apple.WebCore 0x000000010ddc5365 WebCore::SWServer::runServiceWorkerIfNecessary(WTF::ObjectIdentifier<WebCore::ServiceWorkerIdentifierType>, WTF::Function<void (bool, WebCore::SWServerToContextConnection&)>&&) + 309 (SWServer.cpp:506) 3 com.apple.WebKit 0x00000001070cff84 WebKit::WebSWServerConnection::startFetch(unsigned long long, WTF::ObjectIdentifier<WebCore::ServiceWorkerIdentifierType>, WebCore::ResourceRequest&&, WebCore::FetchOptions&&, IPC::FormDataReference&&) + 308 (WebSWServerConnection.cpp:127) 4 com.apple.WebKit 0x00000001070e6618 void IPC::callMemberFunctionImpl<WebKit::WebSWServerConnection, void (WebKit::WebSWServerConnection::*)(unsigned long long, WTF::ObjectIdentifier<WebCore::ServiceWorkerIdentifierType>, WebCore::ResourceRequest&&, WebCore::FetchOptions&&, IPC::FormDataReference&&), std::__1::tuple<unsigned long long, WTF::ObjectIdentifier<WebCore::ServiceWorkerIdentifierType>, WebCore::ResourceRequest, WebCore::FetchOptions, IPC::FormDataReference>, 0ul, 1ul, 2ul, 3ul, 4ul>(WebKit::WebSWServerConnection*, void (WebKit::WebSWServerConnection::*)(unsigned long long, WTF::ObjectIdentifier<WebCore::ServiceWorkerIdentifierType>, WebCore::ResourceRequest&&, WebCore::FetchOptions&&, IPC::FormDataReference&&), std::__1::tuple<unsigned long long, WTF::ObjectIdentifier<WebCore::ServiceWorkerIdentifierType>, WebCore::ResourceRequest, WebCore::FetchOptions, IPC::FormDataReference>&&, std::__1::integer_sequence<unsigned long, 0ul, 1ul, 2ul, 3ul, 4ul>) + 376 (HandleMessage.h:41) 5 com.apple.WebKit 0x00000001070e6108 void IPC::callMemberFunction<WebKit::WebSWServerConnection, void (WebKit::WebSWServerConnection::*)(unsigned long long, WTF::ObjectIdentifier<WebCore::ServiceWorkerIdentifierType>, WebCore::ResourceRequest&&, WebCore::FetchOptions&&, IPC::FormDataReference&&), std::__1::tuple<unsigned long long, WTF::ObjectIdentifier<WebCore::ServiceWorkerIdentifierType>, WebCore::ResourceRequest, WebCore::FetchOptions, IPC::FormDataReference>, std::__1::integer_sequence<unsigned long, 0ul, 1ul, 2ul, 3ul, 4ul> >(std::__1::tuple<unsigned long long, WTF::ObjectIdentifier<WebCore::ServiceWorkerIdentifierType>, WebCore::ResourceRequest, WebCore::FetchOptions, IPC::FormDataReference>&&, WebKit::WebSWServerConnection*, void (WebKit::WebSWServerConnection::*)(unsigned long long, WTF::ObjectIdentifier<WebCore::ServiceWorkerIdentifierType>, WebCore::ResourceRequest&&, WebCore::FetchOptions&&, IPC::FormDataReference&&)) + 88 (HandleMessage.h:47) 6 com.apple.WebKit 0x00000001070e3337 void IPC::handleMessage<Messages::WebSWServerConnection::StartFetch, WebKit::WebSWServerConnection, void (WebKit::WebSWServerConnection::*)(unsigned long long, WTF::ObjectIdentifier<WebCore::ServiceWorkerIdentifierType>, WebCore::ResourceRequest&&, WebCore::FetchOptions&&, IPC::FormDataReference&&)>(IPC::Decoder&, WebKit::WebSWServerConnection*, void (WebKit::WebSWServerConnection::*)(unsigned long long, WTF::ObjectIdentifier<WebCore::ServiceWorkerIdentifierType>, WebCore::ResourceRequest&&, WebCore::FetchOptions&&, IPC::FormDataReference&&)) + 471 (HandleMessage.h:127) 7 com.apple.WebKit 0x00000001070e274c WebKit::WebSWServerConnection::didReceiveMessage(IPC::Connection&, IPC::Decoder&) + 636 (WebSWServerConnectionMessageReceiver.cpp:73) 8 com.apple.WebKit 0x0000000106a116c3 WebKit::StorageToWebProcessConnection::didReceiveMessage(IPC::Connection&, IPC::Decoder&) + 851 (StorageToWebProcessConnection.cpp:91) 9 com.apple.WebKit 0x0000000106552373 IPC::Connection::dispatchMessage(IPC::Decoder&) + 51 (Connection.cpp:902) 10 com.apple.WebKit 0x0000000106549778 IPC::Connection::dispatchMessage(std::__1::unique_ptr<IPC::Decoder, std::__1::default_delete<IPC::Decoder> >) + 712 (Connection.cpp:930) 11 com.apple.WebKit 0x0000000106552970 IPC::Connection::dispatchOneMessage() + 1520 (Connection.cpp:959)
Attachments
Patch (1.57 KB, patch)
2017-12-15 10:22 PST, Chris Dumez
no flags
Chris Dumez
Comment 2 2017-12-15 10:18:14 PST
Hitting this assertion: auto addResult = m_runningOrTerminatingWorkers.add(identifier, *worker); ASSERT_UNUSED(addResult, addResult.isNewEntry);
Chris Dumez
Comment 3 2017-12-15 10:19:53 PST
(In reply to Chris Dumez from comment #2) > Hitting this assertion: > auto addResult = m_runningOrTerminatingWorkers.add(identifier, *worker); > ASSERT_UNUSED(addResult, addResult.isNewEntry); I believe the assertion is wrong. It is possible for the worker to be already in m_runningOrTerminatingWorkers but its state is Terminating (not Running).
Chris Dumez
Comment 4 2017-12-15 10:22:55 PST
WebKit Commit Bot
Comment 5 2017-12-15 11:57:05 PST
Comment on attachment 329496 [details] Patch Clearing flags on attachment: 329496 Committed r225976: <https://trac.webkit.org/changeset/225976>
WebKit Commit Bot
Comment 6 2017-12-15 11:57:07 PST
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 7 2017-12-15 11:58:25 PST
Note You need to log in before you can comment on or make changes to this bug.