CacheStorage hangs |
||||||||||||
Issue descriptionThis is really a continuation of issue 605663 but I'm creating a new issue since that was merged already. The race between CacheStorage and QuotaManager has emerged once again. 1) Start a Cache::Put but before it checks quota size for the first time.. 2) Run CacheStorage::Match The Cache::Put will ask QuotaManager for storage size which will enqueue as a task in CacheStorage, but first match has to finish. But match can't finish until Put does, and we're hung. Issue 605663 fixed one way this race could occur but clearly left holes. We need a better solution.
,
Jun 20 2016
Implementing the fix in https://codereview.chromium.org/2085583002/. The CacheStorageCache will still call GetUsageAndQuota but it will do so before scheduling the operation. This means the storage estimate might happen well before the operation actually runs but at least it won't hang.
,
Jun 21 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/36dc82c2b7539b33b63cb6f967feae265625d178 commit 36dc82c2b7539b33b63cb6f967feae265625d178 Author: jkarlin <jkarlin@chromium.org> Date: Tue Jun 21 15:53:06 2016 [CacheStorage] Don't call GetUsageAndQuota from a scheduled operation Scheduled operations run sequentially. GetUsageAndQuota() can sometimes create a new Size() scheduled operation, so calling it while in a scheduled operation can result in a hung CacheStorage. This CL moves the calls to GetUsageAndQuota to just before the operations are scheduled. This means that the size estimate is less accurate, as it's determined potentially well before the operation runs. BUG= 620713 Review-Url: https://codereview.chromium.org/2085583002 Cr-Commit-Position: refs/heads/master@{#401001} [modify] https://crrev.com/36dc82c2b7539b33b63cb6f967feae265625d178/content/browser/cache_storage/cache_storage_cache.cc [modify] https://crrev.com/36dc82c2b7539b33b63cb6f967feae265625d178/content/browser/cache_storage/cache_storage_cache.h [modify] https://crrev.com/36dc82c2b7539b33b63cb6f967feae265625d178/content/browser/cache_storage/cache_storage_cache_unittest.cc
,
Jun 21 2016
Requesting merge into beta (m52) after this has baked for a day in canary.
,
Jun 21 2016
Also requesting merge to stable (m51) after baking in canary. This is a significant bug that has been hanging multiple sites.
,
Jun 21 2016
Approving merge to M52 branch 2743 based on comment #4. Please merge ASAP possibly before 4:00 PM PST today so we can take it for this week beta release. Thank you.
,
Jun 21 2016
Also is this change applicable to All OS or any specific OS?
,
Jun 21 2016
All, updating the flag. Working on landing now.
,
Jun 21 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/91b7985947d77fcc337c03248508acf3ed018ce6 commit 91b7985947d77fcc337c03248508acf3ed018ce6 Author: Josh Karlin <jkarlin@chromium.org> Date: Tue Jun 21 19:01:12 2016 [CacheStorage] Don't call GetUsageAndQuota from a scheduled operation Merge into M52. Scheduled operations run sequentially. GetUsageAndQuota() can sometimes create a new Size() scheduled operation, so calling it while in a scheduled operation can result in a hung CacheStorage. This CL moves the calls to GetUsageAndQuota to just before the operations are scheduled. This means that the size estimate is less accurate, as it's determined potentially well before the operation runs. BUG= 620713 Review-Url: https://codereview.chromium.org/2085583002 Cr-Commit-Position: refs/heads/master@{#401001} (cherry picked from commit 36dc82c2b7539b33b63cb6f967feae265625d178) Review URL: https://codereview.chromium.org/2081283002 . Cr-Commit-Position: refs/branch-heads/2743@{#434} Cr-Branched-From: 2b3ae3b8090361f8af5a611712fc1a5ab2de53cb-refs/heads/master@{#394939} [modify] https://crrev.com/91b7985947d77fcc337c03248508acf3ed018ce6/content/browser/cache_storage/cache_storage_cache.cc [modify] https://crrev.com/91b7985947d77fcc337c03248508acf3ed018ce6/content/browser/cache_storage/cache_storage_cache.h [modify] https://crrev.com/91b7985947d77fcc337c03248508acf3ed018ce6/content/browser/cache_storage/cache_storage_cache_unittest.cc
,
Jun 22 2016
@jkarlin, i have tried using the steps to reproduce in issue 605773 as this bug was filed as continuation. Steps: 1. Open an incognito tab 2. Go to https://events.google.com/io2016/ 3. Wait for "Caching Complete!" toast I am able to see the Caching complete toast when i navigate to the above URL by opening a new incognito window. The toast is not seen when opened a new tab in the same incognito window. Is this expected behavior ? OS --> Win7 / 64 bit Build --> 52.0.2743.49
,
Jun 22 2016
That's the correct behavior, I believe the toast is only for the initial cache.
,
Jun 22 2016
[Automated comment] Request affecting a post-stable build (M51), manual review required.
,
Jun 22 2016
Thank you jkarlin@ for confirming the behavior. Verified and the fix works fine on Mac OSX 10.11.5 & Linux/Ubuntu 14.04 - 52.0.2743.49 [Beta] Hence marking the TE-Verified labels. Not marking the bug as Verified as the merge is still pending for M51 branch.
,
Jun 30 2016
Approving merge to M51 branch 2704 based on comment #5 & #13. Please merge asap. Thank you.
,
Jul 1 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/64d27590ccffe40abab3e9560bd886f3624eff23 commit 64d27590ccffe40abab3e9560bd886f3624eff23 Author: Josh Karlin <jkarlin@chromium.org> Date: Fri Jul 01 13:16:10 2016 [CacheStorage] Don't call GetUsageAndQuota from a scheduled operation Merge into branch 2704 Scheduled operations run sequentially. GetUsageAndQuota() can sometimes create a new Size() scheduled operation, so calling it while in a scheduled operation can result in a hung CacheStorage. This CL moves the calls to GetUsageAndQuota to just before the operations are scheduled. This means that the size estimate is less accurate, as it's determined potentially well before the operation runs. BUG= 620713 Review-Url: https://codereview.chromium.org/2085583002 Cr-Commit-Position: refs/heads/master@{#401001} (cherry picked from commit 36dc82c2b7539b33b63cb6f967feae265625d178) Review URL: https://codereview.chromium.org/2116783002 . Cr-Commit-Position: refs/branch-heads/2704@{#729} Cr-Branched-From: 6e53600def8f60d8c632fadc70d7c1939ccea347-refs/heads/master@{#386251} [modify] https://crrev.com/64d27590ccffe40abab3e9560bd886f3624eff23/content/browser/cache_storage/cache_storage_cache.cc [modify] https://crrev.com/64d27590ccffe40abab3e9560bd886f3624eff23/content/browser/cache_storage/cache_storage_cache.h [modify] https://crrev.com/64d27590ccffe40abab3e9560bd886f3624eff23/content/browser/cache_storage/cache_storage_cache_unittest.cc |
||||||||||||
►
Sign in to add a comment |
||||||||||||
Comment 1 by jkarlin@chromium.org
, Jun 16 2016