|
Mantis - SVNKit
|
|
Viewing Issue Advanced Details |
|
|
ID:
|
Category:
|
Severity:
|
Reproducibility:
|
Date Submitted:
|
Last Update:
|
|
221 |
bug |
major |
always |
2008-02-27 01:58 |
2008-03-03 19:32 |
|
|
Reporter:
|
lubosp |
Platform:
|
|
|
|
Assigned To:
|
oka |
OS:
|
|
|
|
Priority:
|
normal |
OS Version:
|
|
|
|
Status:
|
resolved |
Product Version:
|
1.1.5 |
|
|
Product Build:
|
|
Resolution:
|
no change required |
|
|
Projection:
|
none |
|
|
|
|
ETA:
|
none |
Fixed in Version:
|
1.1.x |
|
|
planned for version:
|
1.2.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.
|
|
Steps To Reproduce:
|
|
|
Additional Information:
|
|
| Relationships | |
|
Attached Files:
|
svnkit_memory_leak.zip [^] (14,897 bytes) 2008-02-27 01:58 |
|
|
Issue History |
|
Date Modified |
Username |
Field |
Change |
|
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 |
|
Notes |
|
|
(0000406)
|
|
oka
|
|
2008-02-27 21:26
|
|
Hello,
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. |
|
|
|
(0000407)
|
|
oka
|
|
2008-02-27 21:33
|
|
|
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. |
|
|
|
(0000409)
|
|
lubosp
|
|
2008-02-27 22:26
|
|
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 |
|
|
|
(0000415)
|
|
lubosp
|
|
2008-02-28 21:54
|
|
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! |
|