Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-46687

Job-DSL Leaks Memory Like A Sieve Thanks To Groovy

XMLWordPrintable

      Exactly what it says on the tin - unfortunately it's a stability problem for more intensive uses.  There was a previous fix done but more recent versions of Groovy from later cores no longer handle classes int he same way and the hacks to purge its memory-leaky ways need to change. 

      Now that we have gotten the "dangit groovy!" bits out of the way, there's an easy fix!  I would suggest incorporating the latest version of the fixes Pipeline is using to work around the issues from here: https://github.com/jenkinsci/workflow-cps-plugin/blob/master/src/main/java/org/jenkinsci/plugins/workflow/cps/CpsFlowExecution.java#L1052

      It should be a pretty much direct copy+paste, thankfully, and the above code is already pretty heavily tested (you can port over the tests too if'n y'like). 

            jamietanna Jamie Tanna
            svanoort Sam Van Oort
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: