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

Issue 1903663004: IPC: Fix attachment brokering race condition. (Closed)

Created:
4 years, 8 months ago by erikchen
Modified:
4 years, 8 months ago
CC:
chromium-reviews, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, chromoting-reviews_chromium.org, jam, yzshen+watch_chromium.org, abarth-chromium, Aaron Boodman, darin-cc_chromium.org, darin (slow to review), ben+mojo_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

IPC: Fix attachment brokering race condition. A channel must be registered as a broker communication channel before it is connected. When possible, invert the sequence of the call to connect a channel, and the call to register the channel as a broker. In some cases, the channel constructor and the channel initializer had to be separated, so that the registration could happen in between. This requirement is now enforced by a CHECK, which verifies that a channel cannot be registered after it is connected. BUG=598088 Committed: https://crrev.com/9097190cafdecfb1b5796b65c83af92e861ccaf8 Cr-Commit-Position: refs/heads/master@{#389618}

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : Rebase. #

Patch Set 4 : Fix compile. #

Patch Set 5 : Fix compile. #

Patch Set 6 : Compile error. #

Patch Set 7 : Window compile error. #

Patch Set 8 : Compile errors, test errors. #

Patch Set 9 : Mor errors. #

Patch Set 10 : Compile and test errors. #

Patch Set 11 : runtime error #

Total comments: 4

Patch Set 12 : Comments from tsepez. #

Total comments: 4

Patch Set 13 : Comments from creis@. #

Patch Set 14 : Rebase (scoped_ptr->std::unique_ptr) #

Unified diffs Side-by-side diffs Delta from patch set Stats (+135 lines, -48 lines) Patch
M components/nacl/loader/nacl_listener.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -1 line 0 comments Download
M content/browser/renderer_host/render_process_host_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +18 lines, -10 lines 0 comments Download
M content/child/child_thread_impl.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M content/common/child_process_host_impl.cc View 1 1 chunk +7 lines, -2 lines 0 comments Download
M ipc/attachment_broker_mac_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 5 chunks +19 lines, -5 lines 0 comments Download
M ipc/attachment_broker_privileged_win_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +13 lines, -1 line 0 comments Download
M ipc/ipc_channel.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +13 lines, -0 lines 0 comments Download
M ipc/ipc_channel_common.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +8 lines, -0 lines 0 comments Download
M ipc/ipc_channel_nacl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +2 lines, -0 lines 0 comments Download
M ipc/ipc_channel_posix.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +2 lines, -0 lines 0 comments Download
M ipc/ipc_channel_proxy.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +5 lines, -3 lines 0 comments Download
M ipc/ipc_channel_proxy.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -0 lines 0 comments Download
M ipc/ipc_channel_win.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +2 lines, -0 lines 0 comments Download
M ipc/ipc_endpoint.h View 1 chunk +1 line, -1 line 0 comments Download
M ipc/ipc_test_base.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +4 lines, -0 lines 0 comments Download
M ipc/mojo/ipc_channel_mojo.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -0 lines 0 comments Download
M remoting/host/desktop_process.cc View 1 1 chunk +2 lines, -4 lines 0 comments Download
M remoting/host/desktop_session_agent.cc View 1 2 3 4 5 6 7 8 9 10 3 chunks +9 lines, -0 lines 0 comments Download
M remoting/host/ipc_util.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M remoting/host/ipc_util_posix.cc View 1 2 3 4 5 6 7 8 2 chunks +9 lines, -4 lines 0 comments Download
M remoting/host/ipc_util_win.cc View 1 2 3 4 5 6 2 chunks +7 lines, -3 lines 0 comments Download
M remoting/host/remoting_me2me_host.cc View 1 2 3 4 5 6 7 8 9 1 chunk +3 lines, -5 lines 0 comments Download
M remoting/host/win/unprivileged_process_delegate.cc View 1 1 chunk +0 lines, -2 lines 0 comments Download
M remoting/host/win/wts_session_process_delegate.cc View 1 2 3 4 5 6 7 2 chunks +6 lines, -6 lines 0 comments Download

Messages

