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

Issue 2194193002: Fix ArcBridgeBootstrap race issues. (Closed)

Created:
4 years, 4 months ago by hidehiko
Modified:
4 years, 2 months ago
CC:
chromium-reviews, elijahtaylor+arcwatch_chromium.org, hidehiko+watch_chromium.org, lhchavez+watch_chromium.org, yusukes+watch_chromium.org, yoshiat_google.com, Shuhei Takahashi
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix ArcBridgeBootstrap race issues. This CL restructs the state management in ArcBridgeBootstrap. The biggest change is; ArcBridgeBootstrap now handles one life-cycle of ARC instance. To restart, the instance needs to be recreated. With the change, the internal state management is also changed. Detailed behavior is defined and commented in ArcBridgeBootstrapImpl's comment. This change identifies the problematic behaviors/race behaviors in the original code, and fixes them. Mainly three changes here; - Internal state and "if Stop() is called" are managed separately. - Mojo connection establishment on WorkerPool thread is now cancellable. - ArcBridgeBootstrap instance is created per ARC instance, so that stale callbacks would not be called. With the change, FakeArcBridgeBootstrap needs to be updated, too. BUG=633258 BUG=b/30236819 TEST=Ran ARC on test device. Trybots. Committed: https://crrev.com/321d423c67a0fb6ae104d1275a15498dc96cd0e9 Cr-Commit-Position: refs/heads/master@{#422124}

Patch Set 1 #

Patch Set 2 : Fix ArcBridgeBootstrap race issues. #

Patch Set 3 : Fix ArcBridgeBootstrap race issues. #

Total comments: 24

Patch Set 4 : rebase #

Patch Set 5 : Address comments. #

Patch Set 6 : rebase #

Total comments: 33

Patch Set 7 : Address comments. #

Total comments: 13

Patch Set 8 : rebase #

Patch Set 9 : Address comments #

Total comments: 12

Patch Set 10 : Rebase #

Patch Set 11 : Address comments #

Patch Set 12 : Rebase. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+511 lines, -210 lines) Patch
M chrome/browser/chromeos/arc/arc_auth_service_browsertest.cc View 1 2 3 4 5 6 7 8 3 chunks +4 lines, -6 lines 0 comments Download
M chrome/browser/policy/policy_browsertest.cc View 1 2 3 4 5 6 7 8 9 3 chunks +4 lines, -6 lines 0 comments Download
M components/arc/arc_bridge_bootstrap.h View 1 2 3 4 2 chunks +14 lines, -2 lines 0 comments Download
M components/arc/arc_bridge_bootstrap.cc View 1 2 3 4 5 6 7 8 9 10 9 chunks +304 lines, -128 lines 0 comments Download
M components/arc/arc_bridge_service.h View 1 2 3 4 5 6 7 8 2 chunks +5 lines, -0 lines 0 comments Download
M components/arc/arc_bridge_service.cc View 1 2 3 4 5 6 7 8 1 chunk +18 lines, -0 lines 0 comments Download
M components/arc/arc_bridge_service_impl.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +17 lines, -1 line 0 comments Download
M components/arc/arc_bridge_service_impl.cc View 1 2 3 4 5 6 7 8 9 10 6 chunks +21 lines, -10 lines 0 comments Download
M components/arc/arc_bridge_service_unittest.cc View 1 2 3 4 5 6 7 8 8 chunks +61 lines, -31 lines 0 comments Download
M components/arc/arc_service_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +1 line, -3 lines 0 comments Download
M components/arc/test/fake_arc_bridge_bootstrap.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +25 lines, -8 lines 0 comments Download
M components/arc/test/fake_arc_bridge_bootstrap.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +37 lines, -15 lines 0 comments Download

Messages

