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

Re: [PATCH] Prevent Win32 tunnels from leaving orphan server processes on remote

From: Gavin Baumanis <gavinb_at_thespidernet.com>
Date: Fri, 6 Nov 2009 08:52:19 +1100

Ping. This submission has received no comments.

Gavin

On 22/10/2009, at 02:33 , Bob Denny wrote:

> See
> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2407949
>
> [[[
> Specific fix for issue #2580 on Win32: Don't do instant kill on tunnel
>
> * subversion/libsvn_ra_svn/client.c
> (make_tunnel): Let tunnel exit normally
> ]]]
>
> I hope this can make it into 1.7.
>
> ------------------------------------------------------
> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2409838---
> subversion-1.6.6rc\subversion\libsvn_ra_svn\client.c Thu Oct 15
> 21:50:48 2009 UTC
> +++ svn-work\subversion\libsvn_ra_svn\client.c Wed Oct 21 15:10:41
> 2009 UTC
> @@ -488,8 +488,24 @@
> * See also the long dicussion in issue #2580 if you really
> * want to know various reasons for these problems and
> * the different opinions on this issue.
> + *
> + * On Win32, APR does not support KILL_ONLY_ONCE. It only has
> + * KILL_ALWAYS and KILL_NEVER. Other modes are converted to
> + * KILL_ALWAYS, which immediately calls TerminateProcess().
> + * This instantly kills the tunnel, leaving sshd and svnserve
> + * on a remote machine running indefinitely. These processes
> + * accumulate. The problem is most often seen with a fast client
> + * machine and a modest internet connection, as the tunnel
> + * is killed before being able to gracefully complete the
> + * session. In that case, svn is unusable 100% of the time on
> + * the windows machine. Thus, on Win32, we use KILL_NEVER and
> + * take the lesser of two evils.
> */
> +#ifdef WIN32
> + apr_pool_note_subprocess(pool, proc, APR_KILL_NEVER);
> +#else
> apr_pool_note_subprocess(pool, proc, APR_KILL_ONLY_ONCE);
> +#endif
>
> /* APR pipe objects inherit by default. But we don't want the
> * tunnel agent's pipes held open by future child processes

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2414931
Received on 2009-11-05 22:52:45 CET

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.