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

Issue 1558643002: Fix Mojo broker crash on Windows. (Closed)

Created:
4 years, 11 months ago by jam
Modified:
4 years, 11 months ago
Reviewers:
sky
CC:
chromium-reviews, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org, abarth-chromium, Aaron Boodman, 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

Fix Mojo broker crash on Windows. This occurred because a ChildBrokerHost noticed that its connection to the child process died and so it nulled out its channel. On POSIX, this leads to the destruction of the ChildBrokerHost immediately and so the singleton BrokerState is notified synchronously. On Windows, there's another channel for sandboxing related sync IPCs which uses IO completition ports. To ease lifetime issues because of that, the ChildBrokerHost is only deleted in response to errors from that second channel. So if the first channel dies first, it is possible that BrokerState tries to connect to a message pipe in that ChildBrokerState with a null channel. The fix is to null check the channel and to inform the other side of the message pipe that its peer has died so that it can fire peer closed notifications. BUG=573244 Committed: https://crrev.com/9b6da52718d7413adb9eec3a2d7f32ce3e04c7ce Cr-Commit-Position: refs/heads/master@{#367194}

Patch Set 1 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+80 lines, -17 lines) Patch
M mojo/edk/system/broker_messages.h View 2 chunks +24 lines, -0 lines 0 comments Download
M mojo/edk/system/broker_state.cc View 4 chunks +24 lines, -17 lines 0 comments Download
M mojo/edk/system/child_broker.cc View 1 chunk +11 lines, -0 lines 0 comments Download
M mojo/edk/system/child_broker_host.h View 1 chunk +4 lines, -0 lines 0 comments Download
M mojo/edk/system/child_broker_host.cc View 1 chunk +13 lines, -0 lines 0 comments Download
M mojo/edk/system/message_pipe_dispatcher.cc View 1 chunk +4 lines, -0 lines 0 comments Download

Messages

Total messages: 9 (4 generated)
jam
4 years, 11 months ago (2015-12-30 21:15:19 UTC) #3
sky
LGTM
4 years, 11 months ago (2015-12-30 21:22:38 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1558643002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1558643002/20001
4 years, 11 months ago (2015-12-30 22:05:34 UTC) #6
commit-bot: I haz the power
Committed patchset #1 (id:20001)
4 years, 11 months ago (2015-12-30 22:10:30 UTC) #7
commit-bot: I haz the power
4 years, 11 months ago (2015-12-30 22:11:18 UTC) #9
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/9b6da52718d7413adb9eec3a2d7f32ce3e04c7ce
Cr-Commit-Position: refs/heads/master@{#367194}

Powered by Google App Engine
This is Rietveld 408576698