Bug 183626 - Reduce use of SWServerToContextConnection::globalServerToContextConnection()
Summary: Reduce use of SWServerToContextConnection::globalServerToContextConnection()
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: Chris Dumez
URL:
Keywords: InRadar
Depends on:
Blocks: 183600
  Show dependency treegraph
 
Reported: 2018-03-13 20:14 PDT by Chris Dumez
Modified: 2018-03-15 09:18 PDT (History)
5 users (show)

See Also:


Attachments
Patch (21.23 KB, patch)
2018-03-14 09:37 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (22.54 KB, patch)
2018-03-14 10:35 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (22.68 KB, patch)
2018-03-14 14:37 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (22.62 KB, patch)
2018-03-14 14:54 PDT, 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 2018-03-13 20:14:41 PDT
Reduce use of SWServerToContextConnection::globalServerToContextConnection() as we are moving towards having multiple context connections.
Comment 1 Chris Dumez 2018-03-14 09:37:00 PDT
Created attachment 335776 [details]
Patch
Comment 2 Chris Dumez 2018-03-14 10:35:13 PDT
Created attachment 335779 [details]
Patch
Comment 3 youenn fablet 2018-03-14 13:24:12 PDT
Comment on attachment 335779 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=335779&action=review

> Source/WebKit/StorageProcess/ServiceWorker/WebSWServerConnection.cpp:202
> +    server().runServiceWorkerIfNecessary(destinationIdentifier, [destinationIdentifier, message = WTFMove(message), sourceData = WTFMove(*sourceData)](bool success, auto* contextConnection) mutable {

Can we get rid of success if we now pass a pointer?
Comment 4 Chris Dumez 2018-03-14 14:37:22 PDT
Created attachment 335803 [details]
Patch
Comment 5 Chris Dumez 2018-03-14 14:38:22 PDT
(In reply to youenn fablet from comment #3)
> Comment on attachment 335779 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=335779&action=review
> 
> > Source/WebKit/StorageProcess/ServiceWorker/WebSWServerConnection.cpp:202
> > +    server().runServiceWorkerIfNecessary(destinationIdentifier, [destinationIdentifier, message = WTFMove(message), sourceData = WTFMove(*sourceData)](bool success, auto* contextConnection) mutable {
> 
> Can we get rid of success if we now pass a pointer?

Done before landing.
Comment 6 WebKit Commit Bot 2018-03-14 14:39:40 PDT
Comment on attachment 335803 [details]
Patch

Rejecting attachment 335803 [details] from commit-queue.

Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.webkit.org', '--bot-id=webkit-cq-02', 'validate-changelog', '--check-oops', '--non-interactive', 335803, '--port=mac']" exit_code: 1 cwd: /Volumes/Data/EWS/WebKit

ChangeLog entry in Source/WebCore/ChangeLog contains OOPS!.

Full output: http://webkit-queues.webkit.org/results/6955395
Comment 7 Chris Dumez 2018-03-14 14:54:58 PDT
Created attachment 335804 [details]
Patch
Comment 8 WebKit Commit Bot 2018-03-14 15:32:32 PDT
Comment on attachment 335804 [details]
Patch

Clearing flags on attachment: 335804

Committed r229615: <https://trac.webkit.org/changeset/229615>
Comment 9 WebKit Commit Bot 2018-03-14 15:32:34 PDT
All reviewed patches have been landed.  Closing bug.
Comment 10 Radar WebKit Bug Importer 2018-03-14 15:33:21 PDT
<rdar://problem/38476618>
Comment 11 Ryan Haddad 2018-03-15 08:59:04 PDT
This change appears to have caused the following ServiceWorker API tests to fail an assertion:

Tests that timed out:
  ServiceWorkers.FetchAfterRestoreFromDisk
  ServiceWorkers.InterceptFirstLoadAfterRestoreFromDisk
  ServiceWorkers.RestoreFromDisk
  ServiceWorkers.WaitForPolicyDelegate

ASSERTION FAILED: !HashTranslator::equal(KeyTraits::emptyValue(), key)
/Volumes/Data/slave/sierra-debug/build/WebKitBuild/Debug/usr/local/include/wtf/HashTable.h(587) : void WTF::HashTable<WTF::ObjectIdentifier<WebCore::SWServerToContextConnectionIdentifierType>, WTF::KeyValuePair<WTF::ObjectIdentifier<WebCore::SWServerToContextConnectionIdentifierType>, WebCore::SWServerToContextConnection *>, WTF::KeyValuePairKeyExtractor<WTF::KeyValuePair<WTF::ObjectIdentifier<WebCore::SWServerToContextConnectionIdentifierType>, WebCore::SWServerToContextConnection *> >, WTF::ObjectIdentifierHash<WebCore::SWServerToContextConnectionIdentifierType>, WTF::HashMap<WTF::ObjectIdentifier<WebCore::SWServerToContextConnectionIdentifierType>, WebCore::SWServerToContextConnection *, WTF::ObjectIdentifierHash<WebCore::SWServerToContextConnectionIdentifierType>, WTF::HashTraits<WTF::ObjectIdentifier<WebCore::SWServerToContextConnectionIdentifierType> >, WTF::HashTraits<WebCore::SWServerToContextConnection *> >::KeyValuePairTraits, WTF::HashTraits<WTF::ObjectIdentifier<WebCore::SWServerToContextConnectionIdentifierType> > >::checkKey(const T &) [Key = WTF::ObjectIdentifier<WebCore::SWServerToContextConnectionIdentifierType>, Value = WTF::KeyValuePair<WTF::ObjectIdentifier<WebCore::SWServerToContextConnectionIdentifierType>, WebCore::SWServerToContextConnection *>, Extractor = WTF::KeyValuePairKeyExtractor<WTF::KeyValuePair<WTF::ObjectIdentifier<WebCore::SWServerToContextConnectionIdentifierType>, WebCore::SWServerToContextConnection *> >, HashFunctions = WTF::ObjectIdentifierHash<WebCore::SWServerToContextConnectionIdentifierType>, Traits = WTF::HashMap<WTF::ObjectIdentifier<WebCore::SWServerToContextConnectionIdentifierType>, WebCore::SWServerToContextConnection *, WTF::ObjectIdentifierHash<WebCore::SWServerToContextConnectionIdentifierType>, WTF::HashTraits<WTF::ObjectIdentifier<WebCore::SWServerToContextConnectionIdentifierType> >, WTF::HashTraits<WebCore::SWServerToContextConnection *> >::KeyValuePairTraits, KeyTraits = WTF::HashTraits<WTF::ObjectIdentifier<WebCore::SWServerToContextConnectionIdentifierType> >, HashTranslator = WTF::HashMapTranslatorAdapter<WTF::HashMap<WTF::ObjectIdentifier<WebCore::SWServerToContextConnectionIdentifierType>, WebCore::SWServerToContextConnection *, WTF::ObjectIdentifierHash<WebCore::SWServerToContextConnectionIdentifierType>, WTF::HashTraits<WTF::ObjectIdentifier<WebCore::SWServerToContextConnectionIdentifierType> >, WTF::HashTraits<WebCore::SWServerToContextConnection *> >::KeyValuePairTraits, WTF::IdentityHashTranslator<WTF::HashMap<WTF::ObjectIdentifier<WebCore::SWServerToContextConnectionIdentifierType>, WebCore::SWServerToContextConnection *, WTF::ObjectIdentifierHash<WebCore::SWServerToContextConnectionIdentifierType>, WTF::HashTraits<WTF::ObjectIdentifier<WebCore::SWServerToContextConnectionIdentifierType> >, WTF::HashTraits<WebCore::SWServerToContextConnection *> >::KeyValuePairTraits, WTF::ObjectIdentifierHash<WebCore::SWServerToContextConnectionIdentifierType> > >, T = WTF::ObjectIdentifier<WebCore::SWServerToContextConnectionIdentifierType>]
1   0x10aff7a7d WTFCrash
2   0x114fbb339 void WTF::HashTable<WTF::ObjectIdentifier<WebCore::SWServerToContextConnectionIdentifierType>, WTF::KeyValuePair<WTF::ObjectIdentifier<WebCore::SWServerToContextConnectionIdentifierType>, WebCore::SWServerToContextConnection*>, WTF::KeyValuePairKeyExtractor<WTF::KeyValuePair<WTF::ObjectIdentifier<WebCore::SWServerToContextConnectionIdentifierType>, WebCore::SWServerToContextConnection*> >, WTF::ObjectIdentifierHash<WebCore::SWServerToContextConnectionIdentifierType>, WTF::HashMap<WTF::ObjectIdentifier<WebCore::SWServerToContextConnectionIdentifierType>, WebCore::SWServerToContextConnection*, WTF::ObjectIdentifierHash<WebCore::SWServerToContextConnectionIdentifierType>, WTF::HashTraits<WTF::ObjectIdentifier<WebCore::SWServerToContextConnectionIdentifierType> >, WTF::HashTraits<WebCore::SWServerToContextConnection*> >::KeyValuePairTraits, WTF::HashTraits<WTF::ObjectIdentifier<WebCore::SWServerToContextConnectionIdentifierType> > >::checkKey<WTF::HashMapTranslatorAdapter<WTF::HashMap<WTF::ObjectIdentifier<WebCore::SWServerToContextConnectionIdentifierType>, WebCore::SWServerToContextConnection*, WTF::ObjectIdentifierHash<WebCore::SWServerToContextConnectionIdentifierType>, WTF::HashTraits<WTF::ObjectIdentifier<WebCore::SWServerToContextConnectionIdentifierType> >, WTF::HashTraits<WebCore::SWServerToContextConnection*> >::KeyValuePairTraits, WTF::IdentityHashTranslator<WTF::HashMap<WTF::ObjectIdentifier<WebCore::SWServerToContextConnectionIdentifierType>, WebCore::SWServerToContextConnection*, WTF::ObjectIdentifierHash<WebCore::SWServerToContextConnectionIdentifierType>, WTF::HashTraits<WTF::ObjectIdentifier<WebCore::SWServerToContextConnectionIdentifierType> >, WTF::HashTraits<WebCore::SWServerToContextConnection*> >::KeyValuePairTraits, WTF::ObjectIdentifierHash<WebCore::SWServerToContextConnectionIdentifierType> > >, WTF::ObjectIdentifier<WebCore::SWServerToContextConnectionIdentifierType> >(WTF::ObjectIdentifier<WebCore::SWServerToContextConnectionIdentifierType> const&)
3   0x114fbb1df WTF::KeyValuePair<WTF::ObjectIdentifier<WebCore::SWServerToContextConnectionIdentifierType>, WebCore::SWServerToContextConnection*>* WTF::HashTable<WTF::ObjectIdentifier<WebCore::SWServerToContextConnectionIdentifierType>, WTF::KeyValuePair<WTF::ObjectIdentifier<WebCore::SWServerToContextConnectionIdentifierType>, WebCore::SWServerToContextConnection*>, WTF::KeyValuePairKeyExtractor<WTF::KeyValuePair<WTF::ObjectIdentifier<WebCore::SWServerToContextConnectionIdentifierType>, WebCore::SWServerToContextConnection*> >, WTF::ObjectIdentifierHash<WebCore::SWServerToContextConnectionIdentifierType>, WTF::HashMap<WTF::ObjectIdentifier<WebCore::SWServerToContextConnectionIdentifierType>, WebCore::SWServerToContextConnection*, WTF::ObjectIdentifierHash<WebCore::SWServerToContextConnectionIdentifierType>, WTF::HashTraits<WTF::ObjectIdentifier<WebCore::SWServerToContextConnectionIdentifierType> >, WTF::HashTraits<WebCore::SWServerToContextConnection*> >::KeyValuePairTraits, WTF::HashTraits<WTF::ObjectIdentifier<WebCore::SWServerToContextConnectionIdentifierType> > >::inlineLookup<WTF::HashMapTranslatorAdapter<WTF::HashMap<WTF::ObjectIdentifier<WebCore::SWServerToContextConnectionIdentifierType>, WebCore::SWServerToContextConnection*, WTF::ObjectIdentifierHash<WebCore::SWServerToContextConnectionIdentifierType>, WTF::HashTraits<WTF::ObjectIdentifier<WebCore::SWServerToContextConnectionIdentifierType> >, WTF::HashTraits<WebCore::SWServerToContextConnection*> >::KeyValuePairTraits, WTF::IdentityHashTranslator<WTF::HashMap<WTF::ObjectIdentifier<WebCore::SWServerToContextConnectionIdentifierType>, WebCore::SWServerToContextConnection*, WTF::ObjectIdentifierHash<WebCore::SWServerToContextConnectionIdentifierType>, WTF::HashTraits<WTF::ObjectIdentifier<WebCore::SWServerToContextConnectionIdentifierType> >, WTF::HashTraits<WebCore::SWServerToContextConnection*> >::KeyValuePairTraits, WTF::ObjectIdentifierHash<WebCore::SWServerToContextConnectionIdentifierType> > >, WTF::ObjectIdentifier<WebCore::SWServerToContextConnectionIdentifierType> >(WTF::ObjectIdentifier<WebCore::SWServerToContextConnectionIdentifierType> const&)
4   0x114fbb14d WTF::KeyValuePair<WTF::ObjectIdentifier<WebCore::SWServerToContextConnectionIdentifierType>, WebCore::SWServerToContextConnection*>* WTF::HashTable<WTF::ObjectIdentifier<WebCore::SWServerToContextConnectionIdentifierType>, WTF::KeyValuePair<WTF::ObjectIdentifier<WebCore::SWServerToContextConnectionIdentifierType>, WebCore::SWServerToContextConnection*>, WTF::KeyValuePairKeyExtractor<WTF::KeyValuePair<WTF::ObjectIdentifier<WebCore::SWServerToContextConnectionIdentifierType>, WebCore::SWServerToContextConnection*> >, WTF::ObjectIdentifierHash<WebCore::SWServerToContextConnectionIdentifierType>, WTF::HashMap<WTF::ObjectIdentifier<WebCore::SWServerToContextConnectionIdentifierType>, WebCore::SWServerToContextConnection*, WTF::ObjectIdentifierHash<WebCore::SWServerToContextConnectionIdentifierType>, WTF::HashTraits<WTF::ObjectIdentifier<WebCore::SWServerToContextConnectionIdentifierType> >, WTF::HashTraits<WebCore::SWServerToContextConnection*> >::KeyValuePairTraits, WTF::HashTraits<WTF::ObjectIdentifier<WebCore::SWServerToContextConnectionIdentifierType> > >::lookup<WTF::HashMapTranslatorAdapter<WTF::HashMap<WTF::ObjectIdentifier<WebCore::SWServerToContextConnectionIdentifierType>, WebCore::SWServerToContextConnection*, WTF::ObjectIdentifierHash<WebCore::SWServerToContextConnectionIdentifierType>, WTF::HashTraits<WTF::ObjectIdentifier<WebCore::SWServerToContextConnectionIdentifierType> >, WTF::HashTraits<WebCore::SWServerToContextConnection*> >::KeyValuePairTraits, WTF::IdentityHashTranslator<WTF::HashMap<WTF::ObjectIdentifier<WebCore::SWServerToContextConnectionIdentifierType>, WebCore::SWServerToContextConnection*, WTF::ObjectIdentifierHash<WebCore::SWServerToContextConnectionIdentifierType>, WTF::HashTraits<WTF::ObjectIdentifier<WebCore::SWServerToContextConnectionIdentifierType> >, WTF::HashTraits<WebCore::SWServerToContextConnection*> >::KeyValuePairTraits, WTF::ObjectIdentifierHash<WebCore::SWServerToContextConnectionIdentifierType> > >, WTF::ObjectIdentifier<WebCore::SWServerToContextConnectionIdentifierType> >(WTF::ObjectIdentifier<WebCore::SWServerToContextConnectionIdentifierType> const&)
5   0x114fbb0dd WebCore::SWServerToContextConnection* WTF::HashMap<WTF::ObjectIdentifier<WebCore::SWServerToContextConnectionIdentifierType>, WebCore::SWServerToContextConnection*, WTF::ObjectIdentifierHash<WebCore::SWServerToContextConnectionIdentifierType>, WTF::HashTraits<WTF::ObjectIdentifier<WebCore::SWServerToContextConnectionIdentifierType> >, WTF::HashTraits<WebCore::SWServerToContextConnection*> >::get<WTF::IdentityHashTranslator<WTF::HashMap<WTF::ObjectIdentifier<WebCore::SWServerToContextConnectionIdentifierType>, WebCore::SWServerToContextConnection*, WTF::ObjectIdentifierHash<WebCore::SWServerToContextConnectionIdentifierType>, WTF::HashTraits<WTF::ObjectIdentifier<WebCore::SWServerToContextConnectionIdentifierType> >, WTF::HashTraits<WebCore::SWServerToContextConnection*> >::KeyValuePairTraits, WTF::ObjectIdentifierHash<WebCore::SWServerToContextConnectionIdentifierType> >, WTF::ObjectIdentifier<WebCore::SWServerToContextConnectionIdentifierType> >(WTF::ObjectIdentifier<WebCore::SWServerToContextConnectionIdentifierType> const&) const
6   0x114f7840d WTF::HashMap<WTF::ObjectIdentifier<WebCore::SWServerToContextConnectionIdentifierType>, WebCore::SWServerToContextConnection*, WTF::ObjectIdentifierHash<WebCore::SWServerToContextConnectionIdentifierType>, WTF::HashTraits<WTF::ObjectIdentifier<WebCore::SWServerToContextConnectionIdentifierType> >, WTF::HashTraits<WebCore::SWServerToContextConnection*> >::get(WTF::ObjectIdentifier<WebCore::SWServerToContextConnectionIdentifierType> const&) const
7   0x114f783dd WebCore::SWServerToContextConnection::connectionForIdentifier(WTF::ObjectIdentifier<WebCore::SWServerToContextConnectionIdentifierType>)
8   0x114f71598 WebCore::SWServerWorker::contextConnection()
9   0x114f713fd WebCore::SWServer::runServiceWorkerIfNecessary(WTF::ObjectIdentifier<WebCore::ServiceWorkerIdentifierType>, WTF::Function<void (WebCore::SWServerToContextConnection*)>&&)
10  0x1040a355b WebKit::WebSWServerConnection::startFetch(unsigned long long, WTF::ObjectIdentifier<WebCore::ServiceWorkerRegistrationIdentifierType>, WebCore::ResourceRequest&&, WebCore::FetchOptions&&, IPC::FormDataReference&&, WTF::String&&)::$_0::operator()(bool)
11  0x1040a2a9b WebKit::WebSWServerConnection::startFetch(unsigned long long, WTF::ObjectIdentifier<WebCore::ServiceWorkerRegistrationIdentifierType>, WebCore::ResourceRequest&&, WebCore::FetchOptions&&, IPC::FormDataReference&&, WTF::String&&)
12  0x1040bc37a void IPC::callMemberFunctionImpl<WebKit::WebSWServerConnection, void (WebKit::WebSWServerConnection::*)(unsigned long long, WTF::ObjectIdentifier<WebCore::ServiceWorkerRegistrationIdentifierType>, WebCore::ResourceRequest&&, WebCore::FetchOptions&&, IPC::FormDataReference&&, WTF::String&&), std::__1::tuple<unsigned long long, WTF::ObjectIdentifier<WebCore::ServiceWorkerRegistrationIdentifierType>, WebCore::ResourceRequest, WebCore::FetchOptions, IPC::FormDataReference, WTF::String>, 0ul, 1ul, 2ul, 3ul, 4ul, 5ul>(WebKit::WebSWServerConnection*, void (WebKit::WebSWServerConnection::*)(unsigned long long, WTF::ObjectIdentifier<WebCore::ServiceWorkerRegistrationIdentifierType>, WebCore::ResourceRequest&&, WebCore::FetchOptions&&, IPC::FormDataReference&&, WTF::String&&), std::__1::tuple<unsigned long long, WTF::ObjectIdentifier<WebCore::ServiceWorkerRegistrationIdentifierType>, WebCore::ResourceRequest, WebCore::FetchOptions, IPC::FormDataReference, WTF::String>&&, std::__1::integer_sequence<unsigned long, 0ul, 1ul, 2ul, 3ul, 4ul, 5ul>)
13  0x1040bbd48 void IPC::callMemberFunction<WebKit::WebSWServerConnection, void (WebKit::WebSWServerConnection::*)(unsigned long long, WTF::ObjectIdentifier<WebCore::ServiceWorkerRegistrationIdentifierType>, WebCore::ResourceRequest&&, WebCore::FetchOptions&&, IPC::FormDataReference&&, WTF::String&&), std::__1::tuple<unsigned long long, WTF::ObjectIdentifier<WebCore::ServiceWorkerRegistrationIdentifierType>, WebCore::ResourceRequest, WebCore::FetchOptions, IPC::FormDataReference, WTF::String>, std::__1::integer_sequence<unsigned long, 0ul, 1ul, 2ul, 3ul, 4ul, 5ul> >(std::__1::tuple<unsigned long long, WTF::ObjectIdentifier<WebCore::ServiceWorkerRegistrationIdentifierType>, WebCore::ResourceRequest, WebCore::FetchOptions, IPC::FormDataReference, WTF::String>&&, WebKit::WebSWServerConnection*, void (WebKit::WebSWServerConnection::*)(unsigned long long, WTF::ObjectIdentifier<WebCore::ServiceWorkerRegistrationIdentifierType>, WebCore::ResourceRequest&&, WebCore::FetchOptions&&, IPC::FormDataReference&&, WTF::String&&))
14  0x1040b85a1 void IPC::handleMessage<Messages::WebSWServerConnection::StartFetch, WebKit::WebSWServerConnection, void (WebKit::WebSWServerConnection::*)(unsigned long long, WTF::ObjectIdentifier<WebCore::ServiceWorkerRegistrationIdentifierType>, WebCore::ResourceRequest&&, WebCore::FetchOptions&&, IPC::FormDataReference&&, WTF::String&&)>(IPC::Decoder&, WebKit::WebSWServerConnection*, void (WebKit::WebSWServerConnection::*)(unsigned long long, WTF::ObjectIdentifier<WebCore::ServiceWorkerRegistrationIdentifierType>, WebCore::ResourceRequest&&, WebCore::FetchOptions&&, IPC::FormDataReference&&, WTF::String&&))
15  0x1040b7aac WebKit::WebSWServerConnection::didReceiveMessage(IPC::Connection&, IPC::Decoder&)
16  0x103924523 WebKit::StorageToWebProcessConnection::didReceiveMessage(IPC::Connection&, IPC::Decoder&)
17  0x10338e243 IPC::Connection::dispatchMessage(IPC::Decoder&)
18  0x103383868 IPC::Connection::dispatchMessage(std::__1::unique_ptr<IPC::Decoder, std::__1::default_delete<IPC::Decoder> >)
19  0x10338e840 IPC::Connection::dispatchOneMessage()
20  0x1033a6c0d IPC::Connection::enqueueIncomingMessage(std::__1::unique_ptr<IPC::Decoder, std::__1::default_delete<IPC::Decoder> >)::$_14::operator()()
21  0x1033a6b69 WTF::Function<void ()>::CallableWrapper<IPC::Connection::enqueueIncomingMessage(std::__1::unique_ptr<IPC::Decoder, std::__1::default_delete<IPC::Decoder> >)::$_14>::call()
22  0x10b013a7b WTF::Function<void ()>::operator()() const
23  0x10b0587d3 WTF::RunLoop::performWork()
24  0x10b059074 WTF::RunLoop::performWork(void*)
25  0x7fff930723e1 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__
26  0x7fff9305365c __CFRunLoopDoSources0
27  0x7fff93052b46 __CFRunLoopRun
28  0x7fff93052544 CFRunLoopRunSpecific
29  0x7fff94a83252 -[NSRunLoop(NSRunLoop) runMode:beforeDate:]
30  0x7fff94a8312a -[NSRunLoop(NSRunLoop) run]
31  0x7fffa8fe589b _xpc_objc_main

https://build.webkit.org/builders/Apple%20Sierra%20Debug%20WK2%20%28Tests%29/builds/5628
Comment 12 Chris Dumez 2018-03-15 09:06:19 PDT
(In reply to Ryan Haddad from comment #11)
> This change appears to have caused the following ServiceWorker API tests to
> fail an assertion:
> 
> Tests that timed out:
>   ServiceWorkers.FetchAfterRestoreFromDisk
>   ServiceWorkers.InterceptFirstLoadAfterRestoreFromDisk
>   ServiceWorkers.RestoreFromDisk
>   ServiceWorkers.WaitForPolicyDelegate
> 
> ASSERTION FAILED: !HashTranslator::equal(KeyTraits::emptyValue(), key)
> /Volumes/Data/slave/sierra-debug/build/WebKitBuild/Debug/usr/local/include/
> wtf/HashTable.h(587) : void
> WTF::HashTable<WTF::ObjectIdentifier<WebCore::
> SWServerToContextConnectionIdentifierType>,
> WTF::KeyValuePair<WTF::ObjectIdentifier<WebCore::
> SWServerToContextConnectionIdentifierType>,
> WebCore::SWServerToContextConnection *>,
> WTF::KeyValuePairKeyExtractor<WTF::KeyValuePair<WTF::
> ObjectIdentifier<WebCore::SWServerToContextConnectionIdentifierType>,
> WebCore::SWServerToContextConnection *> >,
> WTF::ObjectIdentifierHash<WebCore::
> SWServerToContextConnectionIdentifierType>,
> WTF::HashMap<WTF::ObjectIdentifier<WebCore::
> SWServerToContextConnectionIdentifierType>,
> WebCore::SWServerToContextConnection *,
> WTF::ObjectIdentifierHash<WebCore::
> SWServerToContextConnectionIdentifierType>,
> WTF::HashTraits<WTF::ObjectIdentifier<WebCore::
> SWServerToContextConnectionIdentifierType> >,
> WTF::HashTraits<WebCore::SWServerToContextConnection *>
> >::KeyValuePairTraits,
> WTF::HashTraits<WTF::ObjectIdentifier<WebCore::
> SWServerToContextConnectionIdentifierType> > >::checkKey(const T &) [Key =
> WTF::ObjectIdentifier<WebCore::SWServerToContextConnectionIdentifierType>,
> Value =
> WTF::KeyValuePair<WTF::ObjectIdentifier<WebCore::
> SWServerToContextConnectionIdentifierType>,
> WebCore::SWServerToContextConnection *>, Extractor =
> WTF::KeyValuePairKeyExtractor<WTF::KeyValuePair<WTF::
> ObjectIdentifier<WebCore::SWServerToContextConnectionIdentifierType>,
> WebCore::SWServerToContextConnection *> >, HashFunctions =
> WTF::ObjectIdentifierHash<WebCore::
> SWServerToContextConnectionIdentifierType>, Traits =
> WTF::HashMap<WTF::ObjectIdentifier<WebCore::
> SWServerToContextConnectionIdentifierType>,
> WebCore::SWServerToContextConnection *,
> WTF::ObjectIdentifierHash<WebCore::
> SWServerToContextConnectionIdentifierType>,
> WTF::HashTraits<WTF::ObjectIdentifier<WebCore::
> SWServerToContextConnectionIdentifierType> >,
> WTF::HashTraits<WebCore::SWServerToContextConnection *>
> >::KeyValuePairTraits, KeyTraits =
> WTF::HashTraits<WTF::ObjectIdentifier<WebCore::
> SWServerToContextConnectionIdentifierType> >, HashTranslator =
> WTF::HashMapTranslatorAdapter<WTF::HashMap<WTF::ObjectIdentifier<WebCore::
> SWServerToContextConnectionIdentifierType>,
> WebCore::SWServerToContextConnection *,
> WTF::ObjectIdentifierHash<WebCore::
> SWServerToContextConnectionIdentifierType>,
> WTF::HashTraits<WTF::ObjectIdentifier<WebCore::
> SWServerToContextConnectionIdentifierType> >,
> WTF::HashTraits<WebCore::SWServerToContextConnection *>
> >::KeyValuePairTraits,
> WTF::IdentityHashTranslator<WTF::HashMap<WTF::ObjectIdentifier<WebCore::
> SWServerToContextConnectionIdentifierType>,
> WebCore::SWServerToContextConnection *,
> WTF::ObjectIdentifierHash<WebCore::
> SWServerToContextConnectionIdentifierType>,
> WTF::HashTraits<WTF::ObjectIdentifier<WebCore::
> SWServerToContextConnectionIdentifierType> >,
> WTF::HashTraits<WebCore::SWServerToContextConnection *>
> >::KeyValuePairTraits,
> WTF::ObjectIdentifierHash<WebCore::
> SWServerToContextConnectionIdentifierType> > >, T =
> WTF::ObjectIdentifier<WebCore::SWServerToContextConnectionIdentifierType>]
> 1   0x10aff7a7d WTFCrash
> 2   0x114fbb339 void
> WTF::HashTable<WTF::ObjectIdentifier<WebCore::
> SWServerToContextConnectionIdentifierType>,
> WTF::KeyValuePair<WTF::ObjectIdentifier<WebCore::
> SWServerToContextConnectionIdentifierType>,
> WebCore::SWServerToContextConnection*>,
> WTF::KeyValuePairKeyExtractor<WTF::KeyValuePair<WTF::
> ObjectIdentifier<WebCore::SWServerToContextConnectionIdentifierType>,
> WebCore::SWServerToContextConnection*> >,
> WTF::ObjectIdentifierHash<WebCore::
> SWServerToContextConnectionIdentifierType>,
> WTF::HashMap<WTF::ObjectIdentifier<WebCore::
> SWServerToContextConnectionIdentifierType>,
> WebCore::SWServerToContextConnection*,
> WTF::ObjectIdentifierHash<WebCore::
> SWServerToContextConnectionIdentifierType>,
> WTF::HashTraits<WTF::ObjectIdentifier<WebCore::
> SWServerToContextConnectionIdentifierType> >,
> WTF::HashTraits<WebCore::SWServerToContextConnection*>
> >::KeyValuePairTraits,
> WTF::HashTraits<WTF::ObjectIdentifier<WebCore::
> SWServerToContextConnectionIdentifierType> >
> >::checkKey<WTF::HashMapTranslatorAdapter<WTF::HashMap<WTF::
> ObjectIdentifier<WebCore::SWServerToContextConnectionIdentifierType>,
> WebCore::SWServerToContextConnection*,
> WTF::ObjectIdentifierHash<WebCore::
> SWServerToContextConnectionIdentifierType>,
> WTF::HashTraits<WTF::ObjectIdentifier<WebCore::
> SWServerToContextConnectionIdentifierType> >,
> WTF::HashTraits<WebCore::SWServerToContextConnection*>
> >::KeyValuePairTraits,
> WTF::IdentityHashTranslator<WTF::HashMap<WTF::ObjectIdentifier<WebCore::
> SWServerToContextConnectionIdentifierType>,
> WebCore::SWServerToContextConnection*,
> WTF::ObjectIdentifierHash<WebCore::
> SWServerToContextConnectionIdentifierType>,
> WTF::HashTraits<WTF::ObjectIdentifier<WebCore::
> SWServerToContextConnectionIdentifierType> >,
> WTF::HashTraits<WebCore::SWServerToContextConnection*>
> >::KeyValuePairTraits,
> WTF::ObjectIdentifierHash<WebCore::
> SWServerToContextConnectionIdentifierType> > >,
> WTF::ObjectIdentifier<WebCore::SWServerToContextConnectionIdentifierType>
> >(WTF::ObjectIdentifier<WebCore::SWServerToContextConnectionIdentifierType>
> const&)
> 3   0x114fbb1df
> WTF::KeyValuePair<WTF::ObjectIdentifier<WebCore::
> SWServerToContextConnectionIdentifierType>,
> WebCore::SWServerToContextConnection*>*
> WTF::HashTable<WTF::ObjectIdentifier<WebCore::
> SWServerToContextConnectionIdentifierType>,
> WTF::KeyValuePair<WTF::ObjectIdentifier<WebCore::
> SWServerToContextConnectionIdentifierType>,
> WebCore::SWServerToContextConnection*>,
> WTF::KeyValuePairKeyExtractor<WTF::KeyValuePair<WTF::
> ObjectIdentifier<WebCore::SWServerToContextConnectionIdentifierType>,
> WebCore::SWServerToContextConnection*> >,
> WTF::ObjectIdentifierHash<WebCore::
> SWServerToContextConnectionIdentifierType>,
> WTF::HashMap<WTF::ObjectIdentifier<WebCore::
> SWServerToContextConnectionIdentifierType>,
> WebCore::SWServerToContextConnection*,
> WTF::ObjectIdentifierHash<WebCore::
> SWServerToContextConnectionIdentifierType>,
> WTF::HashTraits<WTF::ObjectIdentifier<WebCore::
> SWServerToContextConnectionIdentifierType> >,
> WTF::HashTraits<WebCore::SWServerToContextConnection*>
> >::KeyValuePairTraits,
> WTF::HashTraits<WTF::ObjectIdentifier<WebCore::
> SWServerToContextConnectionIdentifierType> >
> >::inlineLookup<WTF::HashMapTranslatorAdapter<WTF::HashMap<WTF::
> ObjectIdentifier<WebCore::SWServerToContextConnectionIdentifierType>,
> WebCore::SWServerToContextConnection*,
> WTF::ObjectIdentifierHash<WebCore::
> SWServerToContextConnectionIdentifierType>,
> WTF::HashTraits<WTF::ObjectIdentifier<WebCore::
> SWServerToContextConnectionIdentifierType> >,
> WTF::HashTraits<WebCore::SWServerToContextConnection*>
> >::KeyValuePairTraits,
> WTF::IdentityHashTranslator<WTF::HashMap<WTF::ObjectIdentifier<WebCore::
> SWServerToContextConnectionIdentifierType>,
> WebCore::SWServerToContextConnection*,
> WTF::ObjectIdentifierHash<WebCore::
> SWServerToContextConnectionIdentifierType>,
> WTF::HashTraits<WTF::ObjectIdentifier<WebCore::
> SWServerToContextConnectionIdentifierType> >,
> WTF::HashTraits<WebCore::SWServerToContextConnection*>
> >::KeyValuePairTraits,
> WTF::ObjectIdentifierHash<WebCore::
> SWServerToContextConnectionIdentifierType> > >,
> WTF::ObjectIdentifier<WebCore::SWServerToContextConnectionIdentifierType>
> >(WTF::ObjectIdentifier<WebCore::SWServerToContextConnectionIdentifierType>
> const&)
> 4   0x114fbb14d
> WTF::KeyValuePair<WTF::ObjectIdentifier<WebCore::
> SWServerToContextConnectionIdentifierType>,
> WebCore::SWServerToContextConnection*>*
> WTF::HashTable<WTF::ObjectIdentifier<WebCore::
> SWServerToContextConnectionIdentifierType>,
> WTF::KeyValuePair<WTF::ObjectIdentifier<WebCore::
> SWServerToContextConnectionIdentifierType>,
> WebCore::SWServerToContextConnection*>,
> WTF::KeyValuePairKeyExtractor<WTF::KeyValuePair<WTF::
> ObjectIdentifier<WebCore::SWServerToContextConnectionIdentifierType>,
> WebCore::SWServerToContextConnection*> >,
> WTF::ObjectIdentifierHash<WebCore::
> SWServerToContextConnectionIdentifierType>,
> WTF::HashMap<WTF::ObjectIdentifier<WebCore::
> SWServerToContextConnectionIdentifierType>,
> WebCore::SWServerToContextConnection*,
> WTF::ObjectIdentifierHash<WebCore::
> SWServerToContextConnectionIdentifierType>,
> WTF::HashTraits<WTF::ObjectIdentifier<WebCore::
> SWServerToContextConnectionIdentifierType> >,
> WTF::HashTraits<WebCore::SWServerToContextConnection*>
> >::KeyValuePairTraits,
> WTF::HashTraits<WTF::ObjectIdentifier<WebCore::
> SWServerToContextConnectionIdentifierType> >
> >::lookup<WTF::HashMapTranslatorAdapter<WTF::HashMap<WTF::
> ObjectIdentifier<WebCore::SWServerToContextConnectionIdentifierType>,
> WebCore::SWServerToContextConnection*,
> WTF::ObjectIdentifierHash<WebCore::
> SWServerToContextConnectionIdentifierType>,
> WTF::HashTraits<WTF::ObjectIdentifier<WebCore::
> SWServerToContextConnectionIdentifierType> >,
> WTF::HashTraits<WebCore::SWServerToContextConnection*>
> >::KeyValuePairTraits,
> WTF::IdentityHashTranslator<WTF::HashMap<WTF::ObjectIdentifier<WebCore::
> SWServerToContextConnectionIdentifierType>,
> WebCore::SWServerToContextConnection*,
> WTF::ObjectIdentifierHash<WebCore::
> SWServerToContextConnectionIdentifierType>,
> WTF::HashTraits<WTF::ObjectIdentifier<WebCore::
> SWServerToContextConnectionIdentifierType> >,
> WTF::HashTraits<WebCore::SWServerToContextConnection*>
> >::KeyValuePairTraits,
> WTF::ObjectIdentifierHash<WebCore::
> SWServerToContextConnectionIdentifierType> > >,
> WTF::ObjectIdentifier<WebCore::SWServerToContextConnectionIdentifierType>
> >(WTF::ObjectIdentifier<WebCore::SWServerToContextConnectionIdentifierType>
> const&)
> 5   0x114fbb0dd WebCore::SWServerToContextConnection*
> WTF::HashMap<WTF::ObjectIdentifier<WebCore::
> SWServerToContextConnectionIdentifierType>,
> WebCore::SWServerToContextConnection*,
> WTF::ObjectIdentifierHash<WebCore::
> SWServerToContextConnectionIdentifierType>,
> WTF::HashTraits<WTF::ObjectIdentifier<WebCore::
> SWServerToContextConnectionIdentifierType> >,
> WTF::HashTraits<WebCore::SWServerToContextConnection*>
> >::get<WTF::IdentityHashTranslator<WTF::HashMap<WTF::
> ObjectIdentifier<WebCore::SWServerToContextConnectionIdentifierType>,
> WebCore::SWServerToContextConnection*,
> WTF::ObjectIdentifierHash<WebCore::
> SWServerToContextConnectionIdentifierType>,
> WTF::HashTraits<WTF::ObjectIdentifier<WebCore::
> SWServerToContextConnectionIdentifierType> >,
> WTF::HashTraits<WebCore::SWServerToContextConnection*>
> >::KeyValuePairTraits,
> WTF::ObjectIdentifierHash<WebCore::
> SWServerToContextConnectionIdentifierType> >,
> WTF::ObjectIdentifier<WebCore::SWServerToContextConnectionIdentifierType>
> >(WTF::ObjectIdentifier<WebCore::SWServerToContextConnectionIdentifierType>
> const&) const
> 6   0x114f7840d
> WTF::HashMap<WTF::ObjectIdentifier<WebCore::
> SWServerToContextConnectionIdentifierType>,
> WebCore::SWServerToContextConnection*,
> WTF::ObjectIdentifierHash<WebCore::
> SWServerToContextConnectionIdentifierType>,
> WTF::HashTraits<WTF::ObjectIdentifier<WebCore::
> SWServerToContextConnectionIdentifierType> >,
> WTF::HashTraits<WebCore::SWServerToContextConnection*>
> >::get(WTF::ObjectIdentifier<WebCore::
> SWServerToContextConnectionIdentifierType> const&) const
> 7   0x114f783dd
> WebCore::SWServerToContextConnection::connectionForIdentifier(WTF::
> ObjectIdentifier<WebCore::SWServerToContextConnectionIdentifierType>)
> 8   0x114f71598 WebCore::SWServerWorker::contextConnection()
> 9   0x114f713fd
> WebCore::SWServer::runServiceWorkerIfNecessary(WTF::ObjectIdentifier<WebCore:
> :ServiceWorkerIdentifierType>, WTF::Function<void
> (WebCore::SWServerToContextConnection*)>&&)
> 10  0x1040a355b WebKit::WebSWServerConnection::startFetch(unsigned long
> long,
> WTF::ObjectIdentifier<WebCore::ServiceWorkerRegistrationIdentifierType>,
> WebCore::ResourceRequest&&, WebCore::FetchOptions&&,
> IPC::FormDataReference&&, WTF::String&&)::$_0::operator()(bool)
> 11  0x1040a2a9b WebKit::WebSWServerConnection::startFetch(unsigned long
> long,
> WTF::ObjectIdentifier<WebCore::ServiceWorkerRegistrationIdentifierType>,
> WebCore::ResourceRequest&&, WebCore::FetchOptions&&,
> IPC::FormDataReference&&, WTF::String&&)
> 12  0x1040bc37a void
> IPC::callMemberFunctionImpl<WebKit::WebSWServerConnection, void
> (WebKit::WebSWServerConnection::*)(unsigned long long,
> WTF::ObjectIdentifier<WebCore::ServiceWorkerRegistrationIdentifierType>,
> WebCore::ResourceRequest&&, WebCore::FetchOptions&&,
> IPC::FormDataReference&&, WTF::String&&), std::__1::tuple<unsigned long
> long,
> WTF::ObjectIdentifier<WebCore::ServiceWorkerRegistrationIdentifierType>,
> WebCore::ResourceRequest, WebCore::FetchOptions, IPC::FormDataReference,
> WTF::String>, 0ul, 1ul, 2ul, 3ul, 4ul, 5ul>(WebKit::WebSWServerConnection*,
> void (WebKit::WebSWServerConnection::*)(unsigned long long,
> WTF::ObjectIdentifier<WebCore::ServiceWorkerRegistrationIdentifierType>,
> WebCore::ResourceRequest&&, WebCore::FetchOptions&&,
> IPC::FormDataReference&&, WTF::String&&), std::__1::tuple<unsigned long
> long,
> WTF::ObjectIdentifier<WebCore::ServiceWorkerRegistrationIdentifierType>,
> WebCore::ResourceRequest, WebCore::FetchOptions, IPC::FormDataReference,
> WTF::String>&&, std::__1::integer_sequence<unsigned long, 0ul, 1ul, 2ul,
> 3ul, 4ul, 5ul>)
> 13  0x1040bbd48 void IPC::callMemberFunction<WebKit::WebSWServerConnection,
> void (WebKit::WebSWServerConnection::*)(unsigned long long,
> WTF::ObjectIdentifier<WebCore::ServiceWorkerRegistrationIdentifierType>,
> WebCore::ResourceRequest&&, WebCore::FetchOptions&&,
> IPC::FormDataReference&&, WTF::String&&), std::__1::tuple<unsigned long
> long,
> WTF::ObjectIdentifier<WebCore::ServiceWorkerRegistrationIdentifierType>,
> WebCore::ResourceRequest, WebCore::FetchOptions, IPC::FormDataReference,
> WTF::String>, std::__1::integer_sequence<unsigned long, 0ul, 1ul, 2ul, 3ul,
> 4ul, 5ul> >(std::__1::tuple<unsigned long long,
> WTF::ObjectIdentifier<WebCore::ServiceWorkerRegistrationIdentifierType>,
> WebCore::ResourceRequest, WebCore::FetchOptions, IPC::FormDataReference,
> WTF::String>&&, WebKit::WebSWServerConnection*, void
> (WebKit::WebSWServerConnection::*)(unsigned long long,
> WTF::ObjectIdentifier<WebCore::ServiceWorkerRegistrationIdentifierType>,
> WebCore::ResourceRequest&&, WebCore::FetchOptions&&,
> IPC::FormDataReference&&, WTF::String&&))
> 14  0x1040b85a1 void
> IPC::handleMessage<Messages::WebSWServerConnection::StartFetch,
> WebKit::WebSWServerConnection, void
> (WebKit::WebSWServerConnection::*)(unsigned long long,
> WTF::ObjectIdentifier<WebCore::ServiceWorkerRegistrationIdentifierType>,
> WebCore::ResourceRequest&&, WebCore::FetchOptions&&,
> IPC::FormDataReference&&, WTF::String&&)>(IPC::Decoder&,
> WebKit::WebSWServerConnection*, void
> (WebKit::WebSWServerConnection::*)(unsigned long long,
> WTF::ObjectIdentifier<WebCore::ServiceWorkerRegistrationIdentifierType>,
> WebCore::ResourceRequest&&, WebCore::FetchOptions&&,
> IPC::FormDataReference&&, WTF::String&&))
> 15  0x1040b7aac
> WebKit::WebSWServerConnection::didReceiveMessage(IPC::Connection&,
> IPC::Decoder&)
> 16  0x103924523
> WebKit::StorageToWebProcessConnection::didReceiveMessage(IPC::Connection&,
> IPC::Decoder&)
> 17  0x10338e243 IPC::Connection::dispatchMessage(IPC::Decoder&)
> 18  0x103383868
> IPC::Connection::dispatchMessage(std::__1::unique_ptr<IPC::Decoder,
> std::__1::default_delete<IPC::Decoder> >)
> 19  0x10338e840 IPC::Connection::dispatchOneMessage()
> 20  0x1033a6c0d
> IPC::Connection::enqueueIncomingMessage(std::__1::unique_ptr<IPC::Decoder,
> std::__1::default_delete<IPC::Decoder> >)::$_14::operator()()
> 21  0x1033a6b69 WTF::Function<void
> ()>::CallableWrapper<IPC::Connection::enqueueIncomingMessage(std::__1::
> unique_ptr<IPC::Decoder, std::__1::default_delete<IPC::Decoder>
> >)::$_14>::call()
> 22  0x10b013a7b WTF::Function<void ()>::operator()() const
> 23  0x10b0587d3 WTF::RunLoop::performWork()
> 24  0x10b059074 WTF::RunLoop::performWork(void*)
> 25  0x7fff930723e1 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__
> 26  0x7fff9305365c __CFRunLoopDoSources0
> 27  0x7fff93052b46 __CFRunLoopRun
> 28  0x7fff93052544 CFRunLoopRunSpecific
> 29  0x7fff94a83252 -[NSRunLoop(NSRunLoop) runMode:beforeDate:]
> 30  0x7fff94a8312a -[NSRunLoop(NSRunLoop) run]
> 31  0x7fffa8fe589b _xpc_objc_main
> 
> https://build.webkit.org/builders/Apple%20Sierra%20Debug%20WK2%20%28Tests%29/
> builds/5628

Found the issue, will fix shortly.
Comment 13 Chris Dumez 2018-03-15 09:18:06 PDT
Follow-up fix in <https://trac.webkit.org/changeset/229625>.