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

Issue 11040065: [Chromoting] Reimplemented the worker process launcher to take into account the encountered issues: (Closed)

Created:
8 years, 2 months ago by alexeypa (please no reviews)
Modified:
8 years, 2 months ago
Reviewers:
Wez, simonmorris
CC:
chromium-reviews, jamiewalch+watch_chromium.org, dcaiafa+watch_chromium.org, simonmorris+watch_chromium.org, hclam+watch_chromium.org, wez+watch_chromium.org, amit, sanjeevr, garykac+watch_chromium.org, lambroslambrou+watch_chromium.org, rmsousa+watch_chromium.org, alexeypa+watch_chromium.org, sergeyu+watch_chromium.org, Wez
Visibility:
Public.

Description

[Chromoting] Reimplement the worker process launcher to address issues with job control and launching of elevated processes. This CL makes three changes: 1. We create a new job object every time we launch a worker into a new session, under Vista and above. This addresses the limitation that a job object used with processes from one session cannot later be re-used to manage processes from a different session. 2. We launch and manage worker processes directly on XP/W2K3, without a job object. We don't need a job object since these platforms don't support/need elevation anyway. This addresses the limitation that processes created via CreateRemoteSessionProcess() cannot be assigned to a job object. 3. We allow WorkerProcessLauncher instances to be dropped synchronously from the caller's perspective; the class takes care of asynchronous tear-down tasks transparently. This addresses a race condition in tear-down of old worker processes and creation of new ones arising from delayed session change notifications. The new layout assigns the following responsibilities: - WorkerProcessLauncher is used to manage a worker process, taking care of setting up the IPC channel, and re-launching it w/ exponential back-off. It supports fire-and-forget tear-down. - WorkerProcessLauncher defers launch & termination to a caller-supplied Delegate, responsible for launching the process as the caller requires. - Our current "single-process" service launches the host process via WtsConsoleSessionProcessDriver, which tracks which session is currently attached to the console and uses WtsSessionProcessDelegate instances to have WorkerProcessLauncher re-launch the host into the new console session whenever it is switched. WtsSessionProcessDelegate takes care of OS-version-specific process management tasks. - Our experimental "multi-process" service launches the host's network process, undependent of session lifetimes, by passing an UnprivilegedProcessDelegate to WorkerProcessLauncher. This launches the host process in the same session as the caller. BUG=153005, 148781, 149098 TEST=remoting_unittests.WorkerProcessLauncherTest Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=161140

Patch Set 1 #

Total comments: 13

Patch Set 2 : CR feedback. #

Total comments: 81

Patch Set 3 : CR feedback. #

Patch Set 4 : Count the worker exiting too such as a failure. #

Total comments: 4

Patch Set 5 : rebased #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1615 lines, -1192 lines) Patch
M remoting/host/daemon_process.h View 1 chunk +1 line, -0 lines 0 comments Download
M remoting/host/daemon_process.cc View 1 chunk +6 lines, -0 lines 0 comments Download
M remoting/host/daemon_process_win.cc View 1 2 7 chunks +22 lines, -183 lines 0 comments Download
M remoting/host/win/host_service.h View 1 chunk +0 lines, -6 lines 0 comments Download
M remoting/host/win/host_service.cc View 1 3 chunks +4 lines, -4 lines 0 comments Download
M remoting/host/win/launch_process_with_token.cc View 1 2 3 4 1 chunk +0 lines, -5 lines 0 comments Download
A remoting/host/win/unprivileged_process_delegate.h View 1 2 1 chunk +55 lines, -0 lines 0 comments Download
A remoting/host/win/unprivileged_process_delegate.cc View 1 2 1 chunk +117 lines, -0 lines 0 comments Download
M remoting/host/win/worker_process_launcher.h View 1 2 2 chunks +26 lines, -79 lines 0 comments Download
M remoting/host/win/worker_process_launcher.cc View 1 2 3 6 chunks +324 lines, -87 lines 0 comments Download
A remoting/host/win/worker_process_launcher_unittest.cc View 1 2 3 4 1 chunk +335 lines, -0 lines 0 comments Download
A remoting/host/win/wts_console_session_process_driver.h View 1 2 1 chunk +76 lines, -0 lines 0 comments Download
A remoting/host/win/wts_console_session_process_driver.cc View 1 2 1 chunk +125 lines, -0 lines 0 comments Download
A remoting/host/win/wts_session_process_delegate.h View 1 2 1 chunk +51 lines, -0 lines 0 comments Download
A remoting/host/win/wts_session_process_delegate.cc View 1 2 1 chunk +457 lines, -0 lines 0 comments Download
D remoting/host/win/wts_session_process_launcher.h View 1 chunk +0 lines, -113 lines 0 comments Download
D remoting/host/win/wts_session_process_launcher.cc View 1 chunk +0 lines, -713 lines 0 comments Download
M remoting/host/worker_process_ipc_delegate.h View 1 chunk +3 lines, -0 lines 0 comments Download
M remoting/remoting.gyp View 1 2 3 4 4 chunks +13 lines, -2 lines 0 comments Download

