New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 616358 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jun 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 1
Type: Bug



Sign in to add a comment

ResourceFetcher: assertion fails

Project Member Reported by toyoshim@chromium.org, Jun 1 2016

Issue description

Version: 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]
[
 
For record:

chrome://version

Chromium	53.0.2754.0 (Developer Build) (64-bit)
Revision	205aa7069735c0c05a0d18ca20e0de53054f90c0-refs/heads/master@{#396792}
OS	Linux 
Blink	537.36 (@205aa7069735c0c05a0d18ca20e0de53054f90c0)
JavaScript	V8 5.3.69
Flash	(Disabled)
User Agent	Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2754.0 Safari/537.36
Command Line	./out/Release/chrome --window-depth=24 --x11-visual-id=33 --wm-user-time-ms=114151286 --flag-switches-begin --flag-switches-end
Executable Path	/ssd/chromium/src/out/Release/chrome
Profile Path	/usr/local/google/home/toyoshim/.config/chromium/Default
Variations	ba3f87da-92cc81ec
f049a919-3f4a17df
dd4da2fc-3f4a17df
43d0dd1e-3f4a17df
64cbdfc2-3f4a17df
b7786474-d93a0620
868bda90-3f4a17df
4ea303a6-3f4a17df
4117e878-7281dfa9
9736de91-3f4a17df
dbffab5d-f51b51
30e679f-3f4a17df
ad6d27cc-3e870323
867c4c68-3f4a17df
d747916f-d747916f
49d59758-3d47f4f4
fe05be5f-97e7f871
Note: Enabling chrome://flags/#enable-non-validating-reload-on-normal-reload hides this bug, as expected for this happening in sub resource revalidation.
Labels: Needs-Bisect
Labels: -Pri-3 Pri-1
Owner: toyoshim@chromium.org
Status: Assigned (was: Untriaged)
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().

Cc: yhirano@chromium.org
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.
Cc: hirosh...@chromium.org
Also ccing hiroshige, who has been landing some MemoryCache CLs.
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.
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?
Cc: kavvaru@chromium.org
Labels: Needs-Feedback
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,
616358.png
162 KB View Download
Labels: -Needs-Feedback -Needs-Bisect
kavvaru: This requires debug builds to reproduce.
Since we already know what happens here, I'll remove the Needs-Bisect label too.
Status: Started (was: Assigned)
An fix is under review.
Project Member

Comment 12 by bugdroid1@chromium.org, 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

Status: Fixed (was: Started)
The fix based on Nate's idea was submitted.

Sign in to add a comment