Bug 182483

Summary: Crash on sfgate.com because mismatching link preload types
Product: WebKit Reporter: Antti Koivisto <koivisto>
Component: Page LoadingAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, beidson, cdumez, commit-queue, dbates, ews-watchlist, japhet, jlewis3, yoav, youennf
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
patch none

Description Antti Koivisto 2018-02-05 06:32:45 PST
==> 49 WebCore: WebCore::CachedRawResource::responseReceived(WebCore::ResourceResponse const&) <==
          49 WebCore: WebCore::SubresourceLoader::didReceiveResponse(WebCore::ResourceResponse const&)
            49 WebKit: WebKit::WebResourceLoader::didReceiveResponse(WebCore::ResourceResponse const&, bool)
Comment 1 Antti Koivisto 2018-02-05 06:33:14 PST
<rdar://problem/37065331>
Comment 2 Antti Koivisto 2018-02-05 06:40:32 PST
Created attachment 333080 [details]
patch
Comment 3 WebKit Commit Bot 2018-02-05 08:30:07 PST
Comment on attachment 333080 [details]
patch

Clearing flags on attachment: 333080

Committed r228096: <https://trac.webkit.org/changeset/228096>
Comment 4 WebKit Commit Bot 2018-02-05 08:30:08 PST
All reviewed patches have been landed.  Closing bug.
Comment 5 Matt Lewis 2018-02-05 13:05:56 PST
This patch is causing a crash in multiple tests on iOS and Mac debug WK1 at the moment and its causing EWS to fail.

build:
https://build.webkit.org/results/Apple%20iOS%2011%20Simulator%20Debug%20WK2%20(Tests)/r228106%20(2536)/results.html
https://build.webkit.org/builders/Apple%20iOS%2011%20Simulator%20Debug%20WK2%20(Tests)/builds/2536


