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

Re: Bad interaction between svn and OpenSSH auto connection pooling

From: Alan Barrett <apb_at_cequrux.com>
Date: 2007-03-04 09:55:26 CET

On Sat, 03 Mar 2007, Peter Samuelson wrote:
> > Ideally, svn should close all the relevant file descriptors and wait
> > for ssh to die by itself. If it doesn't die after a few seconds,
> > kill it with SIGTERM; if it still doesn't die after a few more
> > seconds, only then kill it with SIGKILL.
>
> Setting a few-second timeout might not be trivial from within the
> bowels of a library. It involves either blocking the whole thread, or
> some sort of alarm and signal handling, with no knowledge of what the
> host application might already be using these facilities for.

I am not familiar with the internals of either APR or svn, but I was
under the impression that some kind of event framework was available,
and that this could be used to program arbitrary sequences of timed
operations.

> > On the ssh side, perhaps the control master should fork and
> > daemonise itself, to insulate it from being killed by svn.
>
> Well ... if you kill a process, doesn't that usually mean you really
> do intend for it to die? I think ssh is already doing the right thing
> there.

Well, when svn kills ssh, it really intends for one svn-to-svnserve
connection to die; I don't think it intends for other svn-to-svnserve
connections to die, and svn has no way of knowing that the same ssh
process is multiplexing several svn-to-svnserve connections over a
single ssh-to-sshd connection.

When ssh is killed, how will it know whether the killer intended to
terminate only the initial svn-to-svnserve connection, or also other
connections multiplexed though the same "control master"? So I am
suggesting that ssh should grow new functionality to place the control
master into the background, such that killing the control master kills
all multiplexed connections, but killing the original ssh process kills
only the original conenction.

--apb (Alan Barrett)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sun Mar 4 10:00:22 2007

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