Chromium Debug DCHECK while launching, due to cache size mismatch |
||||
Issue descriptionChrome Version: 57.0.2972.0 OS: Windows What steps will reproduce the problem? Not entirely sure; I was running Chromium having had the previous run crash while reloading my session. It appears that this DCHECK was added in https://codereview.chromium.org/2416713002.
,
Jan 5 2017
Thanks for the report wez! cmumford@ on the bright side, it's only about 50 bytes off.
,
Jan 6 2017
It looks like the size calculation can run concurrently with other mutable operations resulting in a temporary mismatch with the index size value. If a crash occurs before the index is updated then this bug can occur. One way to fix this is by removing the DCHECK, and another is to schedule the size calculation to avoid concurrency - but this will have a performance impact.
,
Jan 6 2017
What is the impact of a size mismatch? How is the cached size calculation actually used?
,
Jan 6 2017
It's used by the quota manager. If a cache is opened then the size will get fixed in the index, but if it ever gets mismatched, and isn't opened then the quota manager will never have the correct size. I'm testing a fix for this now: https://codereview.chromium.org/2613183003/
,
Jan 10 2017
This is happening on ChromeOS as well.
,
Jan 11 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/3418f524d88d8851f26ea6a9ea0ac04cf6aea332 commit 3418f524d88d8851f26ea6a9ea0ac04cf6aea332 Author: cmumford <cmumford@chromium.org> Date: Wed Jan 11 23:50:14 2017 [CacheStorage] Updating cache size within the scheduled operation. Previously scheduled cache mutation operations would begin the size update calculation and then return to potentially begin another mutation operation in parallel with the running size update calculation. This could result in size held by CacheStorage becoming mismatched with the actual cache size if Chrome were to crash before the index could be written. This change completes the size calculation before calling the closure to begin the next scheduled operation. BUG= 678455 Review-Url: https://codereview.chromium.org/2613183003 Cr-Commit-Position: refs/heads/master@{#443059} [modify] https://crrev.com/3418f524d88d8851f26ea6a9ea0ac04cf6aea332/content/browser/cache_storage/cache_storage_cache.cc [modify] https://crrev.com/3418f524d88d8851f26ea6a9ea0ac04cf6aea332/content/browser/cache_storage/cache_storage_cache.h
,
Jan 13 2017
Just a heads up that this is still happening after the fix in #7. Let me know if I can do anything to help debug!
,
Jan 18 2017
{#443059} speculatively fixes the cause of this bug, but unfortunately the only to fix the cached size, is to open the cache - which hit's the DCHECK. I removed the DCHECK in {#444122}, and am adding some UMA logging (crrev.com/2636333002) to help verify this fix. Sorry for the hassle.
,
Feb 13 2017
Closing. UMA reports 99.99% of all cached sizes are within 1KB of the actual size. Will probably look into this at some time in the future, but if so will be in a new bug. |
||||
►
Sign in to add a comment |
||||
Comment 1 by w...@chromium.org
, Jan 5 2017Summary: Chromium Debug DCHECK while launching, due to cache size mismatch (was: Chromium Debug DCHECK while launching)