Hi, For information, there is also a PR opened for 10 months about resource leaks in core: https://github.com/jenkinsci/jenkins/pull/737
Some streams are not closed and others not closed in case of exception. Emeric Le vendredi 3 janvier 2014 19:33:08 UTC+1, slide a écrit : > > There is also this possibility: > > https://issues.apache.org/jira/browse/HBASE-4965 > > slide > > > On Fri, Jan 3, 2014 at 8:48 AM, Mark Waite <[email protected]<javascript:> > > wrote: > >> Thanks. I have a series of changes I am preparing to resolve the leaks in >> the git plugin. I am looking for more general purpose automated detection >> of it is available. >> >> Mark Waite >> On Jan 3, 2014 6:11 AM, "Dominik Bartholdi" <[email protected]<javascript:>> >> wrote: >> >>> Hi Mark, >>> I had exactly the same issues when I was implementing the jgit provider >>> for maven - we even raised an issue against jgit ( >>> https://bugs.eclipse.org/bugs/show_bug.cgi?id=420502), but it came down >>> to the fact, that I have not closed the jgit repo after usage. >>> The commit where i fixed the issue on the maven-scm-provider-jgit is >>> this one: >>> https://github.com/apache/maven-scm/commit/0760079f1e6accc86a6cb308ffa4fa9c9351832a >>> Unfortunately all or test where ok when they where running on an *nix >>> systems - only windows gave us headaches. >>> /Domi >>> >>> On 02.01.2014, at 21:33, Mark Waite <[email protected] <javascript:>> >>> wrote: >>> >>> Is there any way to easily include assertions in plugin unit test >>> setUp() and tearDown() that no open file leaks have happened during that >>> test? >>> >>> There are several bug reports against the Git plugin related to files >>> opened which are not closed. Files opened by a process prevent the >>> deletion of that file on Microsoft Windows file systems. >>> >>> I believe the same type of problem is now also affecting the Jenkins >>> core. I executed the Jenkins tests on a Windows machine and several of the >>> tests failed with messages which seemed to indicate the same type of file >>> closing challenges as exist for the Git plugin. >>> >>> I assume those same types of issues exist in other plugins as well. >>> >>> There is a leak detector plugin available from the Update Center which >>> is very helpful on Linux. I've used it to confirm that some of the Git >>> plugin open file leaks are from the JGit implementation, and have also used >>> it to identify open file leaks in the Git plugin source code. >>> >>> The Git plugin has a form of that detection incorporated, but it depends >>> on the test using temporary file allocation and then it detects the failure >>> to cleanup those temporary files on exit. >>> >>> Some of the Git plugin bug reports related to open file leaks are: >>> >>> https://issues.jenkins-ci.org/browse/JENKINS-19994 - cannot delete >>> workspace >>> https://issues.jenkins-ci.org/browse/JENKINS-18843 - pack file busy >>> from JGit (newer) >>> https://issues.jenkins-ci.org/browse/JENKINS-15103 - pack file busy >>> (older bug) >>> https://issues.jenkins-ci.org/browse/JENKINS-20585 - changelog busy >>> >>> I'm sure I can find similar issues in many other plugins and in Jenkins >>> core if I search >>> >>> The best solution I've found thus far has been interactive testing with >>> the leak detector plugin enabled on Linux to detect open file leaks. >>> >>> Thanks, >>> Mark Waite >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "Jenkins Developers" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to [email protected] <javascript:>. >>> For more options, visit https://groups.google.com/groups/opt_out. >>> >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "Jenkins Developers" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to [email protected] <javascript:>. >>> For more options, visit https://groups.google.com/groups/opt_out. >>> >> -- >> You received this message because you are subscribed to the Google Groups >> "Jenkins Developers" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] <javascript:>. >> For more options, visit https://groups.google.com/groups/opt_out. >> > > > > -- > Website: http://earl-of-code.com > -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
