Details

    • Similar Issues:

      Description

      Following an OOM (of Java heap) on a small (-Xmx512m) Jenkins instance, I've found in the heap dump ~ 760 000 jenkins.branch.MultiBranchProject$BranchIndexing objects (retaining 370 MB according to Eclipse MAT).

      I was first suspecting that branch-scanning was somehow blocked and that these objects were piling up in the queue, but no, it is actually some past successful executions which are never garbage collected.

      The explanation is simple, and it's not in the branch-api-plugin (although it would be possible to work-around the issue there), but in the cloudbees-folder-plugin.

      See there:

      So, FolderComputations can optionally be chained (a computation can have a reference to the previous computation), via a private transient property.  And BranchIndexing, indeed, sets this property.

      What is this property for? It is only used to enable finding the previous Result, which is used for choosing an the icon color:

      There is no accessor for this "previous" property other than this getPreviousResult() method, plus it's transient, so it is easily possible to avoid the infinitely growing linked list, and simply store the previous Result instead, without changing any public API.

      I will submit a PR.

       

       

        Attachments

          Activity

          Show
          tom_gl Thomas de Grenier de Latour added a comment - PR: https://github.com/jenkinsci/cloudbees-folder-plugin/pull/152
          Hide
          tom_gl Thomas de Grenier de Latour added a comment -

          PR is merged (thanks Francisco!), I'll set status to Resolved.

          Show
          tom_gl Thomas de Grenier de Latour added a comment - PR is merged (thanks Francisco!), I'll set status to Resolved.

            People

            • Assignee:
              fcojfernandez Francisco Fernández
              Reporter:
              tom_gl Thomas de Grenier de Latour
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: