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

Re: 1.9 JavaHL memory leak in ISVNRemote#status

From: Branko Čibej <brane_at_wandisco.com>
Date: Fri, 24 Apr 2015 06:34:47 +0200

On 22.03.2015 05:06, Branko Čibej wrote:
> On 21.03.2015 16:23, Branko Čibej wrote:
>> On 19.03.2015 11:43, Marc Strapetz wrote:
>>> Attached example performs an endless series of remote status against
>>> the Subversion repository. When invoked with -Xmx24M, the VM will run
>>> out of memory soon. Monitoring with jvisualvm shows that the used heap
>>> size constantly grows. Monitoring with the Task Manager shows that the
>>> allocated memory grows even more (significantly). Looks like a memory
>>> leak, for which a large amount of native memory is involved, too.
>>>
>>> Tested on Windows 8.1 with almost latest Subversion 1.9 JavaHL builds.
>> I can confirm that this happens on the Mac, too, and it's not a garbage
>> collector artefact. I'm trying to trace where the leak is happening ...
>> valgrind with APR pool debugging doesn't tell me much (no surprise there).
> Just to make sure we weren't doing something bad in our libraries, I
> wrote a small C program that does the same as your Java example (Ev2
> shims included), and memory usage is completely steady. So it is
> something in JavaHL, but I have no clue yet what the problem is.

I have to say this was one of the more "interesting" bug-hunts in my not
entirely boring career, and that's not really obvious from the fix
itself. :)

http://svn.apache.org/r1675771

Marc: this will not be in RC1, but please give the patch a spin and let
me know if it fixes your problem. I tested this with the Java program
you attached to your original report, and heap size no longer grows
without bounds.

I'll make sure we port this to 1.9.x in time for GA.

-- Brane
Received on 2015-04-24 06:36:11 CEST

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.