Messages

Total messages: 10 (0 generated)
alexeypa (please no reviews)
Simon, please take a look. CC'ing Wez in case if he has time. This CL ...
8 years, 2 months ago (2012-10-05 17:44:09 UTC) #1
alexeypa (please no reviews)
https://chromiumcodereview.appspot.com/11040065/diff/1/remoting/host/win/launch_process_with_token.cc File remoting/host/win/launch_process_with_token.cc (right): https://chromiumcodereview.appspot.com/11040065/diff/1/remoting/host/win/launch_process_with_token.cc#newcode294 remoting/host/win/launch_process_with_token.cc:294: desired_access = This is a part of https://chromiumcodereview.appspot.com/11065016/. I'll ...
8 years, 2 months ago (2012-10-05 17:46:21 UTC) #2
simonmorris
This CL is complex enough that wez@ would be a better reviewer for it. I've ...
8 years, 2 months ago (2012-10-05 20:19:45 UTC) #3
alexeypa (please no reviews)
+Wez. http://codereview.chromium.org/11040065/diff/1/remoting/host/daemon_process_win.cc File remoting/host/daemon_process_win.cc (right): http://codereview.chromium.org/11040065/diff/1/remoting/host/daemon_process_win.cc#newcode111 remoting/host/daemon_process_win.cc:111: launcher_->Send(message); On 2012/10/05 20:19:45, simonmorris wrote: > Maybe ...
8 years, 2 months ago (2012-10-05 21:18:34 UTC) #4
Wez
http://codereview.chromium.org/11040065/diff/7002/remoting/host/daemon_process_win.cc File remoting/host/daemon_process_win.cc (right): http://codereview.chromium.org/11040065/diff/7002/remoting/host/daemon_process_win.cc#newcode59 remoting/host/daemon_process_win.cc:59: // True if the network process has connected to ...
8 years, 2 months ago (2012-10-09 03:40:39 UTC) #5
alexeypa (please no reviews)
https://chromiumcodereview.appspot.com/11040065/diff/7002/remoting/host/daemon_process_win.cc File remoting/host/daemon_process_win.cc (right): https://chromiumcodereview.appspot.com/11040065/diff/7002/remoting/host/daemon_process_win.cc#newcode59 remoting/host/daemon_process_win.cc:59: // True if the network process has connected to ...
8 years, 2 months ago (2012-10-09 19:42:04 UTC) #6
Wez
LGTM! https://chromiumcodereview.appspot.com/11040065/diff/7002/remoting/host/win/wts_console_session_process_driver.h File remoting/host/win/wts_console_session_process_driver.h (right): https://chromiumcodereview.appspot.com/11040065/diff/7002/remoting/host/win/wts_console_session_process_driver.h#newcode27 remoting/host/win/wts_console_session_process_driver.h:27: class WtsConsoleSessionProcessDriver On 2012/10/09 19:42:04, alexeypa wrote: > ...
8 years, 2 months ago (2012-10-10 00:52:03 UTC) #7
alexeypa (please no reviews)
https://chromiumcodereview.appspot.com/11040065/diff/25001/remoting/host/win/worker_process_launcher.cc File remoting/host/win/worker_process_launcher.cc (right): https://chromiumcodereview.appspot.com/11040065/diff/25001/remoting/host/win/worker_process_launcher.cc#newcode368 remoting/host/win/worker_process_launcher.cc:368: // least two seconds. On 2012/10/10 00:52:03, Wez wrote: ...
8 years, 2 months ago (2012-10-10 16:58:19 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/alexeypa@chromium.org/11040065/14025
8 years, 2 months ago (2012-10-10 16:58:38 UTC) #9
commit-bot: I haz the power
8 years, 2 months ago (2012-10-10 19:00:09 UTC) #10
Change committed as 161140

Powered by Google App Engine
This is Rietveld 408576698