svn-3397

Version:

1.6.15

Bug Link:

http://subversion.tigris.org/issues/show_bug.cgi?id=3397

http://svn.haxx.se/dev/archive-2010-11/0102.shtml

Patch Link:

source code patch: http://svn.apache.org/viewvc?diff_format=h&view=revision&revision=1032808

Symptom:

‘svn blame -g’ causes svnserve to quickly climb to 2Gb of memory usage and doesn’t come back to normal.

The server side doesn’t have error message.

The client side can have the following log message:

svn: Can't connect to host 'svn': No connection could be made

    because the target machine actively refused it.

How it is diagnosed:

discussion / dump

The peak working set memory of

    'svn blame ^/trunk/subversion/tests/cmdline/merge_tests.py' was 21 MB

    'svn blame ^/trunk/subversion/tests/cmdline/merge_tests.py -g' was 574 MB

 

Root Cause:

Brief:

The memory pool in subversion keep doing allocation, but doesn’t free them.

Detail:

Implement result/scratch two-pool paradigm. Don’t needlessly allocate memory. Previously, ‘path_revision’ structure was allocated in the beginning and keeps growing. Instead, Right after processing, we allocate and store the appropriate information to it.

 

Failure symptom category

resource leak

Is there any log message?

No (The server side is where the error happens and it does not give error message)

Can ErrLog insert a log message?

Yes, log the error return value (checked)