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

Issue 2453933004: Fix deadlock issue with AllStatesToString (Closed)

Created:
4 years, 1 month ago by lawrencewu
Modified:
4 years, 1 month ago
CC:
chromium-reviews, asvitkine+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix deadlock issue with AllStatesToString There was a deadlock happening when the thread calling AllStatesToString would grab the same lock twice. This fixes that by creating a version of GetState that's lockfree, GetStateWhileLocked, so AllStatesToString can call that instead. BUG=660150 Committed: https://crrev.com/73c431498b20128b49e07540f6c8b4e81d20f500 Cr-Commit-Position: refs/heads/master@{#428844}

Patch Set 1 #

Patch Set 2 : fix deadlock issue #

Patch Set 3 : fix unittest #

Total comments: 2

Patch Set 4 : create FinalizeGroupChoiceImpl #

Patch Set 5 : fix unittest (again) #

Patch Set 6 : fix browsertests #

Patch Set 7 : fix browsertests #

Patch Set 8 : turn flag back off #

Total comments: 8

Patch Set 9 : address comments #

Patch Set 10 : fix compile issue #

Patch Set 11 : move field trial list instantiation in tests #

Patch Set 12 : add comment and return if no global #

Total comments: 2

Patch Set 13 : address comments #

Total comments: 1

Patch Set 14 : fix nit #

Unified diffs Side-by-side diffs Delta from patch set Stats (+47 lines, -10 lines) Patch
M base/metrics/field_trial.h View 1 2 3 3 chunks +11 lines, -3 lines 0 comments Download
M base/metrics/field_trial.cc View 1 2 3 4 5 6 7 8 9 10 11 12 6 chunks +29 lines, -5 lines 0 comments Download
M base/metrics/field_trial_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +7 lines, -2 lines 0 comments Download

Messages

Total messages: 57 (42 generated)
lawrencewu
fix tests and fix deadlock issue
4 years, 1 month ago (2016-10-27 20:50:00 UTC) #6
lawrencewu
4 years, 1 month ago (2016-10-27 20:50:11 UTC) #8
Alexei Svitkine (slow)
Please split the CL in two multiple parts - one that fixes the lock and ...
4 years, 1 month ago (2016-10-27 20:54:23 UTC) #10
lawrencewu
On 2016/10/27 20:54:23, Alexei Svitkine (slow) wrote: > Please split the CL in two multiple ...
4 years, 1 month ago (2016-10-27 20:58:28 UTC) #11
Alexei Svitkine (slow)
https://codereview.chromium.org/2453933004/diff/40001/base/metrics/field_trial.cc File base/metrics/field_trial.cc (right): https://codereview.chromium.org/2453933004/diff/40001/base/metrics/field_trial.cc#newcode372 base/metrics/field_trial.cc:372: FinalizeGroupChoice(true); How about making the call that takes the ...
4 years, 1 month ago (2016-10-27 21:40:43 UTC) #15
lawrencewu
Address comments. Also fix an edge case where global_ wasn't instantiated in browsertests, so now ...
4 years, 1 month ago (2016-10-28 17:20:21 UTC) #26
Alexei Svitkine (slow)
https://codereview.chromium.org/2453933004/diff/140001/base/metrics/field_trial.cc File base/metrics/field_trial.cc (right): https://codereview.chromium.org/2453933004/diff/140001/base/metrics/field_trial.cc#newcode688 base/metrics/field_trial.cc:688: if (global_ && global_->readonly_allocator_handle_) There's already an early return ...
4 years, 1 month ago (2016-10-28 18:57:34 UTC) #27
lawrencewu
Address comments. The failure on ios-simulator looks unrelated, probably flaky. https://codereview.chromium.org/2453933004/diff/140001/base/metrics/field_trial.cc File base/metrics/field_trial.cc (right): https://codereview.chromium.org/2453933004/diff/140001/base/metrics/field_trial.cc#newcode688 ...
4 years, 1 month ago (2016-10-31 18:59:25 UTC) #44
Alexei Svitkine (slow)
lgtm https://codereview.chromium.org/2453933004/diff/140001/base/metrics/field_trial_unittest.cc File base/metrics/field_trial_unittest.cc (right): https://codereview.chromium.org/2453933004/diff/140001/base/metrics/field_trial_unittest.cc#newcode1149 base/metrics/field_trial_unittest.cc:1149: EXPECT_TRUE(cmd_line.HasSwitch("field-trial-handle") || On 2016/10/31 18:59:25, lawrencewu wrote: > ...
4 years, 1 month ago (2016-10-31 19:01:40 UTC) #45
Alexei Svitkine (slow)
https://codereview.chromium.org/2453933004/diff/210001/base/metrics/field_trial.cc File base/metrics/field_trial.cc (right): https://codereview.chromium.org/2453933004/diff/210001/base/metrics/field_trial.cc#newcode703 base/metrics/field_trial.cc:703: // guarantee this. Actually, I would make this more ...
4 years, 1 month ago (2016-10-31 19:03:58 UTC) #46
lawrencewu
Address comments. https://codereview.chromium.org/2453933004/diff/140001/base/metrics/field_trial_unittest.cc File base/metrics/field_trial_unittest.cc (right): https://codereview.chromium.org/2453933004/diff/140001/base/metrics/field_trial_unittest.cc#newcode1149 base/metrics/field_trial_unittest.cc:1149: EXPECT_TRUE(cmd_line.HasSwitch("field-trial-handle") || On 2016/10/31 19:01:40, Alexei Svitkine ...
4 years, 1 month ago (2016-10-31 21:09:09 UTC) #49
Alexei Svitkine (slow)
lgtm https://codereview.chromium.org/2453933004/diff/230001/base/metrics/field_trial_unittest.cc File base/metrics/field_trial_unittest.cc (right): https://codereview.chromium.org/2453933004/diff/230001/base/metrics/field_trial_unittest.cc#newcode1145 base/metrics/field_trial_unittest.cc:1145: const char* field_trial_handle = "test-field-trial-handle"; Nit: const char ...
4 years, 1 month ago (2016-10-31 21:13:45 UTC) #50
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/2453933004/250001
4 years, 1 month ago (2016-10-31 21:15:59 UTC) #53
commit-bot: I haz the power
Committed patchset #14 (id:250001)
4 years, 1 month ago (2016-10-31 22:33:31 UTC) #55
commit-bot: I haz the power
4 years, 1 month ago (2016-10-31 22:35:13 UTC) #57
Message was sent while issue was closed.
Patchset 14 (id:??) landed as
https://crrev.com/73c431498b20128b49e07540f6c8b4e81d20f500
Cr-Commit-Position: refs/heads/master@{#428844}

Powered by Google App Engine
This is Rietveld 408576698