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

Suspected Memory Leak for merge

From: Brian Buesker <bbuesker_at_qualcomm.com>
Date: 2005-07-13 07:20:40 CEST

I have a script that uses the SVN perl bindings to do many (typically
small) merges. Looking at the memory for the script in top shows the
memory usage growing significantly. I created a simple perl script that
just does the merges and nothing else, and captured the top output to a
file. The script basically does something like this:

my $client = new SVN::Client( auth => [SVN::Client::get_simple_provider(),
                      SVN::Client::get_username_provider(),
                      SVN::Client::get_ssl_server_trust_file_provider()]);

$client->checkout (...);

for my $i ( 1 .. $n ) {
   $client->merge (...);
}

Attached is the output of top for approximately 25 merges. In this log,
the merges begin somewhere around the 20m mark. I wouldn't expect the
memory usage to grow that quickly when doing merges. We have seen much
worse growth than this where the RES value grows above 1 GB.

Unfortunately I can't make our repository available for testing, and I
haven't come up with an easy way to write a test script that will prep a
repository with enough things that can be merged in order to reproduce
this error. However, I am certainly willing to try any potential patches
to see if the leak is fixed.

Currently I have only tested this with 1.1.4, although I have not seen
anything in the changelogs for 1.2.x that would indicate something like
this has been fixed.

The entire details of my environment are as follows:

OS: Fedora Core 3

SVN Version:
% svn --version
svn, version 1.1.4 (r13838)
 compiled Apr 5 2005, 15:49:54

Copyright (C) 2000-2004 CollabNet.
Subversion is open source software, see http://subversion.tigris.org/
This product includes software developed by CollabNet
(http://www.Collab.Net/).

The following repository access (RA) modules are available:

* ra_dav : Module for accessing a repository via WebDAV (DeltaV) protocol.
- handles 'http' schema
- handles 'https' schema
* ra_local : Module for accessing a repository on local disk.
- handles 'file' schema
* ra_svn : Module for accessing a repository using the svn network
protocol.
- handles 'svn' schema

Compiler:
$ gcc --version
gcc (GCC) 3.4.2 20041017 (Red Hat 3.4.2-6.fc3)
Copyright (C) 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Perl:
$ perl -v

This is perl, v5.8.5 built for i386-linux-thread-multi

Copyright 1987-2004, Larry Wall

Perl may be copied only under the terms of either the Artistic License
or the
GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using `man perl' or `perldoc perl'. If you have access to the
Internet, point your browser at http://www.perl.com/, the Perl Home Page.

Berkeley DB Version: 4.2.52

OpenSSL Version:
$ rpm -q openssl
openssl-0.9.7a-40

Please let me know if you need any more information.

Thanks,
Brian

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Wed Jul 13 07:22:11 2005

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