7

I recently enabled ControlMaster and ControlPersist in SSH so that it reuses and multiplexes connections for speed. The config is:

ControlMaster auto
ControlPath /tmp/ssh_mux_%h_%p_%r
ControlPersist 4h

If I turn ControlPersist off, everything is fine. With it on, though, the first git/hg connection will always freeze. SSHing in normally (in a shell) works fine, ever for the first time, but git/hg freezes. If I stop it with ctrl+C and then retry, it will use the already-established connection to multiplex and it will be fast, but it won't do it the first time. Turning LogLevel up to 11 gives me:

remote: debug2: fd 4 setting O_NONBLOCK
remote: debug1: forking to background
remote: debug1: Entering interactive session.
remote: debug2: set_control_persist_exit_time: schedule exit in 14400 seconds
remote: debug1: multiplexing control connection
remote: debug2: fd 5 setting O_NONBLOCK

at which point, it just freezes and stays there for ever. What's wrong?

2
  • I wasn't able to reproduce this on Fedora 19. What versions are you using? Oct 21, 2013 at 18:53
  • I'm using Ubuntu 13.04. This happens on both my PCs using it. Oct 21, 2013 at 23:09

1 Answer 1

3

I'm seeing the same behavior, and I think it is due to this OpenSSH bug: https://bugzilla.mindrot.org/show_bug.cgi?id=1988 (ControlPersist causes stderr to be left open until the master connection times out)

Hopefully it will be fixed eventually.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.