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

Issue 2926453002: Fix a race condition in ~RegistryHashStoreContentsWin (Closed)

Created:
3 years, 6 months ago by proberge
Modified:
3 years, 6 months ago
Reviewers:
gab, wychen
CC:
chromium-reviews
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix a race condition in ~RegistryHashStoreContentsWin Enabling mojo-ification of Tracked Preference code highlighted a race condition in integration tests: two instances of RegistryHashStoreContentsWin for the same profile can destructed at the same time on different threads, causing one of the registry operations initiated by the destructor to fail. BUG=727282 Review-Url: https://codereview.chromium.org/2926453002 Cr-Original-Commit-Position: refs/heads/master@{#479020} Committed: https://chromium.googlesource.com/chromium/src/+/7c8c48226fd78ad01858284bd2ee91bed27b513c Review-Url: https://codereview.chromium.org/2926453002 Cr-Commit-Position: refs/heads/master@{#479123} Committed: https://chromium.googlesource.com/chromium/src/+/0901195b98d8c46db5a0d164e27a896345dc943c

Patch Set 1 #

Total comments: 4

Patch Set 2 : Address review comments, ran format #

Total comments: 1

Patch Set 3 : Share RefCounted object between pref stores, add unit test. #

Patch Set 4 : Add file I forgot to git add #

Total comments: 19

Patch Set 5 : Address review comments on #4 #

Patch Set 6 : Use MakeCopy in the test #

Total comments: 3

Patch Set 7 : Address review comments on #6 #

Patch Set 8 : Rebase, which also reverts a change from https://chromium-review.googlesource.com/527724 #

Patch Set 9 : Add explicit out of line destructor to fix clang warning #

Patch Set 10 : Add temp_scoped_dir_cleaner to a build file #

Unified diffs Side-by-side diffs Delta from patch set Stats (+201 lines, -42 lines) Patch
M services/preferences/tracked/BUILD.gn View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download
M services/preferences/tracked/registry_hash_store_contents_win.h View 1 2 3 4 5 6 7 8 2 chunks +19 lines, -8 lines 0 comments Download
M services/preferences/tracked/registry_hash_store_contents_win.cc View 1 2 3 4 5 6 7 8 3 chunks +31 lines, -18 lines 0 comments Download
M services/preferences/tracked/registry_hash_store_contents_win_unittest.cc View 1 2 3 4 5 6 3 chunks +93 lines, -1 line 0 comments Download
A services/preferences/tracked/temp_scoped_dir_cleaner.h View 1 2 3 1 chunk +18 lines, -0 lines 0 comments Download
M services/preferences/tracked/tracked_persistent_pref_store_factory.cc View 1 2 3 4 4 chunks +39 lines, -15 lines 0 comments Download

Messages

