|ATTENTION: You are browsing old (readonly) SVNKit Issues Tracker!|
|Please find new one at http://issues.tmatesoft.com/|
|If you have an account here, it should work in the new tracker as well.|
|Anonymous | Login||2015-09-02 01:14 MSK|
|Main | My View | View Issues | Change Log | Roadmap|
|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0000221||SVNKit||bug||public||2008-02-27 01:58||2008-03-03 19:32|
|Status||resolved||Resolution||no change required|
|Target Version||Fixed in Version||1.1.x|
|Summary||0000221: Memory leak in svnkit.jar|
|Description||I am developer of open source continuous integration server Luntbuild. We have implemented SVN Adaptor based in svnkit.jar to log revisions and checkout source code for a project from SVN repository.|
When this SVN adaptor is used, Luntbuild quite quickly (less than 24 hours) runs out of memory (using Tomcat default setting). I have profiled Luntbuild with YourKit Profiler (free for open source projects), and find out that SVN Adaptor causes the problem, attached is a zip file of the reports from the profiler. If you need to you can get source code for SvnAdaptor.java at: http://www.javaforge.com/scmShowFileRevision?proj_id=70&filename=trunk%2Fluntbuild%2Fsrc%2Fcom%2Fluntsys%2Fluntbuild%2Fvcs%2FStarteamAdaptor.java [^]
Luntbuild also supports SVN Adaptor that uses external svn executable instead of svnkit.jar, and when this svn exe adaptor is used, the memory leak goes away.
Let me know if you need more help with resolving this issue.
|Tags||No tags attached.|
|planned for version||1.2.x|
|Attached Files||svnkit_memory_leak.zip [^] (14,897 bytes) 2008-02-27 01:58|
I've looked through SvnAdaptor code and didn't find any call to SVNClientManager dispose. In case more than one SVNAdaptor instance is used during runtime, each will have its own SVNClientManager instance which keeps timer thread (to close pooled connections on timeout).
So, I'd suggest to call SVNClientManager.dispose(). Actually you may call it after each operation in SvnAdaptor and then use the same, "disposed" SVNClientManager instance - it should work properly in this case as well.
|It is interesting that JavaForge uses CodeBeamer that in its turn uses SVNKit - and at some moment they've reported the same problem with SVNKit - CodeBeamer didn't call dispose properly and this caused memory leaks.|
That might be the reason for the memory leak. I did not write the but I look at the code and at svnkit examples and did not see any use of manager.dispose(). Maybe it should be highlighted in documentation and examples.
I am just rebuilding Luntbuild and will run it under profiler for aabout 24 hours and report the results.
Thanks for quick response and for your help! Lubos
I've run Luntbuild for 24 hours with call SVNClientManager.dispose() after each SVN action (log, checkout, etc), and memory leak went away.
I would suggest to highlight the use of dispose() in documentation and in the examples.
Thanks for your help and thanks for great SVN library!
|2008-02-27 01:58||lubosp||New Issue|
|2008-02-27 01:58||lubosp||File Added: svnkit_memory_leak.zip|
|2008-02-27 18:02||oka||Status||new => assigned|
|2008-02-27 18:02||oka||Assigned To||=> oka|
|2008-02-27 21:26||oka||Note Added: 0000406|
|2008-02-27 21:33||oka||Note Added: 0000407|
|2008-02-27 22:26||lubosp||Note Added: 0000409|
|2008-02-28 21:54||lubosp||Note Added: 0000415|
|2008-03-03 19:32||oka||planned for version||=> 1.2.x|
|2008-03-03 19:32||oka||Status||assigned => resolved|
|2008-03-03 19:32||oka||Resolution||open => no change required|
|2008-03-03 19:32||oka||Fixed in Version||=> 1.1.x|
|Copyright © 2000 - 2011 MantisBT Group|