This can be reproduced with the attached Perl script, which sets up a ControlMaster master and repeatedly copies the file 'foo' from some remote location. On MacOS X (Intel), it hangs at some number of iterations, sometimes 20ish, 40ish, 150, etc. The script only tests scp, but I remember having similar issues with sftp before. Some extra background on this bug: the version control system darcs uses the ControlMaster feature because operations like committing patches or retrieving them from a remote repository requires several invocations of ssh, scp and sftp, not necessarily in that order. We were pretty happy with the ControlMaster feature until one day, MacOS X users on the Intel machines started reporting that darcs would mysteriously hang in the middle of some operation using a remote repository. I have also heard one report that darcs with ControlMaster enabled also sometimes hangs on Linux, but have not been able to confirm it. I've been stumped on this one for ages until a user suggested we try reproducing it outside of darcs, hence the attached Perl script. Thanks!
Created attachment 1370 [details] script to call scp repeatedly as a ControlMaster slave
I forgot to mention: we have seen this behaviour with versions 4.2, 4.3, 4.5 and 4.7
*** This bug has been marked as a duplicate of bug 1263 ***
Close resolved bugs after release.