[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-03 13:00:32 CET

On Sat, 03 Mar 2007, Peter Samuelson wrote:
> OK, svn is not actually buggy. Here is what happens:
>
> 'svn log svn+ssh://...' fires off _two_ ssh processes. (Erik
> Huelsmann explains on IRC that this is intentional, connections
> are treated as lightweight, libsvn_ra makes no attempt to reuse
> connections for efficiency.)

That might be intentional, but "connections are lightweight" is an
incorrect assumption, and it would be nice if libsvn_ra did not make
this assumption.

> The first ssh process finishes its business and is explicitly killed
> (by apr, when the session pool is destroyed). The second connection
> is still active.

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. svn currently kills it immediately with
SIGKILL, which is very rude, and I call this a bug. Processes killed
with SIGKILL do not get a chance to clean up after themselves (for
example, delete temporary files), and I had to go to a lot of extra
trouble in wrapper scripts referred to by $SVN_SSH to work around this
problem.

On the ssh side, perhaps the control master should fork and
daemonise itself, to insulate it from being killed by svn.

--apb (Alan Barrett)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Mar 3 13:04:27 2007

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.