[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Issue #2580 revisited: Windows unclean TCP close [SEVERE]

From: Stefan Sperling <stsp_at_elego.de>
Date: Fri, 23 Oct 2009 00:03:21 +0200

On Thu, Oct 22, 2009 at 06:52:11AM -0700, Paul Charlton wrote:
> Fix SVNSERVE to respond correctly to the handshake it is receiving from
> sshd. I am not currently set up to do the test, but anyone who is running
> SSHD+SVNSERVE could run their SSHD in DEBUG mode and see what the handshake
> is and where SVNSERVE is dropping the ball.

What handshake are you referring to?
svnserve is complete agnostic about the ssh protocol.
It's just a tunnel agent, something that gives it a file descriptor
to read data and write data. It assumes it can send a sigterm to
the tunnel agent to tell it to quit the connection.

> > If Bob's patch fixes the problem without causing undesired side-
> > effects,
> > then that's fine by me.
> This problem with SVNSERVE can also manifest itself without the windows
> client, and Bob's changes will not fix the other sources of the problem (for
> example, when someone kills the client from the Windows Task Manager).
> Fixing SVNSERVE will eliminate the whole class of problems.
> More specifically, there are routers and NAT devices out there which also
> can end the session with a TCP RST to the server (instead of FIN/ACK), I am
> pretty sure my old NetGear NAT would do that even under legitimate
> circumstance, and the RFC does permit it.

Yes, connections can be severed for many reasons, but that's beside
the point here.

The problem is:

We need to terminate the tunnel agent (ssh client) by sending sigterm.
We cannot use sigkill because that does not work with ssh connection
pooling. Any ssh connection pooling master we kill with sigterm will
leave behind debris that prevents a new master from being spawned.
See issue #2580.

But sending a sigterm does not work on windows (either because Windows
or APR doesn't support it, I don't understand which). So Bob is
proposing we send sigkill again on windows only, possibly re-creating
the ssh connection pooling problem for windows users.

Note also that there is a known problem with OpenSSH versions < 5.1,
which can manifest itself in hanging servers/clients. Again, see issue
#2580 for details.
By the way, Bob, maybe you are running a version of sshd affected by that
bug? If so, could you try updating sshd and see if that solves the problem,
without your patch applied?

Also, I'd like to say this:
Everyone, please note that "how to terminate svn+ssh" is an issue that
keeps coming back haunting us. It is quite complicated to get this right,
and there are many components to point fingers at when looking at related
problems. Please refrain from speculating what the cause might be, but look,
and present data to proof your claims. Anything else is speculation, and
causes long discussion with no useful outcome. So it does not help much,
or worse, it might mislead people trying to fix the problem.


Received on 2009-10-23 00:27:52 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.