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

Issue 1985833002: [mojo-edk] Prevent closed port from accepting new messages (Closed)

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

Description

[mojo-edk] Prevent closed port from accepting new messages Previously it was possible for a message to arrive just before closing a port. In this case OnUserMessage would grab a ref to the Port object (thus keeping it alive), ClosePort would close the port (in turn closing any ports referenced by its message queue), and then it would be possible for OnUserMessage to continue by locking the port and enqueueing a (potentially port- carrying) message onto the queue. This resolves the issue by making CanAcceptMoreMessages fail if the port is closed. Also minor cleanup removing the unused ErasePort method. TBR=amistry@chromium.org BUG= Committed: https://crrev.com/1eb892f358de593644d40d4075cadca59a327f94 Cr-Commit-Position: refs/heads/master@{#393947}

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+2 lines, -6 lines) Patch
M mojo/edk/system/ports/node.h View 1 chunk +0 lines, -1 line 0 comments Download
M mojo/edk/system/ports/node.cc View 2 chunks +2 lines, -5 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 7 (2 generated)
Ken Rockot(use gerrit already)
TBRing for another tiny race fix. Combined with the broadcast CL, I've verified with a ...
4 years, 7 months ago (2016-05-16 20:58:21 UTC) #1
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1985833002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1985833002/1
4 years, 7 months ago (2016-05-16 20:58:55 UTC) #3
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years, 7 months ago (2016-05-16 22:03:45 UTC) #4
commit-bot: I haz the power
Patchset 1 (id:??) landed as https://crrev.com/1eb892f358de593644d40d4075cadca59a327f94 Cr-Commit-Position: refs/heads/master@{#393947}
4 years, 7 months ago (2016-05-16 22:05:24 UTC) #6
Anand Mistry (off Chromium)
4 years, 7 months ago (2016-05-17 04:17:38 UTC) #7
Message was sent while issue was closed.
On 2016/05/16 20:58:21, Ken Rockot wrote:
> TBRing for another tiny race fix.
> 
> Combined with the broadcast CL, I've verified with a fairly high degree of
> confidence that EDK shutdown races are gone. I have a follow-up CL which adds
a
> regression test to mojo_shell_unittests to exercise racy shutdown behavior.

FYI, I'll probably end up bringing back ErasePort() as part of my
reduce-ports_lock_contention changes.

Powered by Google App Engine
This is Rietveld 408576698