Total messages: 60 (38 generated)
hidehiko
PTAL. Note: This CL fixes several race/stuck problems. - Crash before Mojo connection establishment. - ...
4 years, 4 months ago (2016-08-01 16:45:55 UTC) #11
Luis Héctor Chávez
Adding the right lhchavez :P As discussed offline, is it possible to split this change ...
4 years, 4 months ago (2016-08-01 17:47:38 UTC) #13
hidehiko
PTAL. > Adding the right lhchavez :P Ugrrr... Sorry. > As discussed offline, is it ...
4 years, 4 months ago (2016-08-02 11:36:22 UTC) #20
hidehiko
Luis, can we resume the review, now?
4 years, 3 months ago (2016-09-06 06:39:58 UTC) #25
hidehiko
On 2016/09/06 06:39:58, hidehiko wrote: > Luis, can we resume the review, now? Friendly ping?
4 years, 3 months ago (2016-09-07 23:18:12 UTC) #26
Luis Héctor Chávez
I still need to re-review the doc and come back here after doing so. Sorry ...
4 years, 3 months ago (2016-09-07 23:38:32 UTC) #27
hidehiko
Thank you for review. PTAL. https://codereview.chromium.org/2194193002/diff/40001/components/arc/arc_bridge_bootstrap.cc File components/arc/arc_bridge_bootstrap.cc (right): https://codereview.chromium.org/2194193002/diff/40001/components/arc/arc_bridge_bootstrap.cc#newcode582 components/arc/arc_bridge_bootstrap.cc:582: // In case that ...
4 years, 3 months ago (2016-09-08 16:53:41 UTC) #30
hidehiko
On 2016/09/08 16:53:41, hidehiko wrote: > Thank you for review. PTAL. > > https://codereview.chromium.org/2194193002/diff/40001/components/arc/arc_bridge_bootstrap.cc > ...
4 years, 3 months ago (2016-09-12 04:30:59 UTC) #33
hidehiko
On 2016/09/12 04:30:59, hidehiko wrote: > On 2016/09/08 16:53:41, hidehiko wrote: > > Thank you ...
4 years, 3 months ago (2016-09-14 00:50:30 UTC) #34
Luis Héctor Chávez
sorry for the delay :'( https://codereview.chromium.org/2194193002/diff/100001/components/arc/arc_bridge_service_impl.h File components/arc/arc_bridge_service_impl.h (right): https://codereview.chromium.org/2194193002/diff/100001/components/arc/arc_bridge_service_impl.h#newcode31 components/arc/arc_bridge_service_impl.h:31: class Delegate { On ...
4 years, 3 months ago (2016-09-15 23:08:49 UTC) #35
hidehiko
Thank you for review. PTAL. https://codereview.chromium.org/2194193002/diff/100001/components/arc/arc_bridge_service_unittest.cc File components/arc/arc_bridge_service_unittest.cc (right): https://codereview.chromium.org/2194193002/diff/100001/components/arc/arc_bridge_service_unittest.cc#newcode77 components/arc/arc_bridge_service_unittest.cc:77: service_.reset(new ArcBridgeServiceImpl); On 2016/09/15 ...
4 years, 3 months ago (2016-09-20 13:35:20 UTC) #40
hidehiko
On 2016/09/20 13:35:20, hidehiko wrote: > Thank you for review. PTAL. > > https://codereview.chromium.org/2194193002/diff/100001/components/arc/arc_bridge_service_unittest.cc > ...
4 years, 3 months ago (2016-09-21 22:55:09 UTC) #41
Luis Héctor Chávez
Sorry for the delay, again :( https://codereview.chromium.org/2194193002/diff/120001/components/arc/arc_bridge_bootstrap.cc File components/arc/arc_bridge_bootstrap.cc (right): https://codereview.chromium.org/2194193002/diff/120001/components/arc/arc_bridge_bootstrap.cc#newcode319 components/arc/arc_bridge_bootstrap.cc:319: // and stopping ...
4 years, 3 months ago (2016-09-23 05:13:38 UTC) #42
hidehiko
PTAL, Luis. bartfab@, could you take a look as a c/b/policy OWNER? https://codereview.chromium.org/2194193002/diff/160001/components/arc/arc_bridge_bootstrap.cc File components/arc/arc_bridge_bootstrap.cc ...
4 years, 2 months ago (2016-09-26 14:31:49 UTC) #45
Luis Héctor Chávez
lgtm
4 years, 2 months ago (2016-09-27 01:46:12 UTC) #49
hidehiko
On 2016/09/27 01:46:12, Luis Héctor Chávez wrote: > lgtm Thank you for review, Luis. Friendly ...
4 years, 2 months ago (2016-09-29 12:38:48 UTC) #50
bartfab (slow)
chrome/browser/policy/policy_browsertest.cc LGTM
4 years, 2 months ago (2016-09-30 10:02:07 UTC) #51
bartfab (slow)
chrome/browser/policy/policy_browsertest.cc LGTM
4 years, 2 months ago (2016-09-30 10:02:08 UTC) #52
hidehiko
Thank you for review!
4 years, 2 months ago (2016-09-30 15:08:28 UTC) #53
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/2194193002/220001
4 years, 2 months ago (2016-09-30 15:09:11 UTC) #56
commit-bot: I haz the power
Committed patchset #12 (id:220001)
4 years, 2 months ago (2016-09-30 15:51:52 UTC) #58
commit-bot: I haz the power
4 years, 2 months ago (2016-09-30 15:55:30 UTC) #60
Message was sent while issue was closed.
Patchset 12 (id:??) landed as
https://crrev.com/321d423c67a0fb6ae104d1275a15498dc96cd0e9
Cr-Commit-Position: refs/heads/master@{#422124}

Powered by Google App Engine
This is Rietveld 408576698