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

Issue 22859060: Fix race condition for non-open/create operations happening after a doom. (Closed)

Created:
7 years, 4 months ago by Philippe
Modified:
7 years, 3 months ago
CC:
chromium-reviews, cbentzel+watch_chromium.org, gavinp+disk_chromium.org
Visibility:
Public.

Description

Fix race condition for non-open/create operations happening after a doom. Doom used not to be treated as a regular operation in the sense that it didn't use the pending operations queue. Therefore it was possible to kick off a doom operation on an entry while another one was happening. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=222014

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Total comments: 21

Patch Set 4 : Address Gavin's and Thomas' comments #

Total comments: 3

Patch Set 5 : Remove code unintentionally relying on undefined behavior (oops :)) #

Patch Set 6 : Fix parameters alignment #

Total comments: 1

Patch Set 7 : Add STATE_DOOMED state #

Patch Set 8 : Only make doom operations use the pending operations queue #

Total comments: 15

Patch Set 9 : Address Randy's comments #

Patch Set 10 : Address Randy's comment #

Patch Set 11 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+88 lines, -44 lines) Patch
M net/disk_cache/entry_unittest.cc View 1 2 3 4 5 6 7 8 9 10 4 chunks +3 lines, -16 lines 0 comments Download
M net/disk_cache/simple/simple_entry_impl.h View 1 2 3 4 5 6 7 8 9 10 3 chunks +12 lines, -2 lines 0 comments Download
M net/disk_cache/simple/simple_entry_impl.cc View 1 2 3 4 5 6 7 8 9 10 7 chunks +26 lines, -8 lines 0 comments Download
M net/disk_cache/simple/simple_entry_operation.h View 1 2 2 chunks +5 lines, -0 lines 0 comments Download
M net/disk_cache/simple/simple_entry_operation.cc View 1 2 3 6 chunks +32 lines, -5 lines 0 comments Download
M net/disk_cache/simple/simple_synchronous_entry.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +6 lines, -8 lines 0 comments Download
M net/disk_cache/simple/simple_synchronous_entry.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +4 lines, -5 lines 0 comments Download

Messages

