Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(495)

Issue 2970133002: DoomPartialEntry should not attempt to doom an already doomed entry. (Closed)

Created:
3 years, 5 months ago by shivanisha
Modified:
3 years, 5 months ago
Reviewers:
jkarlin
CC:
cbentzel+watch_chromium.org, chromium-reviews, gavinp+disk_chromium.org, net-reviews_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

DoomPartialEntry should not attempt to doom an already doomed entry. I was not able to reproduce the crash reported but here is a speculative fix. This is a scenario where a partial transaction needs to create a new entry and doom the existing one since it cannot validate itself against the new entry, due to, say, there are no strong validators. The crash requires a specific race with another transaction for the same entry with LOAD_BYPASS_CACHE set due to which the second transaction straight away goes and dooms the entry (DoDoomEntry*) while the first one had opened the entry but not yet reached DoomPartialEntry. This race is much more likely after the parallel validation CL (https://codereview.chromium.org/2721933002) because add to entry is always an async operation now. This CL adds a check that the entry is not already doomed before calling cache_->DoomEntry in DoomPartialEntry and in one other calling location in DoSuccessfulSendRequest as it may happen there as well. BUG=736993 Review-Url: https://codereview.chromium.org/2970133002 Cr-Commit-Position: refs/heads/master@{#486869} Committed: https://chromium.googlesource.com/chromium/src/+/2b6e7ee275a56e425ce1396a7288a92756872e1d

Patch Set 1 : Initial patch #

Patch Set 2 : Test and test framework changes added. #

Total comments: 12

Patch Set 3 : Added tests and changes to test framework. #

Patch Set 4 : Rebased with refs/heads/master@{#485330} #

Total comments: 5

Patch Set 5 : Feedback addressed #

Patch Set 6 : GetDiskEntryRef added and doomed_entries_ removed #

Total comments: 4

Patch Set 7 : Feedback addressed #

Total comments: 4

Patch Set 8 : Feedback addressed #

Unified diffs Side-by-side diffs Delta from patch set Stats (+278 lines, -17 lines) Patch
M net/http/http_cache.h View 1 2 3 1 chunk +3 lines, -1 line 0 comments Download
M net/http/http_cache_transaction.cc View 1 2 3 2 chunks +6 lines, -3 lines 0 comments Download
M net/http/http_cache_unittest.cc View 1 2 3 4 5 6 6 chunks +183 lines, -5 lines 0 comments Download
M net/http/mock_http_cache.h View 1 2 3 4 5 6 7 6 chunks +37 lines, -1 line 0 comments Download
M net/http/mock_http_cache.cc View 1 2 3 4 5 6 7 6 chunks +49 lines, -7 lines 0 comments Download

Messages

Total messages: 71 (54 generated)
shivanisha
Josh, PTAL, Thanks!
3 years, 5 months ago (2017-07-05 16:42:30 UTC) #14
shivanisha
PTAL, Thanks! The latest patch has a test added and test framework additions to pause ...
3 years, 5 months ago (2017-07-07 16:17:11 UTC) #22
jkarlin
https://codereview.chromium.org/2970133002/diff/80001/net/http/mock_http_cache.cc File net/http/mock_http_cache.cc (right): https://codereview.chromium.org/2970133002/diff/80001/net/http/mock_http_cache.cc#newcode138 net/http/mock_http_cache.cc:138: } This seems overly complex for our use case. ...
3 years, 5 months ago (2017-07-07 19:12:39 UTC) #25
jkarlin
https://codereview.chromium.org/2970133002/diff/80001/net/http/mock_http_cache.cc File net/http/mock_http_cache.cc (right): https://codereview.chromium.org/2970133002/diff/80001/net/http/mock_http_cache.cc#newcode138 net/http/mock_http_cache.cc:138: } On 2017/07/07 19:12:39, jkarlin_slow wrote: > This seems ...
3 years, 5 months ago (2017-07-07 19:14:12 UTC) #26
jkarlin
https://codereview.chromium.org/2970133002/diff/80001/net/http/http_cache_unittest.cc File net/http/http_cache_unittest.cc (right): https://codereview.chromium.org/2970133002/diff/80001/net/http/http_cache_unittest.cc#newcode1483 net/http/http_cache_unittest.cc:1483: // assertion hit. (crbug.com/736993) After F2F we discussed that ...
3 years, 5 months ago (2017-07-07 20:03:16 UTC) #27
shivanisha
PTAL, Thanks! https://codereview.chromium.org/2970133002/diff/80001/net/http/http_cache_unittest.cc File net/http/http_cache_unittest.cc (right): https://codereview.chromium.org/2970133002/diff/80001/net/http/http_cache_unittest.cc#newcode1483 net/http/http_cache_unittest.cc:1483: // assertion hit. (crbug.com/736993) On 2017/07/07 at ...
3 years, 5 months ago (2017-07-10 18:51:31 UTC) #32
jkarlin
https://codereview.chromium.org/2970133002/diff/180001/net/http/mock_http_cache.cc File net/http/mock_http_cache.cc (right): https://codereview.chromium.org/2970133002/diff/180001/net/http/mock_http_cache.cc#newcode425 net/http/mock_http_cache.cc:425: // It's possible that the entry was doomed directly ...
3 years, 5 months ago (2017-07-12 16:15:55 UTC) #44
shivanisha
https://codereview.chromium.org/2970133002/diff/180001/net/http/mock_http_cache.cc File net/http/mock_http_cache.cc (right): https://codereview.chromium.org/2970133002/diff/180001/net/http/mock_http_cache.cc#newcode425 net/http/mock_http_cache.cc:425: // It's possible that the entry was doomed directly ...
3 years, 5 months ago (2017-07-12 17:56:32 UTC) #45
shivanisha
PTAL, Thanks! https://codereview.chromium.org/2970133002/diff/180001/net/http/mock_http_cache.cc File net/http/mock_http_cache.cc (right): https://codereview.chromium.org/2970133002/diff/180001/net/http/mock_http_cache.cc#newcode425 net/http/mock_http_cache.cc:425: // It's possible that the entry was ...
3 years, 5 months ago (2017-07-13 14:47:27 UTC) #46
shivanisha
PTAL, Thanks! As discussed f2f, removed doomed_entry_ map and the associated functions. Added a GetDiskEntryRef() ...
3 years, 5 months ago (2017-07-13 16:26:20 UTC) #49
jkarlin
https://codereview.chromium.org/2970133002/diff/220001/net/http/mock_http_cache.h File net/http/mock_http_cache.h (right): https://codereview.chromium.org/2970133002/diff/220001/net/http/mock_http_cache.h#newcode190 net/http/mock_http_cache.h:190: int ResumeCacheOperation(); It's unclear when you should get the ...
3 years, 5 months ago (2017-07-13 17:27:25 UTC) #50
shivanisha
https://codereview.chromium.org/2970133002/diff/220001/net/http/mock_http_cache.h File net/http/mock_http_cache.h (right): https://codereview.chromium.org/2970133002/diff/220001/net/http/mock_http_cache.h#newcode190 net/http/mock_http_cache.h:190: int ResumeCacheOperation(); On 2017/07/13 at 17:27:24, jkarlin wrote: > ...
3 years, 5 months ago (2017-07-13 18:53:19 UTC) #55
shivanisha
https://codereview.chromium.org/2970133002/diff/220001/net/http/mock_http_cache.h File net/http/mock_http_cache.h (right): https://codereview.chromium.org/2970133002/diff/220001/net/http/mock_http_cache.h#newcode195 net/http/mock_http_cache.h:195: MockDiskEntry* GetDiskEntryRef(const std::string& key); On 2017/07/13 at 17:27:25, jkarlin ...
3 years, 5 months ago (2017-07-13 18:53:45 UTC) #56
jkarlin
lgtm with a couple of comments https://codereview.chromium.org/2970133002/diff/240001/net/http/mock_http_cache.cc File net/http/mock_http_cache.cc (right): https://codereview.chromium.org/2970133002/diff/240001/net/http/mock_http_cache.cc#newcode142 net/http/mock_http_cache.cc:142: int MockDiskEntry::ResumeDiskEntryOperation() { ...
3 years, 5 months ago (2017-07-14 16:45:43 UTC) #59
shivanisha
Thanks Josh! https://codereview.chromium.org/2970133002/diff/240001/net/http/mock_http_cache.cc File net/http/mock_http_cache.cc (right): https://codereview.chromium.org/2970133002/diff/240001/net/http/mock_http_cache.cc#newcode142 net/http/mock_http_cache.cc:142: int MockDiskEntry::ResumeDiskEntryOperation() { On 2017/07/14 at 16:45:42, ...
3 years, 5 months ago (2017-07-14 16:56:49 UTC) #62
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2970133002/260001
3 years, 5 months ago (2017-07-14 20:26:53 UTC) #67
commit-bot: I haz the power
3 years, 5 months ago (2017-07-14 20:32:54 UTC) #71
Message was sent while issue was closed.
Committed patchset #8 (id:260001) as
https://chromium.googlesource.com/chromium/src/+/2b6e7ee275a56e425ce1396a7288...

Powered by Google App Engine
This is Rietveld 408576698