You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by toby cabot <to...@caboteria.org> on 2009/10/16 15:19:52 UTC

svn+ssh children for svn:externals pile up

Hi Subversion Folks,

I use subversion at work and it works well.  Thanks!  We've recently
started using svn:externals in a big way and are starting to see "svn
update" fail because svn spawns an ssh child for each svn:external and
they "stack up" until the count exhausts the limit of processes that
macos lets one user fork (266 by default, I think).  I can work around
the problem by increasing those limits but that's not a long-term
solution.

I trolled the svn bug tracker and bug 2580[1] looked relevant.  It
indicated that there's a bug[2] in openssh's server that combined with
svn's process handling caused ssh child processes to not exit cleanly.
Sure enough, our linux server has the ssh bug, so I built svn 1.6.5
from source and tried it on an Ubuntu 2009.10 server that has a fixed
ssh server (as verified by the test mentioned in 2580's bug report).

That didn't work either.  It looks as if svn, even with the fix in
2580, spawns one ssh client for each svn:external and those clients
don't exit - they just stack up until the parent "svn up" is finished:

/home/tcabot/Downloads/subversion-1.6.5/subversion/svn/.libs/lt-svn up
 \_ ssh -q -o ControlMaster=no data1.dev svnserve -t
 \_ ssh -q -o ControlMaster=no data1.dev svnserve -t
 \_ ssh -q -o ControlMaster=no data1.dev svnserve -t
 \_ ssh -q -o ControlMaster=no data1.dev svnserve -t
 \_ ssh -q -o ControlMaster=no data1.dev svnserve -t
 etc...

If it helps, this behavior is better than svn versions up through
1.6.4 that (at least on the mac) would spawn *two* children per
svn:external:

12579 s000  Z+     0:00.00 (ssh)
12580 s000  S+     0:00.07 ssh data1.dev svnserve -t

Any ideas?  If you can think of any experiments for me to run, I'd be
happy to do so.

Thanks,
Toby Cabot

[1] http://subversion.tigris.org/issues/show_bug.cgi?id=2580
[2] https://bugzilla.mindrot.org/show_bug.cgi?id=85

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2408254

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

Re: svn+ssh children for svn:externals pile up

Posted by toby cabot <to...@caboteria.org>.
Mark,

On Wed, Oct 21, 2009 at 12:42:37PM -0400, Mark Phippard wrote:
> On Fri, Oct 16, 2009 at 11:19 AM, toby cabot <to...@caboteria.org> wrote:
> > ...
> > started using svn:externals in a big way and are starting to see "svn
> > update" fail because svn spawns an ssh child for each svn:external and
> > ...
> If you can build your own version, it would be worthwhile to apply
> this patch to the 1.6.x branch and see if it makes a difference:
> 
> http://svn.collab.net/viewvc/svn?view=revision&revision=40152

Thanks for the link, this fix works great for me - I did an svn up with
>100 externals and there were never more than 3 ssh children, usually 
2.

Thanks!
Toby

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2409928

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

Re: svn+ssh children for svn:externals pile up

Posted by Mark Phippard <ma...@gmail.com>.
On Fri, Oct 16, 2009 at 11:19 AM, toby cabot <to...@caboteria.org> wrote:

> I use subversion at work and it works well.  Thanks!  We've recently
> started using svn:externals in a big way and are starting to see "svn
> update" fail because svn spawns an ssh child for each svn:external and
> they "stack up" until the count exhausts the limit of processes that
> macos lets one user fork (266 by default, I think).  I can work around
> the problem by increasing those limits but that's not a long-term
> solution.

If you can build your own version, it would be worthwhile to apply
this patch to the 1.6.x branch and see if it makes a difference:

http://svn.collab.net/viewvc/svn?view=revision&revision=40152

-- 
Thanks

Mark Phippard
http://markphip.blogspot.com/

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2409863

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

RE: svn+ssh children for svn:externals pile up

Posted by km...@rockwellcollins.com.
Bob Archer <bo...@amsi.com> wrote on 10/16/2009 10:27:53 AM:

> > I use subversion at work and it works well.  Thanks!  We've recently
> > started using svn:externals in a big way and are starting to see "svn
> > update" fail because svn spawns an ssh child for each svn:external and
> > they "stack up" until the count exhausts the limit of processes that
> > macos lets one user fork (266 by default, I think).  I can work around
> > the problem by increasing those limits but that's not a long-term

[snip]

> I know this doesn't help your issue, but it is a possible solution. 
> Is there any way you could set up apache and switch to the http 
> protocol? My understanding is this issue is isolated to svn+ssh.

I'm seeing similar behavior on Windows with the https:// protocol.  It
is leaving network connections open for each svn:external done during
an update until the process terminates.  This hangs Windows XP SP3
when you reach 500 svn:externals or so...  This also seems related to
issue 1448 too.

Kevin R.

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2408271

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

RE: svn+ssh children for svn:externals pile up

Posted by Bob Archer <bo...@amsi.com>.
> Hi Subversion Folks,
> 
> I use subversion at work and it works well.  Thanks!  We've recently
> started using svn:externals in a big way and are starting to see "svn
> update" fail because svn spawns an ssh child for each svn:external and
> they "stack up" until the count exhausts the limit of processes that
> macos lets one user fork (266 by default, I think).  I can work around
> the problem by increasing those limits but that's not a long-term
> solution.
> 
> I trolled the svn bug tracker and bug 2580[1] looked relevant.  It
> indicated that there's a bug[2] in openssh's server that combined with
> svn's process handling caused ssh child processes to not exit cleanly.
> Sure enough, our linux server has the ssh bug, so I built svn 1.6.5
> from source and tried it on an Ubuntu 2009.10 server that has a fixed
> ssh server (as verified by the test mentioned in 2580's bug report).
> 
> That didn't work either.  It looks as if svn, even with the fix in
> 2580, spawns one ssh client for each svn:external and those clients
> don't exit - they just stack up until the parent "svn up" is finished:
> 
> /home/tcabot/Downloads/subversion-1.6.5/subversion/svn/.libs/lt-svn up
>  \_ ssh -q -o ControlMaster=no data1.dev svnserve -t
>  \_ ssh -q -o ControlMaster=no data1.dev svnserve -t
>  \_ ssh -q -o ControlMaster=no data1.dev svnserve -t
>  \_ ssh -q -o ControlMaster=no data1.dev svnserve -t
>  \_ ssh -q -o ControlMaster=no data1.dev svnserve -t
>  etc...
> 
> If it helps, this behavior is better than svn versions up through
> 1.6.4 that (at least on the mac) would spawn *two* children per
> svn:external:
> 
> 12579 s000  Z+     0:00.00 (ssh)
> 12580 s000  S+     0:00.07 ssh data1.dev svnserve -t
> 
> Any ideas?  If you can think of any experiments for me to run, I'd be
> happy to do so.

I know this doesn't help your issue, but it is a possible solution. Is there any way you could set up apache and switch to the http protocol? My understanding is this issue is isolated to svn+ssh.

Just trying to think outside of the box.

BOb

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2408256

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].