Crash backtrace:
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   JavaScriptCore                	0x00000001193be874 WTFCrash + 36
1   JavaScriptCore                	0x00000001193be889 WTFCrashWithSecurityImplication + 9
2   com.apple.WebCore             	0x000000011de54a01 WTF::match_constness<WebCore::CachedResource, WebCore::CachedRawResource>::type& WTF::downcast<WebCore::CachedRawResource, WebCore::CachedResource>(WebCore::CachedResource&) + 65
3   com.apple.WebCore             	0x000000011de515f3 WebCore::createLinkPreloadResourceClient(WebCore::CachedResource&, WebCore::LinkLoader&) + 3715
4   com.apple.WebCore             	0x000000011de5011c WebCore::LinkLoader::preloadIfNeeded(WebCore::LinkRelAttribute const&, WebCore::URL const&, WebCore::Document&, WTF::String const&, WTF::String const&, WTF::String const&, WTF::String const&, WebCore::LinkLoader*) + 2188
5   com.apple.WebCore             	0x000000011de51f87 WebCore::LinkLoader::loadLink(WebCore::LinkRelAttribute const&, WebCore::URL const&, WTF::String const&, WTF::String const&, WTF::String const&, WTF::String const&, WebCore::Document&) + 1159
6   com.apple.WebCore             	0x000000011dad0315 WebCore::HTMLLinkElement::process() + 533
7   com.apple.WebCore             	0x000000011dad1a85 WebCore::HTMLLinkElement::didFinishInsertingNode() + 21
8   com.apple.WebCore             	0x000000011d7040e8 void WebCore::executeNodeInsertionWithScriptAssertion<WebCore::ContainerNode::parserAppendChild(WebCore::Node&)::$_5>(WebCore::ContainerNode&, WebCore::Node&, WebCore::ContainerNode::ChildChangeSource, WebCore::ReplacedAllChildren, WebCore::ContainerNode::parserAppendChild(WebCore::Node&)::$_5) + 680
9   com.apple.WebCore             	0x000000011d7002ed WebCore::ContainerNode::parserAppendChild(WebCore::Node&) + 285
10  com.apple.WebCore             	0x000000011dbefb88 WebCore::insert(WebCore::HTMLConstructionSiteTask&) + 344
11  com.apple.WebCore             	0x000000011dbef5eb WebCore::executeInsertTask(WebCore::HTMLConstructionSiteTask&) + 75
12  com.apple.WebCore             	0x000000011dbdb696 WebCore::executeTask(WebCore::HTMLConstructionSiteTask&) + 70
13  com.apple.WebCore             	0x000000011dbdb552 WebCore::HTMLConstructionSite::executeQueuedTasks() + 146
14  com.apple.WebCore             	0x000000011dc19170 WebCore::HTMLTreeBuilder::constructTree(WebCore::AtomicHTMLToken&&) + 480
15  com.apple.WebCore             	0x000000011dbe4917 WebCore::HTMLDocumentParser::constructTreeFromHTMLToken(WebCore::HTMLTokenizer::TokenPtr&) + 151
16  com.apple.WebCore             	0x000000011dbe45e8 WebCore::HTMLDocumentParser::pumpTokenizerLoop(WebCore::HTMLDocumentParser::SynchronousMode, bool, WebCore::PumpSession&) + 1336
17  com.apple.WebCore             	0x000000011dbe2ec8 WebCore::HTMLDocumentParser::pumpTokenizer(WebCore::HTMLDocumentParser::SynchronousMode) + 424
18  com.apple.WebCore             	0x000000011dbe2a3b WebCore::HTMLDocumentParser::pumpTokenizerIfPossible(WebCore::HTMLDocumentParser::SynchronousMode) + 171
19  com.apple.WebCore             	0x000000011dbe5be9 WebCore::HTMLDocumentParser::resumeParsingAfterScriptExecution() + 377
20  com.apple.WebCore             	0x000000011dbe5fee WebCore::HTMLDocumentParser::notifyFinished(WebCore::PendingScript&) + 366
21  com.apple.WebCore             	0x000000011dbe604c non-virtual thunk to WebCore::HTMLDocumentParser::notifyFinished(WebCore::PendingScript&) + 44
22  com.apple.WebCore             	0x000000011d883e17 WebCore::PendingScript::notifyClientFinished() + 71
23  com.apple.WebCore             	0x000000011d883e79 WebCore::PendingScript::notifyFinished(WebCore::LoadableScript&) + 25
24  com.apple.WebCore             	0x000000011d836f89 WebCore::LoadableScript::notifyClientFinished() + 329
25  com.apple.WebCore             	0x000000011d836d8f WebCore::LoadableClassicScript::notifyFinished(WebCore::CachedResource&) + 927
26  com.apple.WebCore             	0x000000011d83700c non-virtual thunk to WebCore::LoadableClassicScript::notifyFinished(WebCore::CachedResource&) + 44
27  com.apple.WebCore             	0x000000011defba8d WebCore::CachedResource::checkNotify() + 125
28  com.apple.WebCore             	0x000000011deeeb51 WebCore::CachedResource::finishLoading(WebCore::SharedBuffer*) + 49
29  com.apple.WebCore             	0x000000011df2999f WebCore::CachedScript::finishLoading(WebCore::SharedBuffer*) + 143
30  com.apple.WebCore             	0x000000011de956da WebCore::SubresourceLoader::didFinishLoading(WebCore::NetworkLoadMetrics const&) + 794
31  com.apple.WebKit              	0x000000010ee1eccd WebKit::WebResourceLoader::didFinishResourceLoad(WebCore::NetworkLoadMetrics const&) + 141
32  com.apple.WebKit              	0x000000010ee2229a void IPC::callMemberFunctionImpl<WebKit::WebResourceLoader, void (WebKit::WebResourceLoader::*)(WebCore::NetworkLoadMetrics const&), std::__1::tuple<WebCore::NetworkLoadMetrics>, 0ul>(WebKit::WebResourceLoader*, void (WebKit::WebResourceLoader::*)(WebCore::NetworkLoadMetrics const&), std::__1::tuple<WebCore::NetworkLoadMetrics>&&, std::__1::integer_sequence<unsigned long, 0ul>) + 154
33  com.apple.WebKit              	0x000000010ee22100 void IPC::callMemberFunction<WebKit::WebResourceLoader, void (WebKit::WebResourceLoader::*)(WebCore::NetworkLoadMetrics const&), std::__1::tuple<WebCore::NetworkLoadMetrics>, std::__1::integer_sequence<unsigned long, 0ul> >(std::__1::tuple<WebCore::NetworkLoadMetrics>&&, WebKit::WebResourceLoader*, void (WebKit::WebResourceLoader::*)(WebCore::NetworkLoadMetrics const&)) + 96
34  com.apple.WebKit              	0x000000010ee21536 void IPC::handleMessage<Messages::WebResourceLoader::DidFinishResourceLoad, WebKit::WebResourceLoader, void (WebKit::WebResourceLoader::*)(WebCore::NetworkLoadMetrics const&)>(IPC::Decoder&, WebKit::WebResourceLoader*, void (WebKit::WebResourceLoader::*)(WebCore::NetworkLoadMetrics const&)) + 262
35  com.apple.WebKit              	0x000000010ee20c3c WebKit::WebResourceLoader::didReceiveWebResourceLoaderMessage(IPC::Connection&, IPC::Decoder&) + 636
36  com.apple.WebKit              	0x000000010e5a3ff9 WebKit::NetworkProcessConnection::didReceiveMessage(IPC::Connection&, IPC::Decoder&) + 169
37  com.apple.WebKit              	0x000000010e3657d3 IPC::Connection::dispatchMessage(IPC::Decoder&) + 51
38  com.apple.WebKit              	0x000000010e35b3f8 IPC::Connection::dispatchMessage(std::__1::unique_ptr<IPC::Decoder, std::__1::default_delete<IPC::Decoder> >) + 712
39  com.apple.WebKit              	0x000000010e365dda IPC::Connection::dispatchOneMessage() + 1530
40  com.apple.WebKit              	0x000000010e37dbfd IPC::Connection::enqueueIncomingMessage(std::__1::unique_ptr<IPC::Decoder, std::__1::default_delete<IPC::Decoder> >)::$_14::operator()() + 29
41  com.apple.WebKit              	0x000000010e37db59 WTF::Function<void ()>::CallableWrapper<IPC::Connection::enqueueIncomingMessage(std::__1::unique_ptr<IPC::Decoder, std::__1::default_delete<IPC::Decoder> >)::$_14>::call() + 25
42  JavaScriptCore                	0x00000001193daafb WTF::Function<void ()>::operator()() const + 139
43  JavaScriptCore                	0x000000011941e34d WTF::RunLoop::performWork() + 445
44  JavaScriptCore                	0x000000011941eac4 WTF::RunLoop::performWork(void*) + 36
45  com.apple.CoreFoundation      	0x000000010cf222b1 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
46  com.apple.CoreFoundation      	0x000000010cfc1d31 __CFRunLoopDoSource0 + 81
47  com.apple.CoreFoundation      	0x000000010cf06c19 __CFRunLoopDoSources0 + 185
48  com.apple.CoreFoundation      	0x000000010cf061ff __CFRunLoopRun + 1279
49  com.apple.CoreFoundation      	0x000000010cf05a89 CFRunLoopRunSpecific + 409
50  com.apple.Foundation          	0x000000010c242e5e -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 274
51  com.apple.Foundation          	0x000000010c242d39 -[NSRunLoop(NSRunLoop) run] + 76
52  libxpc.dylib                  	0x0000000112a840d9 _xpc_objc_main + 460
53  libxpc.dylib                  	0x0000000112a864cb xpc_main + 143
54  com.apple.WebKit.WebContent   	0x000000010c196bfe main + 894
55  libdyld.dylib                 	0x000000010dfe2d81 start + 1
Comment 6 youenn fablet 2018-02-05 13:14:08 PST
Isn't it more https://trac.webkit.org/changeset/228103 from which things started to crash?
Comment 7 Matt Lewis 2018-02-05 13:15:35 PST
(In reply to Matt Lewis from comment #5)
> This patch is causing a crash in multiple tests on iOS and Mac debug WK1 at
> the moment and its causing EWS to fail.
> 
> build:
> https://build.webkit.org/results/
> Apple%20iOS%2011%20Simulator%20Debug%20WK2%20(Tests)/r228106%20(2536)/
> results.html
> https://build.webkit.org/builders/
> Apple%20iOS%2011%20Simulator%20Debug%20WK2%20(Tests)/builds/2536
> 
> 
This was attributed to the wrong bug. the correct bug is https://bugs.webkit.org/show_bug.cgi?id=182488