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

Memory Leak Using Perl Bindings

From: Brian Buesker <bbuesker_at_qualcomm.com>
Date: 2004-09-23 23:20:12 CEST

I think I've encountered a memory leak while using the perl bindings,
although I have not looked into where the memory leak is occurring yet.
Basically I am doing a large number of URL to URL copies within a Perl
script, as well as doing some ls operations. The small attached test
script reproduces the problem.

The initial repository was imported with the following commands.

$ mkdir import
$ cd import
$ mkdir trunk
$ dd if=/dev/urandom of=trunk/file bs=1024 count=1
1+0 records in
1+0 records out
$ svn import -m 'initial import' http://localhost/svn/test
Adding trunk
Adding (bin) trunk/file

Committed revision 1.

Then I ran the test script, and watched the RSS grow in top. I've
attached the top output. I inserted the line breaks in the top output at
the point where the script switched to doing ls'es instead of copies.

The leak also occurs for ls when just using http URLs. It does not
appear to occur (or is rather small) for a copy using an http URL.

Here is my environment:

OS: CentOS 3.1

SVN Version:
$ svn --version
svn, version 1.1.0 (Release Candidate 2)
   compiled Aug 12 2004, 17:25:15

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.2.3 20030502 (Red Hat Linux 3.2.3-34)
Copyright (C) 2002 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 Version:
$ 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-33.4

Please let me know if you need any more information. Thanks.

Brian

