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

Issue 671990 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Feb 2017
Cc:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug

Blocked on:
issue 688362



Sign in to add a comment

Test launcher leaks temp file used to capture subproc stdout/err

Project Member Reported by grt@chromium.org, Dec 7 2016

Issue description

The launcher inherits each temporary |output_file| into all child processes such that the last of N children inherits the handles of all N procs. Since some children may still be outstanding when the launcher reads and deletes the file for one given child, it will be unable to delete it if any other later child is still running at the time of delete. The launcher should use base::Launch's |handles_to_inherit| so rather than |inherit_handles| so that each child only inherits its one output handle.
 
Note to self: there was a CL posted for review about this, https://codereview.chromium.org/2663183003/ .

Comment 2 by grt@chromium.org, Feb 3 2017

Blockedon: 688362
Project Member

Comment 3 by bugdroid1@chromium.org, Feb 3 2017

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

commit 9ea51a5ffa60046859be210ca5a76ae85abf5a94
Author: grt <grt@chromium.org>
Date: Fri Feb 03 14:42:31 2017

Only allow the desired child proc to inherit its output file.

Prior to this change, other children would end up with references to an
earlier child's stdout handle, thereby preventing it from being deleted.

This change alone makes things better, but doesn't entirely plug the
hole: OpenFile (used by ReadFileToString) inadvertently opens its
handles for inheritance due to implementation details of the Microsoft
CRT. There exists an undocumented "N" mode flag for opening file streams
that disables allowing the opened file to be inherited into child
processes. Another CL will address this.

BUG= 671990 
R=phajdan.jr@chromium.org

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

[modify] https://crrev.com/9ea51a5ffa60046859be210ca5a76ae85abf5a94/base/test/launcher/test_launcher.cc

Comment 4 by grt@chromium.org, Feb 6 2017

Cc: phajdan.jr@chromium.org
Owner: grt@chromium.org
Status: Started (was: Assigned)
FYI: I have https://codereview.chromium.org/2678813003/ out for review to fix the second part of this.

Comment 5 by grt@chromium.org, Feb 13 2017

Status: Fixed (was: Started)
This should be fixed now.

Sign in to add a comment