Total messages: 44 (19 generated)
proberge
3 years, 6 months ago (2017-06-05 17:50:06 UTC) #2
gab
Nothing prevents multiple copies and nothing forces that a copy by made. Hence cleaning up ...
3 years, 6 months ago (2017-06-05 18:04:22 UTC) #3
proberge
On 2017/06/05 18:04:22, gab wrote: > Nothing prevents multiple copies and nothing forces that a ...
3 years, 6 months ago (2017-06-06 21:29:42 UTC) #4
proberge
https://codereview.chromium.org/2926453002/diff/1/services/preferences/tracked/registry_hash_store_contents_win.cc File services/preferences/tracked/registry_hash_store_contents_win.cc (right): https://codereview.chromium.org/2926453002/diff/1/services/preferences/tracked/registry_hash_store_contents_win.cc#newcode91 services/preferences/tracked/registry_hash_store_contents_win.cc:91: // orignal and clone are destructed (and try to ...
3 years, 6 months ago (2017-06-06 21:29:53 UTC) #5
gab
On 2017/06/06 21:29:42, proberge wrote: > On 2017/06/05 18:04:22, gab wrote: > > Nothing prevents ...
3 years, 6 months ago (2017-06-08 13:07:48 UTC) #6
proberge
On 2017/06/08 13:07:48, gab wrote: > On 2017/06/06 21:29:42, proberge wrote: > > On 2017/06/05 ...
3 years, 6 months ago (2017-06-08 18:21:36 UTC) #8
gab
Nice, I like that best, few nits but lvg https://codereview.chromium.org/2926453002/diff/20001/services/preferences/tracked/registry_hash_store_contents_win.h File services/preferences/tracked/registry_hash_store_contents_win.h (right): https://codereview.chromium.org/2926453002/diff/20001/services/preferences/tracked/registry_hash_store_contents_win.h#newcode23 services/preferences/tracked/registry_hash_store_contents_win.h:23: ...
3 years, 6 months ago (2017-06-12 15:52:17 UTC) #9
proberge
https://codereview.chromium.org/2926453002/diff/80001/services/preferences/tracked/registry_hash_store_contents_win.cc File services/preferences/tracked/registry_hash_store_contents_win.cc (right): https://codereview.chromium.org/2926453002/diff/80001/services/preferences/tracked/registry_hash_store_contents_win.cc#newcode84 services/preferences/tracked/registry_hash_store_contents_win.cc:84: registry_path_ = registry_path; On 2017/06/12 15:52:16, gab wrote: > ...
3 years, 6 months ago (2017-06-12 18:46:02 UTC) #10
gab
https://codereview.chromium.org/2926453002/diff/80001/services/preferences/tracked/registry_hash_store_contents_win_unittest.cc File services/preferences/tracked/registry_hash_store_contents_win_unittest.cc (right): https://codereview.chromium.org/2926453002/diff/80001/services/preferences/tracked/registry_hash_store_contents_win_unittest.cc#newcode135 services/preferences/tracked/registry_hash_store_contents_win_unittest.cc:135: new TempScopedDirRegistryCleaner(); On 2017/06/12 18:46:02, proberge wrote: > On ...
3 years, 6 months ago (2017-06-12 18:52:24 UTC) #11
proberge
https://codereview.chromium.org/2926453002/diff/80001/services/preferences/tracked/registry_hash_store_contents_win_unittest.cc File services/preferences/tracked/registry_hash_store_contents_win_unittest.cc (right): https://codereview.chromium.org/2926453002/diff/80001/services/preferences/tracked/registry_hash_store_contents_win_unittest.cc#newcode154 services/preferences/tracked/registry_hash_store_contents_win_unittest.cc:154: } On 2017/06/12 18:52:24, gab wrote: > On 2017/06/12 ...
3 years, 6 months ago (2017-06-12 19:30:24 UTC) #12
gab
lgtm w/ nit https://codereview.chromium.org/2926453002/diff/120001/services/preferences/tracked/registry_hash_store_contents_win_unittest.cc File services/preferences/tracked/registry_hash_store_contents_win_unittest.cc (right): https://codereview.chromium.org/2926453002/diff/120001/services/preferences/tracked/registry_hash_store_contents_win_unittest.cc#newcode199 services/preferences/tracked/registry_hash_store_contents_win_unittest.cc:199: std::move(contents->MakeCopy())); base::Passed(&contents->MakeCopy())
3 years, 6 months ago (2017-06-12 19:35:37 UTC) #13
proberge
https://codereview.chromium.org/2926453002/diff/120001/services/preferences/tracked/registry_hash_store_contents_win_unittest.cc File services/preferences/tracked/registry_hash_store_contents_win_unittest.cc (right): https://codereview.chromium.org/2926453002/diff/120001/services/preferences/tracked/registry_hash_store_contents_win_unittest.cc#newcode199 services/preferences/tracked/registry_hash_store_contents_win_unittest.cc:199: std::move(contents->MakeCopy())); On 2017/06/12 19:35:37, gab wrote: > base::Passed(&contents->MakeCopy()) base::Passed(&contents->MakeCopy()) ...
3 years, 6 months ago (2017-06-12 20:04:06 UTC) #14
gab
lgtm++ https://codereview.chromium.org/2926453002/diff/120001/services/preferences/tracked/registry_hash_store_contents_win_unittest.cc File services/preferences/tracked/registry_hash_store_contents_win_unittest.cc (right): https://codereview.chromium.org/2926453002/diff/120001/services/preferences/tracked/registry_hash_store_contents_win_unittest.cc#newcode199 services/preferences/tracked/registry_hash_store_contents_win_unittest.cc:199: std::move(contents->MakeCopy())); On 2017/06/12 20:04:06, proberge wrote: > On ...
3 years, 6 months ago (2017-06-12 20:10:07 UTC) #15
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/2926453002/160001
3 years, 6 months ago (2017-06-12 20:25:23 UTC) #18
commit-bot: I haz the power
Try jobs failed on following builders: win_clang on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_clang/builds/248399)
3 years, 6 months ago (2017-06-12 22:39:52 UTC) #20
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/2926453002/180001
3 years, 6 months ago (2017-06-13 14:02:54 UTC) #23
commit-bot: I haz the power
Committed patchset #9 (id:180001) as https://chromium.googlesource.com/chromium/src/+/7c8c48226fd78ad01858284bd2ee91bed27b513c
3 years, 6 months ago (2017-06-13 15:05:06 UTC) #26
DaleCurtis
A revert of this CL (patchset #9 id:180001) has been created in https://codereview.chromium.org/2937633003/ by dalecurtis@chromium.org. ...
3 years, 6 months ago (2017-06-13 16:18:28 UTC) #27
proberge
On 2017/06/13 16:18:28, DaleCurtis wrote: > A revert of this CL (patchset #9 id:180001) has ...
3 years, 6 months ago (2017-06-13 16:45:46 UTC) #29
proberge
On 2017/06/13 16:18:28, DaleCurtis wrote: > A revert of this CL (patchset #9 id:180001) has ...
3 years, 6 months ago (2017-06-13 16:45:46 UTC) #30
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/2926453002/200001
3 years, 6 months ago (2017-06-13 16:46:13 UTC) #33
commit-bot: I haz the power
Try jobs failed on following builders: android_arm64_dbg_recipe on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_arm64_dbg_recipe/builds/287937) android_clang_dbg_recipe on master.tryserver.chromium.android (JOB_FAILED, ...
3 years, 6 months ago (2017-06-13 17:00:34 UTC) #35
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/2926453002/200001
3 years, 6 months ago (2017-06-13 18:29:47 UTC) #37
wychen
PS9 passed CQ because step "analysis" wrongly skipped target "all".
3 years, 6 months ago (2017-06-13 18:59:41 UTC) #39
commit-bot: I haz the power
3 years, 6 months ago (2017-06-13 20:19:10 UTC) #44
Message was sent while issue was closed.
Committed patchset #10 (id:200001) as
https://chromium.googlesource.com/chromium/src/+/0901195b98d8c46db5a0d164e27a...

Powered by Google App Engine
This is Rietveld 408576698