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 2065453004: Always leak the Mojo parent pipe handle on child process shutdown. (Closed)

Created:
4 years, 6 months ago by Anand Mistry (off Chromium)
Modified:
4 years, 6 months ago
CC:
chromium-reviews, extensions-reviews_chromium.org, qsr+mojo_chromium.org, Aaron Boodman, Lei Zhang, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org, abarth-chromium, tommycli, darin-cc_chromium.org, chromium-apps-reviews_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

Always leak the Mojo parent pipe handle on child process shutdown. In legacy Chrome-IPC, the browser uses the disconnection on the IPC pipe as indication that the child process has died. It does this by intentionally holding on to the parent IPC pipe in the child as the child process exits. When the child exits, the OS closes the pipe and the browser receives a disconnection event and assumes the child process is dead. When using ChannelMojo, the IPC pipe is a Mojo message pipe. In the child, Mojo is is told to perform an orderly shutdown when the child process is shutting down. This results in the IPC pipe being closed before the child process dies. In this case, when the browser sees the pipe closure, the child process may not be dead, violating the assumption that the child is dead, which causes problems with child termination. To maintain existing semantics and avoid issues with child termination, the EDK always leaks the parent pipe in the child instead of closing it. The parent will then only see the pipe close when the child process exits. The EDK will only leak the parent-child OS pipe in the child process. All other pipes will be closed when Mojo is shut down. BUG=618121 Committed: https://crrev.com/e64e2962ecf525fff64e48ba3766f97eca5bdd2e Cr-Commit-Position: refs/heads/master@{#399949}

Patch Set 1 #

Patch Set 2 : Get rid of embedder API. #

Patch Set 3 : comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+39 lines, -4 lines) Patch
M chrome/browser/extensions/api/media_galleries/media_galleries_apitest.cc View 1 chunk +1 line, -4 lines 0 comments Download
M mojo/edk/system/channel.h View 1 chunk +4 lines, -0 lines 0 comments Download
M mojo/edk/system/channel_posix.cc View 1 3 chunks +9 lines, -0 lines 0 comments Download
M mojo/edk/system/channel_win.cc View 1 3 chunks +9 lines, -0 lines 0 comments Download
M mojo/edk/system/node_channel.h View 1 chunk +3 lines, -0 lines 0 comments Download
M mojo/edk/system/node_channel.cc View 1 chunk +7 lines, -0 lines 0 comments Download
M mojo/edk/system/node_controller.cc View 1 2 1 chunk +6 lines, -0 lines 0 comments Download

Messages

Total messages: 29 (11 generated)
Anand Mistry (off Chromium)
rockot: Because EDK. jam: Because ChildThreadImpl and https://codereview.chromium.org/2058653002/ System developers HATE this! One weird trick ...
4 years, 6 months ago (2016-06-14 04:57:43 UTC) #2
Ken Rockot(use gerrit already)
On 2016/06/14 at 04:57:43, amistry wrote: > rockot: Because EDK. > jam: Because ChildThreadImpl and ...
4 years, 6 months ago (2016-06-14 05:05:58 UTC) #3
Anand Mistry (off Chromium)
On 2016/06/14 05:05:58, Ken Rockot wrote: > On 2016/06/14 at 04:57:43, amistry wrote: > > ...
4 years, 6 months ago (2016-06-14 05:20:08 UTC) #4
Ken Rockot(use gerrit already)
On 2016/06/14 at 05:20:08, amistry wrote: > On 2016/06/14 05:05:58, Ken Rockot wrote: > > ...
4 years, 6 months ago (2016-06-14 05:24:55 UTC) #5
Anand Mistry (off Chromium)
On 2016/06/14 05:24:55, Ken Rockot wrote: > On 2016/06/14 at 05:20:08, amistry wrote: > > ...
4 years, 6 months ago (2016-06-14 05:36:53 UTC) #6
Ken Rockot(use gerrit already)
On 2016/06/14 at 05:36:53, amistry wrote: > On 2016/06/14 05:24:55, Ken Rockot wrote: > > ...
4 years, 6 months ago (2016-06-14 05:48:10 UTC) #7
Anand Mistry (off Chromium)
On 2016/06/14 05:48:10, Ken Rockot wrote: > On 2016/06/14 at 05:36:53, amistry wrote: > > ...
4 years, 6 months ago (2016-06-14 07:11:41 UTC) #10
jam
lgtm the cl description is a bit confusing: "When using ChannelMojo, this isn't true because ...
4 years, 6 months ago (2016-06-14 16:27:11 UTC) #11
Ken Rockot(use gerrit already)
lgtm
4 years, 6 months ago (2016-06-15 00:18:36 UTC) #12
Anand Mistry (off Chromium)
On 2016/06/14 16:27:11, jam wrote: > lgtm > > the cl description is a bit ...
4 years, 6 months ago (2016-06-15 00:23:22 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2065453004/40001
4 years, 6 months ago (2016-06-15 03:54:36 UTC) #16
jam
On 2016/06/15 00:23:22, Anand Mistry wrote: > On 2016/06/14 16:27:11, jam wrote: > > lgtm ...
4 years, 6 months ago (2016-06-15 04:24:38 UTC) #17
Anand Mistry (off Chromium)
On 2016/06/15 04:24:38, jam wrote: > On 2016/06/15 00:23:22, Anand Mistry wrote: > > On ...
4 years, 6 months ago (2016-06-15 06:57:20 UTC) #20
jam
On 2016/06/15 06:57:20, Anand Mistry wrote: > On 2016/06/15 04:24:38, jam wrote: > > On ...
4 years, 6 months ago (2016-06-15 16:38:50 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2065453004/40001
4 years, 6 months ago (2016-06-15 16:39:29 UTC) #24
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 6 months ago (2016-06-15 17:57:47 UTC) #26
commit-bot: I haz the power
CQ bit was unchecked
4 years, 6 months ago (2016-06-15 17:58:09 UTC) #27
commit-bot: I haz the power
4 years, 6 months ago (2016-06-15 17:59:36 UTC) #29
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/e64e2962ecf525fff64e48ba3766f97eca5bdd2e
Cr-Commit-Position: refs/heads/master@{#399949}

Powered by Google App Engine
This is Rietveld 408576698