New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 608767 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
please use my google.com address
Closed: May 2016
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Mojo EDK: RewriteHandles leaves stale HANDLEs in message on failure

Project Member Reported by roc...@chromium.org, May 3 2016

Issue description

On Windows, we rewrite (i.e. duplicate-and-close) outgoing HANDLEs before sending to another process. This operation can fail if the target process is closing.

If the operation fails the local HANDLE is still closed, but we're currently leaving its value in the Message unchanged.

When the Message is destroyed, PlatformHandle tries to close the (now invalid) handle and DCHECKs. We shouldn't DCHECK but should instead invalidate any handle for which DuplicateHandle fails in RewriteHandles.
 
Project Member

Comment 1 by bugdroid1@chromium.org, May 3 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a4bd42ba95dfa2be77c4a9db6388e97270046dea

commit a4bd42ba95dfa2be77c4a9db6388e97270046dea
Author: rockot <rockot@chromium.org>
Date: Tue May 03 17:45:41 2016

[mojo-edk] Invalidate message handle when rewrite fails

On Windows we rewrite (i.e. duplicate-and-close) outgoing
handles before sending to another process. This operation
can fail if the target process is closing.

This CL invalidates a stored handle if DuplicateHandle fails,
preventing PlatformHandle from later trying to close a
non-existent handle during Message destruction.

BUG= 608767 
R=jam@chromium.org

Review-Url: https://codereview.chromium.org/1940353002
Cr-Commit-Position: refs/heads/master@{#391287}

[modify] https://crrev.com/a4bd42ba95dfa2be77c4a9db6388e97270046dea/mojo/edk/embedder/platform_handle_utils_win.cc
[modify] https://crrev.com/a4bd42ba95dfa2be77c4a9db6388e97270046dea/mojo/edk/system/channel.cc
[modify] https://crrev.com/a4bd42ba95dfa2be77c4a9db6388e97270046dea/mojo/edk/system/node_channel.cc

Status: Fixed (was: Started)

Sign in to add a comment