Total messages: 62 (29 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1903663004/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1903663004/20001
4 years, 8 months ago (2016-04-21 04:30:05 UTC) #2
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: ios_dbg_simulator_gn on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_dbg_simulator_gn/builds/22632) ios_rel_device_gn on ...
4 years, 8 months ago (2016-04-21 04:32:11 UTC) #4
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1903663004/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1903663004/40001
4 years, 8 months ago (2016-04-21 04:37:48 UTC) #6
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: chromeos_x86-generic_chromium_compile_only_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromeos_x86-generic_chromium_compile_only_ng/builds/125321)
4 years, 8 months ago (2016-04-21 04:52:46 UTC) #8
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1903663004/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1903663004/60001
4 years, 8 months ago (2016-04-21 05:21:13 UTC) #10
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: mac_chromium_rel_ng on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/214938)
4 years, 8 months ago (2016-04-21 05:36:17 UTC) #12
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1903663004/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1903663004/80001
4 years, 8 months ago (2016-04-21 17:16:36 UTC) #14
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1903663004/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1903663004/100001
4 years, 8 months ago (2016-04-21 17:24:17 UTC) #16
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_chromium_chromeos_ozone_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_ozone_rel_ng/builds/158441)
4 years, 8 months ago (2016-04-21 17:50:46 UTC) #19
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1903663004/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1903663004/120001
4 years, 8 months ago (2016-04-21 18:18:06 UTC) #21
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_chromium_chromeos_ozone_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_ozone_rel_ng/builds/158495) mac_chromium_rel_ng on ...
4 years, 8 months ago (2016-04-21 18:48:55 UTC) #23
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1903663004/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1903663004/140001
4 years, 8 months ago (2016-04-21 19:32:30 UTC) #25
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1903663004/70021 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1903663004/70021
4 years, 8 months ago (2016-04-21 19:36:28 UTC) #27
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_chromium_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/216729)
4 years, 8 months ago (2016-04-21 20:16:38 UTC) #30
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1903663004/170001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1903663004/170001
4 years, 8 months ago (2016-04-21 22:00:12 UTC) #32
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_chromium_chromeos_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_rel_ng/builds/200950)
4 years, 8 months ago (2016-04-21 22:32:35 UTC) #34
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1903663004/190001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1903663004/190001
4 years, 8 months ago (2016-04-21 23:19:39 UTC) #36
erikchen
mseaborn: Please review components/nacl creis: Please review content/ tsepez: Please review ipc/ sergeyu: Please review ...
4 years, 8 months ago (2016-04-22 00:16:00 UTC) #38
Tom Sepez
LGTM, nits. https://codereview.chromium.org/1903663004/diff/190001/ipc/ipc_channel.h File ipc/ipc_channel.h (right): https://codereview.chromium.org/1903663004/diff/190001/ipc/ipc_channel.h#newcode169 ipc/ipc_channel.h:169: // The subclass implementation must call OnConnect(). ...
4 years, 8 months ago (2016-04-22 00:33:22 UTC) #39
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 8 months ago (2016-04-22 00:53:31 UTC) #41
erikchen
https://codereview.chromium.org/1903663004/diff/190001/ipc/ipc_channel.h File ipc/ipc_channel.h (right): https://codereview.chromium.org/1903663004/diff/190001/ipc/ipc_channel.h#newcode169 ipc/ipc_channel.h:169: // The subclass implementation must call OnConnect(). On 2016/04/22 ...
4 years, 8 months ago (2016-04-22 01:42:18 UTC) #42
Sergey Ulanov
lgtm
4 years, 8 months ago (2016-04-22 18:17:54 UTC) #43
Charlie Reis
I can give a rubber stamp, but I'd feel better having someone more familiar with ...
4 years, 8 months ago (2016-04-22 20:00:46 UTC) #45
jam
lgtm
4 years, 8 months ago (2016-04-22 22:03:33 UTC) #46
erikchen
https://codereview.chromium.org/1903663004/diff/210001/content/browser/renderer_host/render_process_host_impl.cc File content/browser/renderer_host/render_process_host_impl.cc (left): https://codereview.chromium.org/1903663004/diff/210001/content/browser/renderer_host/render_process_host_impl.cc#oldcode831 content/browser/renderer_host/render_process_host_impl.cc:831: return IPC::ChannelProxy::Create( On 2016/04/22 20:00:45, Charlie Reis wrote: > ...
4 years, 8 months ago (2016-04-25 20:10:57 UTC) #48
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1903663004/230001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1903663004/230001
4 years, 8 months ago (2016-04-25 20:12:06 UTC) #51
Charlie Reis
Ok, thanks. LGTM as well.
4 years, 8 months ago (2016-04-25 20:13:35 UTC) #52
erikchen
On 2016/04/25 20:12:06, commit-bot: I haz the power wrote: > CQ is trying da patch. ...
4 years, 8 months ago (2016-04-25 20:14:44 UTC) #53
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_gn_chromeos_rel on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_gn_chromeos_rel/builds/177636)
4 years, 8 months ago (2016-04-25 20:33:49 UTC) #55
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1903663004/250001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1903663004/250001
4 years, 8 months ago (2016-04-25 21:41:46 UTC) #58
commit-bot: I haz the power
Committed patchset #14 (id:250001)
4 years, 8 months ago (2016-04-25 23:45:45 UTC) #59
commit-bot: I haz the power
Patchset 14 (id:??) landed as https://crrev.com/9097190cafdecfb1b5796b65c83af92e861ccaf8 Cr-Commit-Position: refs/heads/master@{#389618}
4 years, 8 months ago (2016-04-25 23:47:51 UTC) #61
Mark Seaborn
4 years, 8 months ago (2016-04-26 18:11:20 UTC) #62
Message was sent while issue was closed.
On 2016/04/22 00:16:00, erikchen wrote:
> mseaborn: Please review components/nacl

LGTM for the record.

Powered by Google App Engine
This is Rietveld 408576698