hang on exit bug under Linux

mouring at etoh.eviladmin.org mouring at etoh.eviladmin.org
Tue Dec 11 04:49:06 EST 2001



On Mon, 10 Dec 2001, Michael wrote:

> >
> > [..]
> > > Like I said, ssh-1.2.27 works fine
> > > OpenSSH_2.9.9p2 is guaranteed to hang
> > >
> > ssh 1.2.27 could/would lose data on scp because is favored quiting
> > before the buffers were flushed.
> >
> > > This means that a daemon can never be stopped and restarted from the
> > > keyboard without a hang or screwing around with special exit
> > > procedures. Looks, sounds, smells like a bug to me.
> > >
> >
> > This pretty much is very unhelpful.  If you read the whole history
> > on this mailinglist a more USEFUL insight would be why it occurs on
> > some UNIXes and not others.  And what the correct solution is.
> >
> > Something no one has been able to do, and I'm at a loss without
> > approving a hack that may bite us in the ass later on.
> >
>
> I have been following this thread for some time. John Bowman
> submitted a patch for 3.01 on Nov 14 that purportedly fixes the
> problem. I don't know what this does on various OS's and am certainly
> not the one to say it is "the" permanent fix, but there was no
> further comment after that. I'd like to see a fix as the present
> situation certainly is not acceptable in the long run. If John's fix
> works for Linux and does so without data loss, then perhaps it should
> be included and compiled in by configuration option for those OS's
> where it is known to solve the problem.
>
As stated John's fix did it at the cost of the protocol and also was
not very portable.  It may have solved it for Linux, but it broken OpenBSD
which worked fine without it.  And did not solve the problem for other
platforms such as NeXT, HP/UX, etc.  So it was considered unacceptable.

I believe this has been stated at least 3 times so far in the last year.

The issue resolves around how each platform handles open File descriptors
on TTYs.  Thus the reason why if you redirect all file descriptors to
/dev/null when launching services it does not hang.

- Ben




More information about the openssh-unix-dev mailing list