15800 bbuesker 17 0 7540 7540 4068 S 1.2 0.7 0:00 3 test.pl
15800 bbuesker 15 0 8512 8512 4068 S 0.7 0.8 0:00 0 test.pl
15800 bbuesker 15 0 9448 9448 4068 S 0.4 0.9 0:00 0 test.pl
15800 bbuesker 15 0 10384 10M 4068 S 0.5 1.0 0:00 2 test.pl
15800 bbuesker 15 0 11328 11M 4068 S 0.6 1.1 0:00 1 test.pl
15800 bbuesker 15 0 12276 11M 4068 S 0.5 1.1 0:00 0 test.pl
15800 bbuesker 15 0 12796 12M 4068 S 0.3 1.2 0:00 1 test.pl
15800 bbuesker 15 0 13712 13M 4068 S 0.5 1.3 0:01 3 test.pl
15800 bbuesker 15 0 14660 14M 4068 S 0.6 1.4 0:01 1 test.pl
15800 bbuesker 15 0 15608 15M 4068 S 0.7 1.5 0:01 3 test.pl
15800 bbuesker 15 0 16556 16M 4068 S 0.6 1.6 0:01 3 test.pl
15800 bbuesker 15 0 17076 16M 4068 S 0.2 1.6 0:01 3 test.pl
15800 bbuesker 15 0 18028 17M 4068 S 0.6 1.7 0:01 3 test.pl
15800 bbuesker 15 0 18980 18M 4068 S 0.5 1.8 0:01 1 test.pl
15800 bbuesker 15 0 19908 19M 4068 S 0.5 1.9 0:01 2 test.pl
15800 bbuesker 15 0 20840 20M 4068 S 0.7 2.0 0:02 0 test.pl
15800 bbuesker 15 0 21788 21M 4068 S 1.0 2.1 0:02 2 test.pl
15800 bbuesker 15 0 22724 22M 4068 R 0.6 2.2 0:02 0 test.pl
15800 bbuesker 15 0 23256 22M 4068 S 0.4 2.2 0:02 2 test.pl
15800 bbuesker 15 0 24200 23M 4068 S 0.5 2.3 0:02 1 test.pl
15800 bbuesker 15 0 25116 24M 4068 S 0.6 2.4 0:02 3 test.pl
15800 bbuesker 15 0 25620 25M 4068 S 0.3 2.4 0:02 2 test.pl
15800 bbuesker 15 0 26540 25M 4068 S 0.8 2.5 0:03 1 test.pl
15800 bbuesker 15 0 27512 26M 4068 S 0.4 2.6 0:03 1 test.pl
15800 bbuesker 15 0 28444 27M 4068 S 0.6 2.7 0:03 1 test.pl
15800 bbuesker 15 0 29388 28M 4068 S 0.6 2.8 0:03 0 test.pl
15800 bbuesker 15 0 29904 29M 4068 S 0.6 2.9 0:03 1 test.pl
15800 bbuesker 15 0 30856 30M 4068 S 0.7 3.0 0:03 2 test.pl
15800 bbuesker 15 0 31768 31M 4068 S 0.6 3.0 0:03 1 test.pl
15800 bbuesker 15 0 32716 31M 4068 S 0.8 3.1 0:04 3 test.pl
15800 bbuesker 15 0 33232 32M 4068 S 0.5 3.2 0:04 1 test.pl
15800 bbuesker 15 0 34180 33M 4068 S 0.6 3.3 0:04 1 test.pl
15800 bbuesker 15 0 35096 34M 4068 S 0.7 3.4 0:04 1 test.pl
15800 bbuesker 15 0 36040 35M 4068 S 0.8 3.5 0:04 3 test.pl
15800 bbuesker 15 0 36992 36M 4068 S 0.5 3.5 0:04 2 test.pl
15800 bbuesker 15 0 37512 36M 4068 S 0.5 3.6 0:04 0 test.pl
15800 bbuesker 15 0 38420 37M 4068 S 0.7 3.7 0:04 2 test.pl
15800 bbuesker 15 0 39360 38M 4068 S 0.6 3.8 0:05 2 test.pl
15800 bbuesker 15 0 39880 38M 4068 S 0.5 3.8 0:05 0 test.pl
15800 bbuesker 15 0 40828 39M 4068 S 0.6 3.9 0:05 2 test.pl
15800 bbuesker 15 0 41780 40M 4068 S 0.4 4.0 0:05 0 test.pl
15800 bbuesker 15 0 42692 41M 4068 S 0.5 4.1 0:05 2 test.pl
15800 bbuesker 16 0 43640 42M 4068 S 0.5 4.2 0:05 2 test.pl
15800 bbuesker 15 0 44152 43M 4068 S 0.6 4.2 0:05 2 test.pl
15800 bbuesker 15 0 45092 44M 4068 S 0.7 4.3 0:05 0 test.pl
15800 bbuesker 15 0 46020 44M 4068 S 0.5 4.4 0:06 1 test.pl
15800 bbuesker 15 0 46968 45M 4068 S 0.5 4.5 0:06 3 test.pl
15800 bbuesker 15 0 47920 46M 4068 S 0.7 4.6 0:06 0 test.pl
15800 bbuesker 15 0 48868 47M 4068 S 0.7 4.7 0:06 3 test.pl
15800 bbuesker 15 0 49372 48M 4068 S 0.3 4.8 0:06 3 test.pl
15800 bbuesker 15 0 50292 49M 4068 S 0.6 4.8 0:06 0 test.pl
15800 bbuesker 15 0 51244 50M 4068 S 0.7 4.9 0:06 3 test.pl
15800 bbuesker 15 0 51764 50M 4068 S 0.7 5.0 0:07 0 test.pl
15800 bbuesker 15 0 52696 51M 4068 S 1.0 5.1 0:07 0 test.pl
15800 bbuesker 15 0 53620 52M 4068 S 0.6 5.2 0:07 0 test.pl
15800 bbuesker 15 0 54564 53M 4068 S 0.9 5.3 0:07 2 test.pl
15800 bbuesker 16 0 55516 54M 4068 S 0.4 5.3 0:07 0 test.pl
15800 bbuesker 15 0 56032 54M 4068 S 0.3 5.4 0:07 1 test.pl
15800 bbuesker 15 0 56948 55M 4068 S 0.7 5.5 0:07 3 test.pl
15800 bbuesker 15 0 57896 56M 4068 S 0.5 5.6 0:08 2 test.pl
15800 bbuesker 15 0 58844 57M 4068 S 0.6 5.7 0:08 0 test.pl
15800 bbuesker 15 0 59796 58M 4068 S 0.6 5.8 0:08 3 test.pl
15800 bbuesker 15 0 60312 58M 4068 S 0.3 5.8 0:08 1 test.pl
15800 bbuesker 15 0 61224 59M 4068 S 0.9 5.9 0:08 3 test.pl
15800 bbuesker 15 0 62168 60M 4068 S 0.8 6.0 0:08 0 test.pl
15800 bbuesker 15 0 62688 61M 4068 S 0.3 6.0 0:08 2 test.pl
15800 bbuesker 15 0 63624 62M 4068 S 0.4 6.1 0:08 1 test.pl
15800 bbuesker 16 0 64592 63M 4068 S 1.1 6.2 0:09 3 test.pl
15800 bbuesker 15 0 65504 63M 4068 S 0.9 6.3 0:09 3 test.pl
15800 bbuesker 15 0 66448 64M 4068 S 0.4 6.4 0:09 3 test.pl
15800 bbuesker 15 0 66968 65M 4068 S 0.3 6.5 0:09 3 test.pl
15800 bbuesker 15 0 67884 66M 4068 S 0.5 6.6 0:09 2 test.pl
15800 bbuesker 15 0 68832 67M 4068 S 0.7 6.6 0:09 3 test.pl
15800 bbuesker 15 0 69776 68M 4068 S 0.7 6.7 0:09 3 test.pl
15800 bbuesker 15 0 70296 68M 4068 S 0.3 6.8 0:10 3 test.pl
15800 bbuesker 15 0 71240 69M 4068 S 0.4 6.9 0:10 1 test.pl
15800 bbuesker 15 0 72156 70M 4068 S 0.5 7.0 0:10 2 test.pl
15800 bbuesker 15 0 73108 71M 4068 S 0.4 7.1 0:10 3 test.pl
15800 bbuesker 15 0 74056 72M 4068 S 0.5 7.2 0:10 2 test.pl
15800 bbuesker 15 0 75000 73M 4068 S 0.6 7.2 0:10 2 test.pl
15800 bbuesker 15 0 75948 74M 4068 S 0.3 7.3 0:10 0 test.pl
15800 bbuesker 15 0 76468 74M 4068 S 0.5 7.4 0:10 2 test.pl
15800 bbuesker 15 0 77380 75M 4068 S 0.6 7.5 0:10 0 test.pl
15800 bbuesker 15 0 78328 76M 4068 S 0.6 7.6 0:11 1 test.pl
15800 bbuesker 15 0 79272 77M 4068 S 0.6 7.7 0:11 2 test.pl
15800 bbuesker 15 0 79796 77M 4068 S 0.5 7.7 0:11 2 test.pl
15800 bbuesker 15 0 80708 78M 4068 S 0.7 7.8 0:11 1 test.pl
15800 bbuesker 15 0 81184 79M 4068 S 0.2 7.8 0:11 3 test.pl
15800 bbuesker 15 0 82156 80M 4068 S 0.6 7.9 0:11 3 test.pl
15800 bbuesker 15 0 83104 81M 4068 S 0.7 8.0 0:11 0 test.pl
15800 bbuesker 15 0 84036 82M 4068 S 0.9 8.1 0:11 0 test.pl
15800 bbuesker 16 0 84980 82M 4068 S 0.7 8.2 0:12 1 test.pl
15800 bbuesker 16 0 85500 83M 4068 S 0.3 8.3 0:12 0 test.pl
15800 bbuesker 15 0 86412 84M 4068 S 0.7 8.4 0:12 3 test.pl
15800 bbuesker 15 0 87360 85M 4068 S 0.4 8.4 0:12 3 test.pl
15800 bbuesker 15 0 88308 86M 4068 S 0.9 8.5 0:12 2 test.pl
15800 bbuesker 15 0 88828 86M 4068 S 0.3 8.6 0:12 0 test.pl
15800 bbuesker 15 0 89740 87M 4068 S 0.8 8.7 0:12 1 test.pl
15800 bbuesker 16 0 90680 88M 4068 R 0.8 8.8 0:13 3 test.pl
15800 bbuesker 15 0 91636 89M 4068 S 0.7 8.9 0:13 2 test.pl
15800 bbuesker 15 0 92584 90M 4068 S 0.7 9.0 0:13 1 test.pl
15800 bbuesker 15 0 93068 90M 4068 S 0.5 9.0 0:13 0 test.pl
15800 bbuesker 15 0 94016 91M 4068 S 0.5 9.1 0:13 1 test.pl
15800 bbuesker 15 0 94964 92M 4068 S 1.0 9.2 0:13 3 test.pl
15800 bbuesker 15 0 95904 93M 4068 S 0.9 9.3 0:14 1 test.pl
15800 bbuesker 15 0 96424 94M 4068 S 0.5 9.3 0:14 2 test.pl
15800 bbuesker 15 0 97360 95M 4068 R 0.6 9.4 0:14 0 test.pl
15800 bbuesker 15 0 98284 95M 4068 S 0.8 9.5 0:14 2 test.pl
15800 bbuesker 15 0 98796 96M 4068 S 0.2 9.6 0:14 2 test.pl
15800 bbuesker 15 0 99712 97M 4068 S 0.6 9.6 0:14 2 test.pl
15800 bbuesker 15 0 98.3M 98M 4068 S 0.6 9.7 0:14 1 test.pl
15800 bbuesker 15 0 98.8M 98M 4068 S 0.3 9.8 0:14 3 test.pl
15800 bbuesker 15 0 99.2M 99M 4068 S 0.3 9.8 0:14 3 test.pl

