ResourceFetcher: assertion fails |
|||||||||
Issue descriptionVersion: ToT with dcheck_always_on What steps will reproduce the problem? (1) Visit https://www.google.com/intl/en/chrome/browser/welcome.html (2) Push Reload button What is the expected output? Reloaded What do you see instead? Aw, Snap! Please use labels and text to provide additional information. ASSERTION FAILED: resource->isLoaded() ../../third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp(535) : void blink::ResourceFetcher::initializeRevalidation(const blink::FetchRequest &, blink::Resource *) 1 0x7f4e9bed8323 blink::ResourceFetcher::requestResource(blink::FetchRequest&, blink::ResourceFactory const&, blink::SubstituteData const&) 2 0x7f4e9beb8db8 3 0x7f4e9bcd6285 4 0x7f4e9bd173a7 5 0x7f4e9bd17b38 6 0x7f4e9bdbe61c 7 0x7f4e9bdbe7d6 8 0x7f4e9bdd3bf1 blink::StyleResolver::appendCSSStyleSheet(blink::CSSStyleSheet&) 9 0x7f4e9bdd3eeb blink::StyleResolver::appendAuthorStyleSheets(blink::HeapVector<blink::Member<blink::CSSStyleSheet>, 0ul> const&) 10 0x7f4e9c23a55c blink::StyleEngine::appendActiveAuthorStyleSheets() 11 0x7f4e9c23a894 blink::StyleEngine::createResolver() 12 0x7f4e9c18ef14 13 0x7f4e9c18cb3d blink::Document::ensureStyleResolver() const 14 0x7f4e9bd219b2 15 0x7f4e9bd213a8 16 0x7f4e9b952424 17 0x7f4ea22851fe 18 0x7f4ea22ca214 19 0x7f4ea22fff17 20 0x7f4ea22d70e5 21 0x33dd3b5063c7 Received signal 11 SEGV_MAPERR 0000fbadbeef #0 0x7f4ea76d2577 base::debug::(anonymous namespace)::StackDumpSignalHandler() #1 0x7f4ea135d330 <unknown> #2 0x7f4e9bed9341 blink::ResourceFetcher::initializeRevalidation() #3 0x7f4e9bed8323 blink::ResourceFetcher::requestResource() #4 0x7f4e9beb8db8 blink::FontResource::fetch() #5 0x7f4e9bcd6285 blink::CSSFontFaceSrcValue::fetch() #6 0x7f4e9bd173a7 blink::FontFace::initCSSFontFace() #7 0x7f4e9bd17b38 blink::FontFace::create() #8 0x7f4e9bdbe61c blink::ScopedStyleResolver::addFontFaceRules() #9 0x7f4e9bdbe7d6 blink::ScopedStyleResolver::appendCSSStyleSheet() #10 0x7f4e9bdd3bf1 blink::StyleResolver::appendCSSStyleSheet() #11 0x7f4e9bdd3eeb blink::StyleResolver::appendAuthorStyleSheets() #12 0x7f4e9c23a55c blink::StyleEngine::appendActiveAuthorStyleSheets() #13 0x7f4e9c23a894 blink::StyleEngine::createResolver() #14 0x7f4e9c18ef14 blink::StyleEngine::ensureResolver() #15 0x7f4e9c18cb3d blink::Document::ensureStyleResolver() #16 0x7f4e9bd219b2 blink::FontFaceSet::resolveFontStyle() #17 0x7f4e9bd213a8 blink::FontFaceSet::load() #18 0x7f4e9b952424 blink::FontFaceSetV8Internal::loadMethodCallback() #19 0x7f4ea22851fe v8::internal::FunctionCallbackArguments::Call() #20 0x7f4ea22ca214 v8::internal::(anonymous namespace)::HandleApiCallHelper() #21 0x7f4ea22fff17 v8::internal::Builtin_Impl_HandleApiCall() #22 0x7f4ea22d70e5 v8::internal::Builtin_HandleApiCall() #23 0x33dd3b5063c7 <unknown> r8: 00007f4e9444fa00 r9: 0000000000000001 r10: 00007f4e9ed59be0 r11: 0000000000000000 r12: 0000000000000001 r13: 000010532b5d54a8 r14: 000010532b51e298 r15: 00007ffe3ba12f58 di: 0000000000000000 si: 0000000000000000 bp: 00000000fbadbeef bx: 0000000000000000 dx: 0000000000000000 ax: 72881af67eadc100 cx: 00007f4ea77ae920 sp: 00007ffe3ba12940 ip: 00007f4e9bed9341 efl: 0000000000010246 cgf: 0000000000000033 erf: 0000000000000006 trp: 000000000000000e msk: 0000000000000000 cr2: 00000000fbadbeef [end of stack trace] [
,
Jun 1 2016
Note: Enabling chrome://flags/#enable-non-validating-reload-on-normal-reload hides this bug, as expected for this happening in sub resource revalidation.
,
Jun 1 2016
,
Jun 1 2016
Let me investigate a little since this may affect my field trial results. This isn't a common issue as we had a similar bug before, but happens only for one font at the site I mentioned in the description. https://fonts.gstatic.com/s/roboto/v15/CWB0XYA8bzo0kSThX0UTuA.woff2 This font was requested twice in the page from two different initiators, then two asserts fail in ResourceFetcher::initializeRevalidation().
,
Jun 1 2016
Hum... MemoryCache looks broken. The same resource is shared for both font references, but revalidation runs twice because revalidation policy is decided as Revalidate for the second request. m_status was NotStarted at the assertion failure point.
,
Jun 1 2016
Also ccing hiroshige, who has been landing some MemoryCache CLs.
,
Jun 1 2016
In requestResource(), the first request results in Revalidate, but returns an existing resource before calling resource->load() if resourceNeedsLoad() returns false. The second request also results in Revalidate because load() wasn't called, and initializerevalidation() fires assertions. In this second case, we should just return the existing resource (*1). What I'm planning is to add one more status to Resource::Status for this "revalidation is suspended" case to realize (*1), but I still need to check edge cases.
,
Jun 1 2016
Ideally, this woudln't require a new Resource::Status. Perhaps it would be sufficient to check the Resource's isCacheValidator() && stillNeedsLoad() to identify this case?
,
Jun 6 2016
Unable to reproduce the issue on windows 7, Linux Ubuntu 14.04 using chrome version 51.0.2704.79, beta 52.0.2743.24 and canary 53.0.2760.0 with the below steps 1.Go to URL https://www.google.com/intl/en/chrome/browser/welcome.html 2.Clicked on Reload button 3.Not seen any AW Snap error. Please find the attached screen shot and confirm anything missed here in triaging the issue.Could any one please suggest us to bisect the issue from test team end. Thanks,
,
Jun 6 2016
kavvaru: This requires debug builds to reproduce. Since we already know what happens here, I'll remove the Needs-Bisect label too.
,
Jun 7 2016
An fix is under review.
,
Jun 8 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/11fe1836e4c10b169106f39839504517e0d68a08 commit 11fe1836e4c10b169106f39839504517e0d68a08 Author: toyoshim <toyoshim@chromium.org> Date: Wed Jun 08 03:11:54 2016 ResourceFetcher: fix an assertion failure on defered resource revalidation On revalidating resources, e.g. for page reloads, if two initiators exist and the loading is defered, both initiators get 'Revalidate' revalidation policy in ResourceFetcher::requestResource() then it results in an assertion failure to initialize the resource as a cache validator. BUG= 616358 Review-Url: https://codereview.chromium.org/2039893002 Cr-Commit-Position: refs/heads/master@{#398468} [modify] https://crrev.com/11fe1836e4c10b169106f39839504517e0d68a08/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp [modify] https://crrev.com/11fe1836e4c10b169106f39839504517e0d68a08/third_party/WebKit/Source/core/fetch/ResourceFetcherTest.cpp
,
Jun 8 2016
The fix based on Nate's idea was submitted. |
|||||||||
►
Sign in to add a comment |
|||||||||
Comment 1 by toyoshim@chromium.org
, Jun 1 2016