Total messages: 37 (0 generated)
Philippe
PTAL :)
7 years, 3 months ago (2013-08-26 17:01:38 UTC) #1
gavinp
reviewers +ttuttle who I know has been looking at this issue.
7 years, 3 months ago (2013-08-26 19:53:48 UTC) #2
gavinp
Right now, SimpleIndex::StartEvictionIfNeeded bypasses the logic in SimpleBackendImpl::IndexReadyForDoom. How should we unify them? Move this ...
7 years, 3 months ago (2013-08-26 20:36:50 UTC) #3
gavinp
Please run more tries on future uploads. Always happy to see a row of green ...
7 years, 3 months ago (2013-08-26 20:41:37 UTC) #4
Deprecated (see juliatuttle)
https://codereview.chromium.org/22859060/diff/5001/net/disk_cache/simple/simple_backend_impl.cc File net/disk_cache/simple/simple_backend_impl.cc (right): https://codereview.chromium.org/22859060/diff/5001/net/disk_cache/simple/simple_backend_impl.cc#newcode215 net/disk_cache/simple/simple_backend_impl.cc:215: // Used only by mass dooming to execute the ...
7 years, 3 months ago (2013-08-26 21:34:18 UTC) #5
Philippe
Thanks guys! I suggest Gavin that we do the bigger refactoring in a follow up ...
7 years, 3 months ago (2013-08-27 11:33:29 UTC) #6
Philippe
Adding Randy who looks like the expert on the subject :) Sorry for no consulting ...
7 years, 3 months ago (2013-08-27 15:32:13 UTC) #7
Randy Smith (Not in Mondays)
On Tue, Aug 27, 2013 at 11:32 AM, <pliard@chromium.org> wrote: > Adding Randy who looks ...
7 years, 3 months ago (2013-08-27 15:40:03 UTC) #8
gavinp
https://codereview.chromium.org/22859060/diff/5001/net/disk_cache/backend_unittest.cc File net/disk_cache/backend_unittest.cc (right): https://codereview.chromium.org/22859060/diff/5001/net/disk_cache/backend_unittest.cc#newcode2685 net/disk_cache/backend_unittest.cc:2685: entry1->Close(); On 2013/08/27 11:33:30, Philippe wrote: > On 2013/08/26 ...
7 years, 3 months ago (2013-08-27 15:48:01 UTC) #9
Philippe
https://codereview.chromium.org/22859060/diff/5001/net/disk_cache/backend_unittest.cc File net/disk_cache/backend_unittest.cc (right): https://codereview.chromium.org/22859060/diff/5001/net/disk_cache/backend_unittest.cc#newcode2685 net/disk_cache/backend_unittest.cc:2685: entry1->Close(); On 2013/08/27 15:48:02, gavinp wrote: > On 2013/08/27 ...
7 years, 3 months ago (2013-08-27 16:11:21 UTC) #10
Deprecated (see juliatuttle)
https://codereview.chromium.org/22859060/diff/18001/net/disk_cache/simple/simple_backend_impl.cc File net/disk_cache/simple/simple_backend_impl.cc (right): https://codereview.chromium.org/22859060/diff/18001/net/disk_cache/simple/simple_backend_impl.cc#newcode377 net/disk_cache/simple/simple_backend_impl.cc:377: removed_key_hashes->size())); On 2013/08/27 15:48:02, gavinp wrote: > What was ...
7 years, 3 months ago (2013-08-27 16:44:37 UTC) #11
Philippe
https://codereview.chromium.org/22859060/diff/18001/net/disk_cache/simple/simple_backend_impl.cc File net/disk_cache/simple/simple_backend_impl.cc (right): https://codereview.chromium.org/22859060/diff/18001/net/disk_cache/simple/simple_backend_impl.cc#newcode377 net/disk_cache/simple/simple_backend_impl.cc:377: removed_key_hashes->size())); On 2013/08/27 16:44:37, ttuttle wrote: > On 2013/08/27 ...
7 years, 3 months ago (2013-08-27 16:58:56 UTC) #12
Randy Smith (Not in Mondays)
On 2013/08/27 11:33:29, Philippe wrote: > Thanks guys! > > I suggest Gavin that we ...
7 years, 3 months ago (2013-08-27 17:14:38 UTC) #13
Philippe
PTAL :) I have just added a doomed state to recreate the synchronous entry when ...
7 years, 3 months ago (2013-08-27 18:20:52 UTC) #14
Randy Smith (Not in Mondays)
Understood about the experimentation, Philippe; go to! But I want to flail around a bit ...
7 years, 3 months ago (2013-08-27 19:16:39 UTC) #15
gavinp
I don't think the ActiveEntry is the place to solve this. This CL as written ...
7 years, 3 months ago (2013-08-27 21:30:04 UTC) #16
Philippe
On 2013/08/27 21:30:04, gavinp wrote: > I don't think the ActiveEntry is the place to ...
7 years, 3 months ago (2013-08-28 08:46:34 UTC) #17
Philippe
Ok, I think you convinced me Gavin that keeping doomed entries active is probably not ...
7 years, 3 months ago (2013-08-28 14:05:51 UTC) #18
Randy Smith (Not in Mondays)
On Tuesday, August 27, 2013, wrote: > I don't think the ActiveEntry is the place ...
7 years, 3 months ago (2013-08-28 18:18:40 UTC) #19
Randy Smith (Not in Mondays)
On Wednesday, August 28, 2013, wrote: > > Randy, we are guaranteed that no operation ...
7 years, 3 months ago (2013-08-28 18:18:40 UTC) #20
gavinp
On 2013/08/28 18:18:40, rdsmith wrote: > On Tuesday, August 27, 2013, wrote: > > > ...
7 years, 3 months ago (2013-08-28 19:00:22 UTC) #21
gavinp
On 2013/08/28 18:18:40, rdsmith wrote: > On Wednesday, August 28, 2013, wrote: > > > ...
7 years, 3 months ago (2013-08-28 19:02:50 UTC) #22
gavinp
To illustrate the idea on the simple_backend_impl, I've uploaded https://codereview.chromium.org/23486006/ , which is downstream of ...
7 years, 3 months ago (2013-08-28 22:17:25 UTC) #23
gavinp
https://codereview.chromium.org/22859060/diff/60001/net/disk_cache/simple/simple_entry_impl.cc File net/disk_cache/simple/simple_entry_impl.cc (right): https://codereview.chromium.org/22859060/diff/60001/net/disk_cache/simple/simple_entry_impl.cc#newcode261 net/disk_cache/simple/simple_entry_impl.cc:261: pending_operations_.push(SimpleEntryOperation::DoomOperation(this, callback)); There's two things about this that might ...
7 years, 3 months ago (2013-08-29 19:31:39 UTC) #24
Philippe
Thanks Gavin. It's good that you have your last CL to address the pre-existing bug. ...
7 years, 3 months ago (2013-08-30 13:43:01 UTC) #25
gavinp
https://codereview.chromium.org/22859060/diff/60001/net/disk_cache/simple/simple_entry_impl.cc File net/disk_cache/simple/simple_entry_impl.cc (right): https://codereview.chromium.org/22859060/diff/60001/net/disk_cache/simple/simple_entry_impl.cc#newcode261 net/disk_cache/simple/simple_entry_impl.cc:261: pending_operations_.push(SimpleEntryOperation::DoomOperation(this, callback)); On 2013/08/30 13:43:02, Philippe wrote: > On ...
7 years, 3 months ago (2013-08-30 14:58:18 UTC) #26
Randy Smith (Not in Mondays)
Looking pretty good to me. https://codereview.chromium.org/22859060/diff/60001/net/disk_cache/entry_unittest.cc File net/disk_cache/entry_unittest.cc (left): https://codereview.chromium.org/22859060/diff/60001/net/disk_cache/entry_unittest.cc#oldcode2951 net/disk_cache/entry_unittest.cc:2951: static_cast<disk_cache::SimpleEntryImpl*>(entry)->HasOneRef()); Why could/will this ...
7 years, 3 months ago (2013-09-03 18:48:19 UTC) #27
Philippe
https://codereview.chromium.org/22859060/diff/60001/net/disk_cache/entry_unittest.cc File net/disk_cache/entry_unittest.cc (left): https://codereview.chromium.org/22859060/diff/60001/net/disk_cache/entry_unittest.cc#oldcode2951 net/disk_cache/entry_unittest.cc:2951: static_cast<disk_cache::SimpleEntryImpl*>(entry)->HasOneRef()); On 2013/09/03 18:48:19, rdsmith wrote: > Why could/will ...
7 years, 3 months ago (2013-09-04 09:35:22 UTC) #28
Randy Smith (Not in Mondays)
LGTM. https://codereview.chromium.org/22859060/diff/60001/net/disk_cache/simple/simple_synchronous_entry.h File net/disk_cache/simple/simple_synchronous_entry.h (right): https://codereview.chromium.org/22859060/diff/60001/net/disk_cache/simple/simple_synchronous_entry.h#newcode88 net/disk_cache/simple/simple_synchronous_entry.h:88: // code. On 2013/09/04 09:35:23, Philippe wrote: > ...
7 years, 3 months ago (2013-09-04 15:44:16 UTC) #29
Philippe
Thanks Randy! https://codereview.chromium.org/22859060/diff/60001/net/disk_cache/simple/simple_synchronous_entry.h File net/disk_cache/simple/simple_synchronous_entry.h (right): https://codereview.chromium.org/22859060/diff/60001/net/disk_cache/simple/simple_synchronous_entry.h#newcode88 net/disk_cache/simple/simple_synchronous_entry.h:88: // code. On 2013/09/04 15:44:16, rdsmith wrote: ...
7 years, 3 months ago (2013-09-04 15:50:31 UTC) #30
gavinp
We identified a few tests we needed while hacking at this CL, right? What's the ...
7 years, 3 months ago (2013-09-05 21:12:44 UTC) #31
Philippe
On 2013/09/05 21:12:44, gavinp wrote: > We identified a few tests we needed while hacking ...
7 years, 3 months ago (2013-09-06 08:33:35 UTC) #32
gavinp
On 2013/09/06 08:33:35, Philippe wrote: > On 2013/09/05 21:12:44, gavinp wrote: > > We identified ...
7 years, 3 months ago (2013-09-06 22:31:32 UTC) #33
gavinp
LGTM. Thanks!
7 years, 3 months ago (2013-09-06 22:33:06 UTC) #34
Philippe
Thanks Gavin!
7 years, 3 months ago (2013-09-09 08:35:44 UTC) #35
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/pliard@chromium.org/22859060/92001
7 years, 3 months ago (2013-09-09 08:36:48 UTC) #36
commit-bot: I haz the power
7 years, 3 months ago (2013-09-09 12:43:07 UTC) #37
Message was sent while issue was closed.
Change committed as 222014

Powered by Google App Engine
This is Rietveld 408576698