15800 bbuesker 16 0 101M 101M 4100 S 2.5 10.1 0:15 3 test.pl
15800 bbuesker 15 0 104M 104M 4100 S 3.4 10.3 0:15 3 test.pl
15800 bbuesker 15 0 106M 106M 4100 S 4.0 10.6 0:15 3 test.pl
15800 bbuesker 15 0 109M 109M 4100 S 3.6 10.8 0:16 2 test.pl
15800 bbuesker 16 0 114M 114M 4100 R 3.9 11.4 0:16 1 test.pl
15800 bbuesker 15 0 120M 120M 4100 R 4.0 12.0 0:17 1 test.pl
15800 bbuesker 16 0 126M 126M 4100 S 3.8 12.6 0:18 2 test.pl
15800 bbuesker 15 0 132M 132M 4100 S 3.6 13.1 0:19 0 test.pl
15800 bbuesker 15 0 137M 137M 4100 R 3.0 13.7 0:19 3 test.pl
15800 bbuesker 15 0 143M 143M 4100 S 3.3 14.3 0:20 2 test.pl
15800 bbuesker 16 0 150M 150M 4100 S 3.7 14.9 0:21 0 test.pl
15800 bbuesker 15 0 154M 154M 4100 S 3.0 15.4 0:21 3 test.pl
15800 bbuesker 15 0 161M 161M 4100 S 3.9 16.0 0:22 0 test.pl
15800 bbuesker 15 0 167M 167M 4100 S 3.5 16.6 0:23 0 test.pl
15800 bbuesker 16 0 173M 173M 4100 S 3.8 17.2 0:24 2 test.pl
15800 bbuesker 16 0 178M 178M 4100 S 2.8 17.7 0:24 0 test.pl
15800 bbuesker 16 0 184M 184M 4100 S 4.0 18.3 0:25 0 test.pl
15800 bbuesker 16 0 190M 190M 4100 S 3.1 18.9 0:26 2 test.pl
15800 bbuesker 16 0 196M 196M 4100 S 3.5 19.5 0:26 3 test.pl
15800 bbuesker 15 0 201M 201M 4100 S 3.8 20.1 0:27 2 test.pl
15800 bbuesker 15 0 207M 207M 4100 S 3.3 20.6 0:28 0 test.pl
15800 bbuesker 16 0 213M 213M 4100 S 3.3 21.2 0:29 3 test.pl
15800 bbuesker 16 0 219M 219M 4100 S 3.8 21.8 0:29 0 test.pl
15800 bbuesker 15 0 224M 224M 4100 S 3.0 22.3 0:30 3 test.pl
15800 bbuesker 15 0 230M 230M 4100 S 3.7 22.9 0:31 1 test.pl
15800 bbuesker 15 0 236M 236M 4100 S 3.2 23.5 0:31 1 test.pl
15800 bbuesker 15 0 242M 242M 4100 S 3.3 24.1 0:32 3 test.pl
15800 bbuesker 16 0 248M 248M 4100 S 3.3 24.7 0:33 2 test.pl
15800 bbuesker 15 0 254M 254M 4100 R 3.3 25.2 0:33 0 test.pl
15800 bbuesker 15 0 259M 259M 4100 S 3.3 25.8 0:34 3 test.pl
15800 bbuesker 15 0 264M 264M 4100 S 2.9 26.3 0:35 1 test.pl
15800 bbuesker 15 0 270M 270M 4100 S 3.6 26.9 0:35 3 test.pl
15800 bbuesker 16 0 276M 276M 4100 S 3.5 27.5 0:36 3 test.pl
15800 bbuesker 15 0 282M 282M 4100 S 2.8 28.1 0:37 1 test.pl
15800 bbuesker 15 0 288M 288M 4100 S 3.0 28.6 0:37 2 test.pl
15800 bbuesker 15 0 293M 293M 4100 S 2.7 29.2 0:38 3 test.pl
15800 bbuesker 16 0 300M 300M 4100 R 3.6 29.9 0:39 1 test.pl
15800 bbuesker 15 0 306M 306M 4100 S 3.2 30.5 0:39 2 test.pl
15800 bbuesker 15 0 312M 312M 4100 S 3.3 31.1 0:40 1 test.pl
15800 bbuesker 15 0 317M 317M 4100 S 2.9 31.6 0:41 0 test.pl
15800 bbuesker 15 0 323M 323M 4100 S 3.5 32.2 0:41 1 test.pl
15800 bbuesker 15 0 330M 330M 4100 S 4.2 32.8 0:42 2 test.pl
15800 bbuesker 16 0 336M 336M 4100 S 3.5 33.4 0:43 0 test.pl

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Received on Thu Sep 23 23:21:05 2004

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.