ControlSocket already exists

5,293 views
Skip to first unread message

Luigi Semenzato

unread,
Oct 27, 2010, 1:29:37 PM10/27/10
to Chromium OS dev
Has anybody seen these messages and would they know how to get rid of
them? Thanks!

semenzato@semenzato:~/chromeos/src/third_party/kernel/files$ repo sync .
ControlSocket /tmp/ssh-39DeWq/maste...@gitrw.chromium.org:9222
already exists, disabling multiplexing
ControlSocket /tmp/ssh-39DeWq/maste...@gitrw.chromium.org:9222
already exists, disabling multiplexing

Doug Anderson

unread,
Oct 27, 2010, 5:58:08 PM10/27/10
to Luigi Semenzato, Chromium OS dev
Luigi,

I have also noticed them, and have so far been ignoring them since they appear harmless.  I believe that they are related to an attempt to speed up repo/git by reusing a single ssh connection for all communication (usually git establishes a separate ssh connection for each command, which is a lot of overhead).

I did a little more digging, and it looks like the warnings are related to a slight misuse of the ssh options.  I'm still fairly confident that the messages can be ignored...


More details (for the curious):

I found two places where "ssh" appears to be launched as part of repo:
    ~/chromeos/.repo/repo/git_ssh        # Used directly by git, I think
    ~/chromeos/.repo/repo/git_config.py  # Used to establish ControlMaster tunnels, I think

Further digging reveals:
  1. The first of the two warnings appears to only show up if you have your "~/.ssh/config" set to have "ControlMaster auto" for "Host gitrw.chromium.org".  That's what I had in mine, since it was in one of the two sets of instructions for setting up source code.  You can avoid the warning by commenting out that line (and take out the "ControlPath" line too, while you're at it).
    1. We could also fix this warning by adding -o "ControlMaster no" to the git_ssh wrapper.
  2. The second of the two warnings seems to be due to an inconsistency in the way that we're referring to the server.  In one case we're referring to it as "gitrw.chromium.org".  In the other as "g...@gitrw.chromium.org".  Given the instructions for setting up git, the two should be equivalent, but this is confusing the "git_config.py" script.

I will keep investigating (since this gives me a good intro to the repo code) and eventually come up with a proposal to try to get rid of these warnings and try to update the various online docs...

-Doug

---


--
Chromium OS Developers mailing list: chromiu...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-os-dev?hl=en

Luigi Semenzato

unread,
Oct 27, 2010, 6:05:14 PM10/27/10
to Doug Anderson, Chromium OS dev
That is very nice, thanks. I had figured they were harmless, but they
cause unnecessary processing in the brain.

Doug Anderson

unread,
Oct 27, 2010, 8:44:26 PM10/27/10
to Luigi Semenzato, Chromium OS dev
Luigi (and anyone else interested),

You can fix these warnings on your own machine by doing these two things:
  1. Comment out / remove the ControlMaster / ControlPath lines for "Host gitrw.chromium.org" in your "~/.ssh/config" file (I mentioned this in the original email)
  2. Re-init your repo with the command "repo init -u ssh://git@gitrw.chromium.org:9222/manifest-internal -m minilayout.xml".  This will make it consistent with other calls to ssh.
For those that don't want to bother, I have created two patches for "repo" which will make it do the right thing (even if you don't make the above changes) and will try to get them applied upstream.  If you'd like details on the patches, please let me know.

I will also undergo the effort of finding the various places in our instructions so that I can update them.

-Doug

---

Chris Masone

unread,
Oct 27, 2010, 9:12:05 PM10/27/10
to Doug Anderson, Luigi Semenzato, Chromium OS dev
Presumably, these settings were in ther for a reason.  What are we losing by taking them out?

Doug Anderson

unread,
Oct 27, 2010, 9:19:30 PM10/27/10
to Chris Masone, Luigi Semenzato, Chromium OS dev
Chris,

The first setting (in ~/.ssh/config) looks to be from a time when either we weren't using repo, or from a time when repo didn't handle the ssh ControlMaster / ControlPath itself.  IMHO, it is extremely safe to remove these lines from your ssh config, especially given the fact that the comments right above the lines say that they are optional and just a speed optimization.  I am convinced that repo already incorporates the speed optimization.  ...thus, the lines in the ssh config are actually redundant.


The second change is actually just working around the fact that repo doesn't realize that:
...and
..are actually the same thing (due to your ssh config, which says that the user should be "git" by default for the host "gitrw.chromium.org"). Thus, you are simply specifying a different name for the same thing.  This different name is more consistent with other places and makes repo slightly happier.


Let me know if you have any other questions, or if you'd like me to send you the full discussion on the patches.

Thanks!

-Doug

---
Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages