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

Re: [PATCH] fix for ssh zombies introduced with r35533

From: James Y Knight <foom_at_fuhm.net>
Date: Sun, 19 Apr 2009 23:52:38 -0400

On Apr 19, 2009, at 10:45 PM, Kyle McKay wrote:

> I cannot duplicate the problem described by James using the released
> version of Subversion 1.6.1 with the patch I attached to issue 2580
> applied:
>
> http://subversion.tigris.org/issues/show_bug.cgi?id=2580

I see the issue both with and without your patch attached to issue
2580 applied, which is to be expected, as your patch does not attempt
to fix anything but the issue of "zombie" processes. These aren't
zombie processes, but real ssh processes sitting around doing nothing
long after the svn process has disappeared.

To reiterate: with svn 1.6 with or without your patch applied, with
ssh connection pooling disabled, this command:
  svn log svn+ssh://hostname/repo|head
causes the ssh process on the client, as well as an ssh and svnserve
on the server to hang around forever, as "real" processes.

Did you try reproducing with svn connection pooling disabled?

> Admittedly both of these tests were run on Mac OS X 10.5.6 (which
> claims to be an Open Brand UNIX 03 Registered Product, conforming to
> the SUSv3 and POSIX 1003.1 specifications for the C API, Shell
> Utilities, and Threads) -- I don't know what system James was using
> and it may behave differently.

I originally tested with a Linux CentOS5 system, which has
  OpenSSH_4.3p2, OpenSSL 0.9.8b 04 May 2006

I've also just run the same test on OSX Leopard 10.5.6, which has
OpenSSH_5.1p1, OpenSSL 0.9.7l 28 Sep 2006.

To attempt to make sure a server-side configuration was not the issue,
I also tried against a number of different servers, including CentOS
5, Debian Lenny, and the OSX Leopard 10.5.6 system (all talking to the
default subversion server coming with each system, not a newly built
1.6) . All exhibited the same behavior. This does not appear to be
system specific, and I would be astounded if this problem did not
occur for everyone.

More details of the test I just ran on OSX:

With a fresh compile of svn 1.6.1 + svn 1.6.1 deps tarballs,
unmodified. I have no ~/.ssh/config file, and /etc/ssh_config is empty
except for comments. Similarly, no ~/.subversion/config.

First I made a test repository:
svnadmin create /tmp/svnthing
for x in {0001..1000}; do svn mkdir file:///tmp/svnthing/$x -m "Making
new directory"; done

Then, in /tmp/subversion-1.6.1, where I just built svn, I run:
   ./subversion/svn/svn log svn+ssh://localhost/tmp/svnthing | head

It prints:
------------------------------------------------------------------------
r1000 | jknight | 2009-04-19 23:40:02 -0400 (Sun, 19 Apr 2009) | 1 line

Making new directory
------------------------------------------------------------------------
r999 | jknight | 2009-04-19 23:40:02 -0400 (Sun, 19 Apr 2009) | 1 line

Making new directory
------------------------------------------------------------------------
r998 | jknight | 2009-04-19 23:40:02 -0400 (Sun, 19 Apr 2009) | 1 line
svn: Write error: Broken pipe

I then end up with a bunch of processes hanging around. As far as I
know, they'll be there forever (1 for the client, 3 for the server).
jknight 75255 0.0 0.1 75736 1020 s003 S 11:43PM 0:00.02
ssh localhost svnserve -t
root 75257 0.0 0.2 79596 1624 ?? S 11:43PM
0:00.05 /usr/sbin/sshd -i
jknight 75260 0.0 0.1 79692 576 ?? S 11:43PM
0:00.00 /usr/sbin/sshd -i
jknight 75261 0.0 0.1 77392 1200 ?? Ss 11:43PM 0:00.02
svnserve -t

James

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

To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-04-20 08:08:58 CEST

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