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

Issue 1554623005: Ensure that in-flight message pipes are always closed and the other end is notified. (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

Ensure that in-flight message pipes are always closed and the other end is notified. This was exposed by the three tests below when the new EDK was switched on for the test target. The problem is we have the following three pairs of ports: A <> B C <> D E <> F A is sent over C and then C is sent over E. C is closed immediately after it's recieved. Before this fix, A was not recieved (i.e. TransportData::DeserializeDispatchers wasn't called for it). As a result, B never received a peer closed notification so its error handler was never called. The fix is to ensure that when a message pipe is closed it asks its peer to close instead. That way by the time the notification is received from the peer that it's been closed we can ensure that all in-flight messages are dispatched. BUG=561803 TEST=mojo_shell_unittests --gtest_filter=AboutFetcherTest.AboutBlank:ApplicationManagerTest.TestEndApplicationClosure:AboutFetcherTest.UnrecognizedURL Committed: https://crrev.com/277a2fa76b238c46af6cc98eba54296b82423415 Cr-Commit-Position: refs/heads/master@{#367168}

Patch Set 1 #

Total comments: 2

Patch Set 2 : fix leaks #

Total comments: 3

Patch Set 3 : fix dcheck of lock being acquired at destruction #

Unified diffs Side-by-side diffs Delta from patch set Stats (+120 lines, -49 lines) Patch
M mojo/edk/system/message_in_transit.h View 1 chunk +6 lines, -2 lines 0 comments Download
M mojo/edk/system/message_pipe_dispatcher.h View 1 2 3 chunks +15 lines, -0 lines 0 comments Download
M mojo/edk/system/message_pipe_dispatcher.cc View 1 2 8 chunks +97 lines, -46 lines 0 comments Download
M mojo/edk/system/raw_channel.cc View 1 chunk +2 lines, -1 line 0 comments Download

Messages

Total messages: 13 (3 generated)
jam
4 years, 11 months ago (2015-12-30 05:52:52 UTC) #2
sky
I'm not the best reviewer of this code, but I tried. https://codereview.chromium.org/1554623005/diff/1/mojo/edk/system/message_pipe_dispatcher.cc File mojo/edk/system/message_pipe_dispatcher.cc (right): ...
4 years, 11 months ago (2015-12-30 16:33:32 UTC) #3
jam
https://codereview.chromium.org/1554623005/diff/1/mojo/edk/system/message_pipe_dispatcher.cc File mojo/edk/system/message_pipe_dispatcher.cc (right): https://codereview.chromium.org/1554623005/diff/1/mojo/edk/system/message_pipe_dispatcher.cc#newcode969 mojo/edk/system/message_pipe_dispatcher.cc:969: base::MessageLoop::current()->ReleaseSoon(FROM_HERE, this); On 2015/12/30 16:33:32, sky wrote: > Is ...
4 years, 11 months ago (2015-12-30 17:03:40 UTC) #4
sky
https://codereview.chromium.org/1554623005/diff/20001/mojo/edk/system/message_pipe_dispatcher.cc File mojo/edk/system/message_pipe_dispatcher.cc (right): https://codereview.chromium.org/1554623005/diff/20001/mojo/edk/system/message_pipe_dispatcher.cc#newcode907 mojo/edk/system/message_pipe_dispatcher.cc:907: Release(); On 2015/12/30 17:03:40, jam wrote: > (unlike the ...
4 years, 11 months ago (2015-12-30 17:32:30 UTC) #5
jam
4 years, 11 months ago (2015-12-30 17:39:01 UTC) #6
sky
LGTM
4 years, 11 months ago (2015-12-30 17:41:20 UTC) #7
jam
https://codereview.chromium.org/1554623005/diff/20001/mojo/edk/system/message_pipe_dispatcher.cc File mojo/edk/system/message_pipe_dispatcher.cc (right): https://codereview.chromium.org/1554623005/diff/20001/mojo/edk/system/message_pipe_dispatcher.cc#newcode907 mojo/edk/system/message_pipe_dispatcher.cc:907: Release(); On 2015/12/30 17:32:29, sky wrote: > On 2015/12/30 ...
4 years, 11 months ago (2015-12-30 17:41:27 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1554623005/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1554623005/40001
4 years, 11 months ago (2015-12-30 18:13:32 UTC) #10
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 11 months ago (2015-12-30 19:04:42 UTC) #11
commit-bot: I haz the power
4 years, 11 months ago (2015-12-30 19:05:50 UTC) #13
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/277a2fa76b238c46af6cc98eba54296b82423415
Cr-Commit-Position: refs/heads/master@{#367168}

Powered by Google App Engine
This is Rietveld 408576698