Summary: | Crash in imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-origin.sub.html | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Ms2ger (he/him; ⌚ UTC+1/+2) <Ms2ger> | ||||||||||
Component: | Page Loading | Assignee: | youenn fablet <youennf> | ||||||||||
Status: | RESOLVED FIXED | ||||||||||||
Severity: | Normal | CC: | achristensen, ap, beidson, commit-queue, jer.noble, jlewis3, ryanhaddad, webkit-bug-importer, youennf | ||||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||||
Version: | WebKit Nightly Build | ||||||||||||
Hardware: | Unspecified | ||||||||||||
OS: | Unspecified | ||||||||||||
See Also: | https://bugs.webkit.org/show_bug.cgi?id=182335 | ||||||||||||
Attachments: |
|
Description
Ms2ger (he/him; ⌚ UTC+1/+2)
2018-02-02 01:24:28 PST
Whoa, ResourceLoader code certainly shouldn’t be running on a secondary thread. What were you doing when you hit this crash? Can you attach a complete crash log? Created attachment 333094 [details] Crash Log This crash occurred after https://bugs.webkit.org/show_bug.cgi?id=182335 I looks like the update caused the assertion failure to occur with this test on Debug platforms and the crash. While the crash is blaming other tests, this test is consistently crashing with the assertion. The test was marked as crashing in the same commit as the test being updated: https://trac.webkit.org/changeset/228003 Attaching the full crash. Here is the assertion: ASSERTION FAILED: WTF::isMainThread() /Volumes/Data/slave/highsierra-debug/build/Source/WebCore/loader/cache/MemoryCache.cpp(57) : static WebCore::MemoryCache &WebCore::MemoryCache::singleton() 1 0x1e06f605d WTFCrash 2 0x1d25b688a WebCore::MemoryCache::singleton() 3 0x1d252202f WebCore::SubresourceLoader::willCancel(WebCore::ResourceError const&) 4 0x1d250ca01 WebCore::ResourceLoader::cancel(WebCore::ResourceError const&) 5 0x1d250c94f WebCore::ResourceLoader::cancel() 6 0x1d252da22 WebCore::SubresourceLoader::willSendRequestInternal(WebCore::ResourceRequest&&, WebCore::ResourceResponse const&, WTF::CompletionHandler<void (WebCore::ResourceRequest&&)>&&)::$_0::operator()(WTF::CompletionHandler<void (WebCore::ResourceRequest&&)>&&, WebCore::ResourceRequest&&)::'lambda'(WebCore::ResourceRequest&&)::operator()(WebCore::ResourceRequest&&) 7 0x1d252d8d4 WTF::Function<void (WebCore::ResourceRequest&&)>::CallableWrapper<WebCore::SubresourceLoader::willSendRequestInternal(WebCore::ResourceRequest&&, WebCore::ResourceResponse const&, WTF::CompletionHandler<void (WebCore::ResourceRequest&&)>&&)::$_0::operator()(WTF::CompletionHandler<void (WebCore::ResourceRequest&&)>&&, WebCore::ResourceRequest&&)::'lambda'(WebCore::ResourceRequest&&)>::call(WebCore::ResourceRequest&&) 8 0x1d0b257ee WTF::Function<void (WebCore::ResourceRequest&&)>::operator()(WebCore::ResourceRequest&&) const 9 0x1d0b256f9 WTF::CompletionHandler<void (WebCore::ResourceRequest&&)>::operator()(WebCore::ResourceRequest&&) const 10 0x1d250bf3a WebCore::ResourceLoader::willSendRequestInternal(WebCore::ResourceRequest&&, WebCore::ResourceResponse const&, WTF::CompletionHandler<void (WebCore::ResourceRequest&&)>&&) 11 0x1d2520471 WebCore::SubresourceLoader::willSendRequestInternal(WebCore::ResourceRequest&&, WebCore::ResourceResponse const&, WTF::CompletionHandler<void (WebCore::ResourceRequest&&)>&&)::$_0::operator()(WTF::CompletionHandler<void (WebCore::ResourceRequest&&)>&&, WebCore::ResourceRequest&&) 12 0x1d2530de4 WebCore::SubresourceLoader::willSendRequestInternal(WebCore::ResourceRequest&&, WebCore::ResourceResponse const&, WTF::CompletionHandler<void (WebCore::ResourceRequest&&)>&&)::$_3::operator()(WebCore::ResourceRequest&&) 13 0x1d2530cf4 WTF::Function<void (WebCore::ResourceRequest&&)>::CallableWrapper<WebCore::SubresourceLoader::willSendRequestInternal(WebCore::ResourceRequest&&, WebCore::ResourceResponse const&, WTF::CompletionHandler<void (WebCore::ResourceRequest&&)>&&)::$_3>::call(WebCore::ResourceRequest&&) 14 0x1d0b257ee WTF::Function<void (WebCore::ResourceRequest&&)>::operator()(WebCore::ResourceRequest&&) const 15 0x1d0b256f9 WTF::CompletionHandler<void (WebCore::ResourceRequest&&)>::operator()(WebCore::ResourceRequest&&) const 16 0x1d258387b WebCore::CachedResource::redirectReceived(WebCore::ResourceRequest&&, WebCore::ResourceResponse const&, WTF::CompletionHandler<void (WebCore::ResourceRequest&&)>&&) 17 0x1d25a1cfc WebCore::CachedRawResource::redirectReceived(WebCore::ResourceRequest&&, WebCore::ResourceResponse const&, WTF::CompletionHandler<void (WebCore::ResourceRequest&&)>&&)::$_1::operator()(WebCore::ResourceRequest&&) 18 0x1d25a1bd4 WTF::Function<void (WebCore::ResourceRequest&&)>::CallableWrapper<WebCore::CachedRawResource::redirectReceived(WebCore::ResourceRequest&&, WebCore::ResourceResponse const&, WTF::CompletionHandler<void (WebCore::ResourceRequest&&)>&&)::$_1>::call(WebCore::ResourceRequest&&) 19 0x1d0b257ee WTF::Function<void (WebCore::ResourceRequest&&)>::operator()(WebCore::ResourceRequest&&) const 20 0x1d0b256f9 WTF::CompletionHandler<void (WebCore::ResourceRequest&&)>::operator()(WebCore::ResourceRequest&&) const 21 0x1d258398b WebCore::iterateClients(WebCore::CachedResourceClientWalker<WebCore::CachedRawResourceClient>&&, WebCore::CachedResourceHandle<WebCore::CachedRawResource>&&, WebCore::ResourceRequest&&, std::__1::unique_ptr<WebCore::ResourceResponse, std::__1::default_delete<WebCore::ResourceResponse> >&&, WTF::CompletionHandler<void (WebCore::ResourceRequest&&)>&&) 22 0x1d2597bd1 WebCore::iterateClients(WebCore::CachedResourceClientWalker<WebCore::CachedRawResourceClient>&&, WebCore::CachedResourceHandle<WebCore::CachedRawResource>&&, WebCore::ResourceRequest&&, std::__1::unique_ptr<WebCore::ResourceResponse, std::__1::default_delete<WebCore::ResourceResponse> >&&, WTF::CompletionHandler<void (WebCore::ResourceRequest&&)>&&)::$_5::operator()(WebCore::ResourceRequest&&) 23 0x1d2597934 WTF::Function<void (WebCore::ResourceRequest&&)>::CallableWrapper<WebCore::iterateClients(WebCore::CachedResourceClientWalker<WebCore::CachedRawResourceClient>&&, WebCore::CachedResourceHandle<WebCore::CachedRawResource>&&, WebCore::ResourceRequest&&, std::__1::unique_ptr<WebCore::ResourceResponse, std::__1::default_delete<WebCore::ResourceResponse> >&&, WTF::CompletionHandler<void (WebCore::ResourceRequest&&)>&&)::$_5>::call(WebCore::ResourceRequest&&) 24 0x1d0b257ee WTF::Function<void (WebCore::ResourceRequest&&)>::operator()(WebCore::ResourceRequest&&) const 25 0x1d0b256f9 WTF::CompletionHandler<void (WebCore::ResourceRequest&&)>::operator()(WebCore::ResourceRequest&&) const 26 0x1d34982d0 -[WebCoreNSURLSessionDataTask resource:receivedRedirect:request:completionHandler:]::$_11::operator()() 27 0x1d3497e59 WTF::Function<void ()>::CallableWrapper<-[WebCoreNSURLSessionDataTask resource:receivedRedirect:request:completionHandler:]::$_11>::call() 28 0x1d000d31b WTF::Function<void ()>::operator()() const 29 0x1d3490730 WTF::BlockPtr<void ()> WTF::BlockPtr<void ()>::fromCallable<WTF::Function<void ()> >(WTF::Function<void ()>)::'lambda'(void*)::operator()(void*) const 30 0x1d3490708 WTF::BlockPtr<void ()> WTF::BlockPtr<void ()>::fromCallable<WTF::Function<void ()> >(WTF::Function<void ()>)::'lambda'(void*)::__invoke(void*) 31 0x7fff349f622f __NSBLOCKOPERATION_IS_CALLING_OUT_TO_A_BLOCK__ LEAK: 2 WebPageProxy The crash can be found under other on this build: https://build.webkit.org/results/Apple%20High%20Sierra%20Debug%20WK2%20(Tests)/r228095%20(1931)/results.html I was able to reproduce the crash with: run-webkit-tests --no-retry-failure --verbose --debug imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-origin.sub.html I temporarily skipped the test in https://trac.webkit.org/changeset/228104/webkit Looked at it a bit. We are crashing in case of redirection in the video loading case. Issue might come from changes done in https://bugs.webkit.org/show_bug.cgi?id=179539. Created attachment 333101 [details]
Patch
Created attachment 333110 [details]
Patch
Comment on attachment 333110 [details]
Patch
Let's add a lambda wrapping the completion handler in WebCoreNSURLSessionDataTaskClient::redirectReceived and adding an assertion that we're on the main thread.
Created attachment 333129 [details]
Patch for landing
Comment on attachment 333129 [details] Patch for landing Clearing flags on attachment: 333129 Committed r228150: <https://trac.webkit.org/changeset/228150> All reviewed patches have been landed. Closing bug. |