OpenSSH-2.5.1p1 scp hangs when scping into an RH (6.0|7.0) box

Pekka Savola pekkas at netcore.fi
Thu Feb 22 04:51:25 EST 2001


On Wed, 21 Feb 2001, Jim Breton wrote:

> On Wed, Feb 21, 2001 at 07:25:44PM +0200, Pekka Savola wrote:
> > Might this be related to this (from TODO):
> >
> > ---
> > - Linux hangs for 20 seconds when you do "sleep 20&exit".  All current
> >   solutions break scp or leaves processes hanging around after the ssh
> >   connection has ended.  It seems to be linked to two things.  One
> >   select() under Linux is not as nice as others, and two the children
> >   of the shell are not killed on exiting the shell.
> > ---
>
> Well it could be, I had seen that but didn't think it was related
> because a) it happens with any command (I foolishly thought that may
> have been related _only_ to sleep :P ); b) it works on some of the
> systems I am testing which are all running the exact same version of
> OpenSSH (2.5.1); c) the hang lasts a lot longer than 20 seconds (I
> waited for 10 mins in one case, and it still hadn't exited).

a) the hanging connections can happen with any command, try e.g.
/sbin/service httpd restart (on RHL)

b) the problem exists on 2.2.0pX (or the like) and 2.5.x (also post 2.3.0
snapshots).

c) the hang time is dependent on your sleep value, or how long it takes
for the process to die.

Try adding shopt -s huponexit in your bash initialization.  That should
work around the problem for now.

> > If so, scp should work now.
> >
> > This was changed after 2.3.0p1 was released.
>
> But I am using 2.5.1p1.  Was that a typo, or is there a patch available
> for the 2.5.1p1 release?

scp should work now.  Connections may hang now.

There is no patch yet.  Ideas how this could be fixed are welcome, I'm
certain :-/.

-- 
Pekka Savola                  "Tell me of difficulties surmounted,
Netcore Oy                    not those you stumble over and fall"
Systems. Networks. Security.   -- Robert Jordan: A Crown of Swords






More information about the openssh-unix-dev mailing list