|
|
Created:
4 years, 5 months ago by achuithb Modified:
4 years, 5 months ago Reviewers:
emaxx CC:
chromium-reviews, dzhioev+watch_chromium.org, achuith+watch_chromium.org, oshima+watch_chromium.org, davemoore+watch_chromium.org Base URL:
https://chromium.googlesource.com/chromium/src.git@master Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
Descriptionremote-debugging-port for guest sessions.
--remote-debugging-port flag is lost when guest sessions are started on
chromeos.
BUG=None
Committed: https://crrev.com/7268c3d1f3f991740f536d9680426251392b98e8
Cr-Commit-Position: refs/heads/master@{#405633}
Patch Set 1 #
Total comments: 3
Messages
Total messages: 17 (7 generated)
The CQ bit was checked by achuith@chromium.org to run a CQ dry run
achuith@chromium.org changed reviewers: + emaxx@chromium.org
Max, please take a look
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
https://codereview.chromium.org/2141303003/diff/1/chrome/browser/chromeos/log... File chrome/browser/chromeos/login/chrome_restart_request.cc (right): https://codereview.chromium.org/2141303003/diff/1/chrome/browser/chromeos/log... chrome/browser/chromeos/login/chrome_restart_request.cc:141: ::switches::kRemoteDebuggingPort, I'm wondering whether a race between the current Chrome process and the newly started Chrome process would become possible. Because probably the dev tools would just fail to start listening on a port if it's already in use. And, if this really may happen, I'm not sure how to fix this properly. I don't see in the RestartChrome function any currently existing place for putting the necessary cleanup _before_ launching the new process.
https://codereview.chromium.org/2141303003/diff/1/chrome/browser/chromeos/log... File chrome/browser/chromeos/login/chrome_restart_request.cc (right): https://codereview.chromium.org/2141303003/diff/1/chrome/browser/chromeos/log... chrome/browser/chromeos/login/chrome_restart_request.cc:141: ::switches::kRemoteDebuggingPort, On 2016/07/13 18:25:40, emaxx wrote: > I'm wondering whether a race between the current Chrome process and the newly > started Chrome process would become possible. > Because probably the dev tools would just fail to start listening on a port if > it's already in use. It shouldn't be in use though right? I'm assuming chrome shutdown properly closes the socket. Also, this seems to be no different than restarting the browser using the same port, which is something I do frequently without seeing any problems. > And, if this really may happen, I'm not sure how to fix this properly. I don't > see in the RestartChrome function any currently existing place for putting the > necessary cleanup _before_ launching the new process. In practice, this seems to work ok in my testing. --remote-debugging-port is only used for testing, and this change is chromeos specific, so even if there are some cases where this doesn't work perfectly, it's still an improvement for debugging guest sessions. The teardown sequence closes the remote debugging server here: https://cs.chromium.org/chromium/src/chrome/browser/browser_process_impl.cc?l... I'm not able to find the exact location where the socket is closed but I could look into it if you have a strong concern that it is not cleanly closed.
lgtm https://codereview.chromium.org/2141303003/diff/1/chrome/browser/chromeos/log... File chrome/browser/chromeos/login/chrome_restart_request.cc (right): https://codereview.chromium.org/2141303003/diff/1/chrome/browser/chromeos/log... chrome/browser/chromeos/login/chrome_restart_request.cc:141: ::switches::kRemoteDebuggingPort, On 2016/07/14 09:21:14, achuithb wrote: > On 2016/07/13 18:25:40, emaxx wrote: > > I'm wondering whether a race between the current Chrome process and the newly > > started Chrome process would become possible. > > Because probably the dev tools would just fail to start listening on a port if > > it's already in use. > > It shouldn't be in use though right? I'm assuming chrome shutdown properly > closes the socket. Also, this seems to be no different than restarting the > browser using the same port, which is something I do frequently without seeing > any problems. > > > > And, if this really may happen, I'm not sure how to fix this properly. I don't > > see in the RestartChrome function any currently existing place for putting the > > necessary cleanup _before_ launching the new process. > > In practice, this seems to work ok in my testing. > > --remote-debugging-port is only used for testing, and this change is chromeos > specific, so even if there are some cases where this doesn't work perfectly, > it's still an improvement for debugging guest sessions. > > The teardown sequence closes the remote debugging server here: > https://cs.chromium.org/chromium/src/chrome/browser/browser_process_impl.cc?l... > > I'm not able to find the exact location where the socket is closed but I could > look into it if you have a strong concern that it is not cleanly closed. OK, I see: as this code (the GetOffTheRecordCommandLine method) is actually relevant only for Chrome OS, we have only two cases to consider: the real Chrome OS and the development "chromeos=1" build. In the former case, seems that the session manager actually waits until the old browser process is terminated until opening the new one (so there is no race condition). As for the latter case, I'm still thinking there's some probability of having issues. But I don't want to block the CL just because of some potential (and not really harmful) problem in the dev environment.
On 2016/07/14 18:27:03, emaxx wrote: > lgtm > > https://codereview.chromium.org/2141303003/diff/1/chrome/browser/chromeos/log... > File chrome/browser/chromeos/login/chrome_restart_request.cc (right): > > https://codereview.chromium.org/2141303003/diff/1/chrome/browser/chromeos/log... > chrome/browser/chromeos/login/chrome_restart_request.cc:141: > ::switches::kRemoteDebuggingPort, > On 2016/07/14 09:21:14, achuithb wrote: > > On 2016/07/13 18:25:40, emaxx wrote: > > > I'm wondering whether a race between the current Chrome process and the > newly > > > started Chrome process would become possible. > > > Because probably the dev tools would just fail to start listening on a port > if > > > it's already in use. > > > > It shouldn't be in use though right? I'm assuming chrome shutdown properly > > closes the socket. Also, this seems to be no different than restarting the > > browser using the same port, which is something I do frequently without seeing > > any problems. > > > > > > > And, if this really may happen, I'm not sure how to fix this properly. I > don't > > > see in the RestartChrome function any currently existing place for putting > the > > > necessary cleanup _before_ launching the new process. > > > > In practice, this seems to work ok in my testing. > > > > --remote-debugging-port is only used for testing, and this change is chromeos > > specific, so even if there are some cases where this doesn't work perfectly, > > it's still an improvement for debugging guest sessions. > > > > The teardown sequence closes the remote debugging server here: > > > https://cs.chromium.org/chromium/src/chrome/browser/browser_process_impl.cc?l... > > > > I'm not able to find the exact location where the socket is closed but I could > > look into it if you have a strong concern that it is not cleanly closed. > > OK, I see: as this code (the GetOffTheRecordCommandLine method) is actually > relevant only for Chrome OS, we have only two cases to consider: the real Chrome > OS and the development "chromeos=1" build. > In the former case, seems that the session manager actually waits until the old > browser process is terminated until opening the new one (so there is no race > condition). > As for the latter case, I'm still thinking there's some probability of having > issues. > But I don't want to block the CL just because of some potential (and not really > harmful) problem in the dev environment. Thanks!
The CQ bit was checked by achuith@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Message was sent while issue was closed.
Committed patchset #1 (id:1)
Message was sent while issue was closed.
CQ bit was unchecked.
Message was sent while issue was closed.
Description was changed from ========== remote-debugging-port for guest sessions. --remote-debugging-port flag is lost when guest sessions are started on chromeos. BUG=None ========== to ========== remote-debugging-port for guest sessions. --remote-debugging-port flag is lost when guest sessions are started on chromeos. BUG=None Committed: https://crrev.com/7268c3d1f3f991740f536d9680426251392b98e8 Cr-Commit-Position: refs/heads/master@{#405633} ==========
Message was sent while issue was closed.
Patchset 1 (id:??) landed as https://crrev.com/7268c3d1f3f991740f536d9680426251392b98e8 Cr-Commit-Position: refs/heads/master@{#405633}
Message was sent while issue was closed.
A revert of this CL (patchset #1 id:1) has been created in https://codereview.chromium.org/2189503002/ by achuith@chromium.org. The reason for reverting is: Speculative revert for crbug.com/631640. |