Stalled scp transfers due to OpenSSH regression

Recently, I started having troubles with transferring files to my servers via scp. Typically, I would just issue the scp command without any options at all (regarding rate limiting, et cetera). However, I started having a problem where it would only transfer small files–ones that were <50KB. Anything larger than that would start just fine, but the transfer would stop quite abruptly, and scp would report that it had stalled. I also saw this problem when trying to upload via sftp. However, using rsync to transfer the files would work without a problem. After digging around for quite some time, consulting multiple posts regarding the issue, and setting every option imaginable within scp, I had all but given up. I firstly eliminated that there was a problem with my local machine by trying from a couple other machines of mine. I secondly eliminated my home networking equipment by trying from another network, and via my mobile. At that point, I knew that the problem had to be with my server, or with one of the hops along the way (more likely the former than the latter). So, I investigated settings on my server, but there weren't many clues to utilise; nothing in /var/log/messages or /var/log/authlog. I started tcpdumps but couldn’t see any indication of WHY the problem was occurring; just that it WAS occurring.

Eventually I started looking through Gentoo’s bugtracker, and stumbled across bug #414401. Though the original bug wasn’t about an scp problem specifically, the first comment reflected the same issue that I was experiencing. It seems that the problem was related to a buggy HPN patch in the latest version of OpenSSH. I reverted to the previous patch and the problem was gone.

Oh the trials and tribulations of problem-solving in the software world. 😉 Hopefully this post will help someone solve a similar problem.

Cheers,
Zach

1 comments

    • JaMa on Monday, 16 July 2012 at 02:43
    • Reply

    I had similar problem with openssh-6.0 and backuppc, I’ve downgraded to 5.9..
    http://www.backupcentral.com/phpBB2/two-way-mirrors-of-external-mailing-lists-3/backuppc-21/backuppc-hangs-when-rsync-xfermethod-is-used-for-client-with-118479/

Leave a Reply

Your email address will not be published.