[JIRA] [core] (JENKINS-33358) Groovy and PermGen memory leak
Title: Message Title Christian Lague updated an issue Jenkins / JENKINS-33358 Groovy and PermGen memory leak Change By: Christian Lague Issue Type: Story Bug Add Comment This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] [core] (JENKINS-33358) Groovy and PermGen memory leak
Title: Message Title Christian Lague updated an issue Jenkins / JENKINS-33358 Groovy and PermGen memory leak Change By: Christian Lague Component/s: core Component/s: global-post-script-plugin Add Comment This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] [core] (JENKINS-33358) Groovy and PermGen memory leak
Title: Message Title Christian Lague assigned an issue to Jesse Glick Jenkins / JENKINS-33358 Groovy and PermGen memory leak Change By: Christian Lague Assignee: Hao CHEN Jesse Glick Add Comment This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] [core] (JENKINS-33358) Groovy and PermGen memory leak
Title: Message Title Christian Lague updated an issue Jenkins / JENKINS-33358 Groovy and PermGen memory leak Change By: Christian Lague We got the problem from the operation team who observe have recently experienced OutOfMemory errors on some large Jenkins instances that the perm gen size has been increased by monitoring plugin predominantly have frequently executed jobs that contain either System Groovy scripts or Build Flow project types . This is quite important for us because more and more In one case after disabling a groovy based steps are integrated into our CI procedure.After analysis, we simplify script that was being executed via the testing environment with 10 jobs and Global Post Script Plugin . after every build, the PermGen profile improved as shown: We test further with GroovyShell to run a groovy script, not depending on Jenkins. Java7: java.lang.OutOfMemoryError: PermGen spaceJava8: java.lang.OutOfMemoryError: Java heap spaceThe tests use 2.4.6 version of groovy which is the latest version. However, the issue is still there.org.codehaus.groovygroovy-all2.4.6---Configure 10 jobs which build per minuteEach build triggers a groovy script by Global Post Script Plugin.{noformat}class Main {static void main(String... args) {println 'Groovy world!'def p = new Person()p.write()}}class Person {def write(){println 'i am writing ...!'}}{noformat}After sometime, the perm gen is eaten up. See the screenshot of jvisualvm.!Screenshot from 2016-03-07 09.43.29.png|thumbnail!I checked the source code of the plugin:https://github.com/jenkinsci/global-post-script-plugin/blob/master/src/main/java/com/orctom/jenkins/plugin/globalpostscript/ScriptExecutor.javaMy feeling is that it is probably caused by GroovyShell. Jenkins loads and runs groovy extensively and maybe there are places in core or other plugins having similar logic, I wonder1. if this is a potential memory leak, and2. if anyone has met similar issue. Add Comment
[JIRA] [core] (JENKINS-33358) Groovy and PermGen memory leak
Title: Message Title Christian Lague updated an issue Jenkins / JENKINS-33358 Groovy and PermGen memory leak Change By: Christian Lague We have recently experienced OutOfMemory errors on some large Jenkins instances that predominantly have frequently executed jobs that contain either System Groovy scripts or Build Flow project types. In one case after disabling a groovy script that was being executed via the Global Post Script Plugin after every build, the PermGen profile improved as shown: dramatically. We test tested further with GroovyShell to run a groovy script, not depending on Jenkins. Java7: java.lang.OutOfMemoryError: PermGen spaceJava8: java.lang.OutOfMemoryError: Java heap spaceThe tests use 2.4.6 version of groovy which is the latest version. However, the issue is still there.org.codehaus.groovygroovy-all2.4.6---Configure 10 jobs which build per minuteEach build triggers a groovy script by Global Post Script Plugin.{noformat}class Main {static void main(String... args) {println 'Groovy world!'def p = new Person()p.write()}}class Person {def write(){println 'i am writing ...!'}}{noformat}After sometime, the perm gen is eaten up. See the screenshot of jvisualvm.!Screenshot from 2016-03-07 09.43.29.png|thumbnail!I checked the source code of the plugin:https://github.com/jenkinsci/global-post-script-plugin/blob/master/src/main/java/com/orctom/jenkins/plugin/globalpostscript/ScriptExecutor.javaMy feeling is that it is probably caused by GroovyShell. Jenkins loads and runs groovy extensively and maybe there are places in core or other plugins having similar logic, I wonder1. if this is a potential memory leak, and2. if anyone has met similar issue. Add Comment This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265)
[JIRA] [core] (JENKINS-33358) Groovy and PermGen memory leak
Title: Message Title Christian Lague updated an issue Jenkins / JENKINS-33358 Groovy and PermGen memory leak Change By: Christian Lague Attachment: permgenIssue.jpg We have recently experienced OutOfMemory errors on some large Jenkins instances that predominantly have frequently executed jobs that contain either System Groovy scripts or Build Flow project types. In one case after disabling a groovy script that was being executed via the Global Post Script Plugin after every build, the PermGen profile improved dramatically. !permgenIssue.jpg|thumbnail! We tested further with GroovyShell to run a groovy script, not depending on Jenkins. Java7: java.lang.OutOfMemoryError: PermGen spaceJava8: java.lang.OutOfMemoryError: Java heap spaceThe tests use 2.4.6 version of groovy which is the latest version. However, the issue is still there.org.codehaus.groovygroovy-all2.4.6---Configure 10 jobs which build per minuteEach build triggers a groovy script by Global Post Script Plugin.{noformat}class Main {static void main(String... args) {println 'Groovy world!'def p = new Person()p.write()}}class Person {def write(){println 'i am writing ...!'}}{noformat}After sometime, the perm gen is eaten up. See the screenshot of jvisualvm.!Screenshot from 2016-03-07 09.43.29.png|thumbnail!I checked the source code of the plugin:https://github.com/jenkinsci/global-post-script-plugin/blob/master/src/main/java/com/orctom/jenkins/plugin/globalpostscript/ScriptExecutor.javaMy feeling is that it is probably caused by GroovyShell. Jenkins loads and runs groovy extensively and maybe there are places in core or other plugins having similar logic, I wonder1. if this is a potential memory leak, and2. if anyone has met similar issue. Add Comment
[JIRA] [core] (JENKINS-33358) Groovy and PermGen memory leak
Title: Message Title SCM/JIRA link daemon commented on JENKINS-33358 Re: Groovy and PermGen memory leak Code changed in jenkins User: Hao Path: src/main/java/com/orctom/jenkins/plugin/globalpostscript/GlobalPostScript.java src/main/java/com/orctom/jenkins/plugin/globalpostscript/GlobalPostScriptAction.java src/main/java/com/orctom/jenkins/plugin/globalpostscript/GlobalPostScriptPlugin.java src/main/java/com/orctom/jenkins/plugin/globalpostscript/ScriptContentLoader.java src/main/java/com/orctom/jenkins/plugin/globalpostscript/ScriptExecutor.java src/main/java/com/orctom/jenkins/plugin/globalpostscript/URL.java src/main/java/com/orctom/jenkins/plugin/globalpostscript/model/ScriptContent.java src/main/java/com/orctom/jenkins/plugin/globalpostscript/model/URL.java src/main/java/com/orctom/jenkins/plugin/globalpostscript/runner/GroovyScriptRunner.java src/main/java/com/orctom/jenkins/plugin/globalpostscript/runner/ScriptRunner.java src/main/java/com/orctom/jenkins/plugin/globalpostscript/runner/ScriptRunners.java src/main/java/com/orctom/jenkins/plugin/globalpostscript/runner/ShellScriptRunner.java src/test/java/com/orctom/jenkins/plugin/globalpostscript/ScriptTest.java src/test/java/com/orctom/jenkins/plugin/globalpostscript/URLTest.java http://jenkins-ci.org/commit/global-post-script-plugin/d94800cfb31723ed484b4ba98339deb2544be206 Log: JENKINS-33358 use 'parse()' to archive a smaller footprint Add Comment This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] [core] (JENKINS-33358) Groovy and PermGen memory leak
Title: Message Title Hao CHEN assigned an issue to Hongkai Liu Can you try version 1.1.1 of this plugin, I parsed and cached the groovy script, parse() do save a lot of memory, hoping it could solve your issue. Jenkins / JENKINS-33358 Groovy and PermGen memory leak Change By: Hao CHEN Assignee: Jesse Glick Hongkai Liu Add Comment This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] [core] (JENKINS-33358) Groovy and PermGen memory leak
Title: Message Title Hongkai Liu commented on JENKINS-33358 Re: Groovy and PermGen memory leak Thanks for the work. I will update here. Add Comment This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] [core] (JENKINS-33358) Groovy and PermGen memory leak
Title: Message Title Hongkai Liu commented on JENKINS-33358 Re: Groovy and PermGen memory leak Testing right now. I will know more soon. At mean time, I check a bit on the commit. It does a more careful parse. if (sc.isChanged()) { script = shell.parse(sc.getContent()); } I wonder if this would be helpful for the following issue. The groovy is checked out from the src and it is copied to the $ {Jenkins_home} /global-post-script folder. Equivalent question: Is the command like shell.parse(sc.getContent()) for groovy a potential source of mem leak on PERGEN in general? Any hint on this is appreciated. Add Comment This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] [core] (JENKINS-33358) Groovy and PermGen memory leak
Title: Message Title Hongkai Liu edited a comment on JENKINS-33358 Re: Groovy and PermGen memory leak Testing right now.I will know more soon.At mean time, I check a bit on the commit.It does a more careful parse.{noformat}if (sc.isChanged()) {script = shell.parse(sc.getContent()); }{noformat}I wonder if this would be helpful for the following issue.The groovy is checked out from the src and it is copied to the ${ Jenkins_home } /global-post-script folder.Equivalent question:Is the command like shell.parse(sc.getContent()) for groovy a potential source of mem leak on PERGEN in general?Any hint on this is appreciated. Add Comment This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] [core] (JENKINS-33358) Groovy and PermGen memory leak
Title: Message Title Hao CHEN commented on JENKINS-33358 Re: Groovy and PermGen memory leak Yes to both. isChanged() is calculated according to file.lastModified() of the current and previous run. jvisualvm indicates parse() does save a lot of memory, both Heap and Metaspace/PermGen. Add Comment This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] [core] (JENKINS-33358) Groovy and PermGen memory leak
Title: Message Title Hongkai Liu commented on JENKINS-33358 Re: Groovy and PermGen memory leak Thanks for the quick update. If the groovy file is from src, then it could be updated all the time, and so is the lastModified() amd isChanged. In this case, I would assume that the problem comes back. Add Comment This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] [core] (JENKINS-33358) Groovy and PermGen memory leak
Title: Message Title Hao CHEN commented on JENKINS-33358 Re: Groovy and PermGen memory leak Hold on, did you mean you have groovy script specific to each job, and have it copied to the global-post-script folder at the beginning of each run? Then I think you might want to use Groovy Plugin instead. Add Comment This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] [core] (JENKINS-33358) Groovy and PermGen memory leak
Title: Message Title Hongkai Liu commented on JENKINS-33358 Re: Groovy and PermGen memory leak Yes. That is the reason that I feel the leak is for groovy in general (not only for global post), unless Groovy Plugin loads and runs the script differently. Add Comment This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] [core] (JENKINS-33358) Groovy and PermGen memory leak
Title: Message Title Hongkai Liu updated an issue Jenkins / JENKINS-33358 Groovy and PermGen memory leak Change By: Hongkai Liu Attachment: Screenshot from 2016-04-01 11.04.43.png Add Comment This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] [core] (JENKINS-33358) Groovy and PermGen memory leak
Title: Message Title Hongkai Liu commented on JENKINS-33358 Re: Groovy and PermGen memory leak I confirmed that the fix in global post plugin improve the mem issue. The test is done with the previous setting (the groovy script file is UNCHANGED) and run for over 24 hours. See the screenshot. Unable to render embedded object: File (Screenshot from 2016-04-01 11.04.43.png ) not found. However, i still would like to have someone to confirm the groovy mem issue in general: Loading dynamically different groovy scripts leads to PerGen OOM. Add Comment This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] [core] (JENKINS-33358) Groovy and PermGen memory leak
Title: Message Title Hongkai Liu edited a comment on JENKINS-33358 Re: Groovy and PermGen memory leak I confirmed that the fix in global post plugin improve the mem issue.The test is done with the previous setting (the groovy script file is UNCHANGED) and run for over 24 hours. See the screenshot.!Screenshot from 2016-04-01 11.04.43.png | thumbnail!However, i still would like to have someone to confirm the groovy mem issue in general: Loading dynamically different groovy scripts leads to PerGen OOM. Add Comment This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] [core] (JENKINS-33358) Groovy and PermGen memory leak
Title: Message Title Hongkai Liu edited a comment on JENKINS-33358 Re: Groovy and PermGen memory leak I confirmed that the fix in global post plugin improve the mem issue.The test is done with the previous setting (the groovy script file is UNCHANGED) and run for over 24 hours. See the screenshot.!Screenshot from 2016-04-01 11.04.43.png | thumbnail!However, i still would like to have someone to confirm the groovy mem issue in general: Loading dynamically different groovy scripts leads to PerGen OOM. Add Comment This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] [core] (JENKINS-33358) Groovy and PermGen memory leak
Title: Message Title Hongkai Liu edited a comment on JENKINS-33358 Re: Groovy and PermGen memory leak I confirmed that the fix in global post plugin improve the mem issue.The test is done with the previous setting (the groovy script file is UNCHANGED) and run for over 24 hours. See the screenshot.!Screenshot from 2016-04-01 11.04.43.png | thumbnail!However, i still would like to have someone to confirm the groovy mem issue in general: Loading dynamically different groovy scripts leads to PerGen OOM. Add Comment This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] [core] (JENKINS-33358) Groovy and PermGen memory leak
Title: Message Title Hongkai Liu assigned an issue to Hao CHEN Jenkins / JENKINS-33358 Groovy and PermGen memory leak Change By: Hongkai Liu Assignee: Hongkai Liu Hao CHEN Add Comment This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] [core] (JENKINS-33358) Groovy and PermGen memory leak
Title: Message Title Hao CHEN commented on JENKINS-33358 Re: Groovy and PermGen memory leak I'm been trying to figure out if there're memory leaks with groovy, but little progress. I see a lot of posts claiming that there's no memory leaks in Groovy. But I do doubt it has classloader leaks, as I connected to the program with jvisualvm, and after the groovy script executed, I forced a GC and later dumped the memory. I'm still seeing lots of objects of groovy classes. The compiled groovy script, which is loaded by groovy.lang.GroovyClassLoader, is not get GC:ed, even the groovy.lang.GroovyClassLoader is not get GC:ed, so that everything loaded by groovy.lang.GroovyClassLoader will not be able to get GC:ed. I haven't looked into the source code, but I see a lot of issues related to 'leaks'. https://issues.apache.org/jira/browse/GROOVY-7683?jql=project%20%3D%20GROOVY%20AND%20status%20in%20(Open%2C%20%22In%20Progress%22%2C%20Reopened)%20AND%20text%20~%20%22leak%22 Add Comment This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] [core] (JENKINS-33358) Groovy and PermGen memory leak
Title: Message Title Hongkai Liu commented on JENKINS-33358 Re: Groovy and PermGen memory leak Thanks for the update and sharing the concern that I have too. Unless there is a better way to load Groovy script, the memory leak seems unavoidable. Add Comment This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.