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

memory leak in Build Pipeline plugin (BuildForm)

      (This issue was likely also reported on Google Code by someone else but never answered.)

      We're suffering from a severe memory leak that seems to be coming from the Build Pipeline plugin, growing with each HTTP request for the build pipeline view.

      Analysis

      We took a heap dump after just one work day of run-time and ran jhat on it. The graph shows memory usage growing almost linearly over the course of a day and the heap analysis shows an unusually high number of instances of the class au.com.centrumsystems.hudson.plugin.buildpipeline.BuildForm.

      Instance Counts for All Classes (excluding platform)
      
      806069 instances of class org.kohsuke.stapler.bind.BoundObjectTable$1 
      800273 instances of class au.com.centrumsystems.hudson.plugin.buildpipeline.BuildForm 
      800273 instances of class au.com.centrumsystems.hudson.plugin.buildpipeline.PipelineBuild 
      51265 instances of class hudson.util.CopyOnWriteList 
      31526 instances of class hudson.util.DescribableList 
      30784 instances of class [Lorg.apache.commons.jexl.parser.Node; 
      24643 instances of class jenkins.model.lazy.BuildReference 
      24228 instances of class net.bull.javamelody.CounterRequest 
      22565 instances of class com.thoughtworks.xstream.core.util.ConcurrentWeakHashMap$HashEntry 
      22565 instances of class com.thoughtworks.xstream.core.util.ConcurrentWeakHashMap$WeakKeyReference 
      18441 instances of class hudson.model.View$PropertyList 
      

      Workaround

      • In issue 143 on Google Code, the reporter also mentioned that they downgraded the plugin to version "1.2.3".
      • We were restarting Jenkins every night, which caused other problems.
      • For now, we're able to free up memory by identifying the session that keeps refreshing the pipeline view and killing that session.

          [JENKINS-16961] memory leak in Build Pipeline plugin (BuildForm)

          Uwe Stuehler created issue -
          Uwe Stuehler made changes -
          Summary Original: memory leak in BuildForm New: memory leak in Build Pipeline plugin (BuildForm)
          Uwe Stuehler made changes -
          Description Original: (This issue was likely also reported on [Google Code|http://code.google.com/p/build-pipeline-plugin/issues/detail?id=143] by someone else but never answered.)

          We're suffering from a severe memory leak that seems to be coming from the Build Pipeline plugin, growing with each HTTP request for the build pipeline view.

          *Analysis*

          !usedMemory.png|thumbnail,align=right!

          We took a heap dump after just one work day of run-time and ran jhat on it. The graph shows memory usage growing almost linearly over the course of a day and the heap analysis shows an unusually high number of instances of the class {{au.com.centrumsystems.hudson.plugin.buildpipeline.BuildForm}}.

          {noformat}
          Instance Counts for All Classes (excluding platform)

          806069 instances of class org.kohsuke.stapler.bind.BoundObjectTable$1
          800273 instances of class au.com.centrumsystems.hudson.plugin.buildpipeline.BuildForm
          800273 instances of class au.com.centrumsystems.hudson.plugin.buildpipeline.PipelineBuild
          51265 instances of class hudson.util.CopyOnWriteList
          31526 instances of class hudson.util.DescribableList
          30784 instances of class [Lorg.apache.commons.jexl.parser.Node;
          24643 instances of class jenkins.model.lazy.BuildReference
          24228 instances of class net.bull.javamelody.CounterRequest
          22565 instances of class com.thoughtworks.xstream.core.util.ConcurrentWeakHashMap$HashEntry
          22565 instances of class com.thoughtworks.xstream.core.util.ConcurrentWeakHashMap$WeakKeyReference
          18441 instances of class hudson.model.View$PropertyList
          {noformat}

          *Workaround*

          We are restarting Jenkins every night, which causes other problems. In [issue 143|http://code.google.com/p/build-pipeline-plugin/issues/detail?id=143] on Google Code, the reporter also mentioned that they downgraded the plugin to version "1.2.3".
          New: (This issue was likely also reported on [Google Code|http://code.google.com/p/build-pipeline-plugin/issues/detail?id=143] by someone else but never answered.)

          We're suffering from a severe memory leak that seems to be coming from the Build Pipeline plugin, growing with each HTTP request for the build pipeline view.

          *Analysis*

          !usedMemory.png|thumbnail,align=right!

          We took a heap dump after just one work day of run-time and ran jhat on it. The graph shows memory usage growing almost linearly over the course of a day and the heap analysis shows an unusually high number of instances of the class {{au.com.centrumsystems.hudson.plugin.buildpipeline.BuildForm}}.

          {noformat}
          Instance Counts for All Classes (excluding platform)

          806069 instances of class org.kohsuke.stapler.bind.BoundObjectTable$1
          800273 instances of class au.com.centrumsystems.hudson.plugin.buildpipeline.BuildForm
          800273 instances of class au.com.centrumsystems.hudson.plugin.buildpipeline.PipelineBuild
          51265 instances of class hudson.util.CopyOnWriteList
          31526 instances of class hudson.util.DescribableList
          30784 instances of class [Lorg.apache.commons.jexl.parser.Node;
          24643 instances of class jenkins.model.lazy.BuildReference
          24228 instances of class net.bull.javamelody.CounterRequest
          22565 instances of class com.thoughtworks.xstream.core.util.ConcurrentWeakHashMap$HashEntry
          22565 instances of class com.thoughtworks.xstream.core.util.ConcurrentWeakHashMap$WeakKeyReference
          18441 instances of class hudson.model.View$PropertyList
          {noformat}

          *Workaround*

          * In [issue 143|http://code.google.com/p/build-pipeline-plugin/issues/detail?id=143] on Google Code, the reporter also mentioned that they downgraded the plugin to version "1.2.3".
          * We were restarting Jenkins every night, which caused other problems.
          * For now, we're able to free up memory by identifying the session that keeps refreshing the pipeline view and killing that session.
          evernat made changes -
          Link New: This issue is related to JENKINS-16341 [ JENKINS-16341 ]
          Uwe Stuehler made changes -
          Labels New: stapler
          Uwe Stuehler made changes -
          Labels Original: stapler New: memory memory-leak performance stapler
          Patrik Boström made changes -
          Link New: This issue duplicates JENKINS-26882 [ JENKINS-26882 ]
          Dan Alvizu made changes -
          Assignee New: Dan Alvizu [ dalvizu ]
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 147791 ] New: JNJira + In-Review [ 177002 ]

            dalvizu Dan Alvizu
            ustuehler Uwe Stuehler
            Votes:
            6 Vote for this issue
            Watchers:
            11 Start watching this issue

              Created:
              Updated: