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

Extraordinary memory use associated with svn plugin

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: subversion-plugin
    • Labels:
      None
    • Environment:
      Windows Server 2008 R2 , x86/32 (1 cores)
      Java(TM) SE Runtime Environment, 1.6.0_26-b03
    • Similar Issues:

      Description

      Our Jenkins master handles just under 300 jobs with about half using SCM (subversion) polling. After a major branching event, we updated to version 1.481 of Jenkins and 1.42 of the subversion plugin. We saw extremely high memory usage shortly after startup with noticeably degraded performance. Analyzing a heap dump with eclipse mat, we got the following summary:

      One instance of "java.util.TaskQueue" loaded by "<system class loader>" occupies 792,697,824 (73.68%) bytes. The instance is referenced by org.tmatesoft.svn.core.wc.DefaultSVNRepositoryPool @ 0x3267810 , loaded by "java.net.URLClassLoader @ 0x1ce7c938". The memory is accumulated in one instance of "java.util.TimerTask[]" loaded by "<system class loader>".

      After rolling back our subversion plugin to 1.39, with no other changes to our configuration, memory usage settled back into a much more nominal (for us) range.

        Attachments

          Issue Links

            Activity

            Hide
            seder Stefan Prietl added a comment - - edited

            Same problem here with Jenkins version 1.492 (except we do not experience performance issues right now). I compared two heap dumps. One taken yesterday and one from today and the total retained size of the "java.util.TaskQueue" instance grew from ~900MB to ~1.3GB (second value is more than 50% of overall heap).

            I also compared those recent dumps with some older ones from a Jenkins with version 1.471. There were just 1 or 2 instances of DefaultSVNRepositoryPool held by TaskQueue compared to the >36000 instances in the newer snapshots.

            In both versions we used Subversion plugin 1.43. We recently upgraded Jenkins and some plugins (including http://wiki.jenkins-ci.org/display/JENKINS/SCM+Sync+configuration+plugin). So this probably could be a problem of this plugin too. But since I haven't had time to analyze it further, this is just speculation.

            Show
            seder Stefan Prietl added a comment - - edited Same problem here with Jenkins version 1.492 (except we do not experience performance issues right now). I compared two heap dumps. One taken yesterday and one from today and the total retained size of the "java.util.TaskQueue" instance grew from ~900MB to ~1.3GB (second value is more than 50% of overall heap). I also compared those recent dumps with some older ones from a Jenkins with version 1.471. There were just 1 or 2 instances of DefaultSVNRepositoryPool held by TaskQueue compared to the >36000 instances in the newer snapshots. In both versions we used Subversion plugin 1.43. We recently upgraded Jenkins and some plugins (including http://wiki.jenkins-ci.org/display/JENKINS/SCM+Sync+configuration+plugin ). So this probably could be a problem of this plugin too. But since I haven't had time to analyze it further, this is just speculation.
            Hide
            sakasun Marcos Sakamoto added a comment - - edited

            We have experienced the same issue on Ubuntu 14.04.2 LTS using Jenkins 1.619 and Subversion plugin 2.5.
            A memory dump shows the following summary:
            One instance of "java.util.concurrent.ScheduledThreadPoolExecutor" loaded by "<system class loader>" occupies 4,715,966,536 (98.54%) bytes. The instance is referenced by org.tmatesoft.svn.core.wc.DefaultSVNRepositoryPool @ 0x6013aabe8 , loaded by "hudson.ClassicPluginStrategy$AntClassLoader2 @ 0x600542808". The memory is accumulated in one instance of "java.util.concurrent.RunnableScheduledFuture[]" loaded by "<system class loader>"

            We have about 250 jobs configured with SVN polling. Some of them uses the "List Subversion Tags" parameterized trigger plugin.

            Show
            sakasun Marcos Sakamoto added a comment - - edited We have experienced the same issue on Ubuntu 14.04.2 LTS using Jenkins 1.619 and Subversion plugin 2.5. A memory dump shows the following summary: One instance of "java.util.concurrent.ScheduledThreadPoolExecutor" loaded by "<system class loader>" occupies 4,715,966,536 (98.54%) bytes. The instance is referenced by org.tmatesoft.svn.core.wc.DefaultSVNRepositoryPool @ 0x6013aabe8 , loaded by "hudson.ClassicPluginStrategy$AntClassLoader2 @ 0x600542808". The memory is accumulated in one instance of "java.util.concurrent.RunnableScheduledFuture[]" loaded by "<system class loader>" We have about 250 jobs configured with SVN polling. Some of them uses the "List Subversion Tags" parameterized trigger plugin.
            Hide
            hein Hein Couwet added a comment -

            We were having the same issue.
            I've fixed this locally and submitted the fix to svnkit : https://issues.tmatesoft.com/issue/SVNKIT-670

            Show
            hein Hein Couwet added a comment - We were having the same issue. I've fixed this locally and submitted the fix to svnkit : https://issues.tmatesoft.com/issue/SVNKIT-670
            Hide
            estyrke Emil Styrke added a comment -

            This affects us too. Apparently, there is a pull request available at https://github.com/jenkinsci/subversion-plugin/pull/166, and I have confirmed that this fixes the issue for us.

            Show
            estyrke Emil Styrke added a comment - This affects us too. Apparently, there is a pull request available at https://github.com/jenkinsci/subversion-plugin/pull/166 , and I have confirmed that this fixes the issue for us.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Wouter Born
            Path:
            src/main/java/hudson/scm/listtagsparameter/ListSubversionTagsParameterDefinition.java
            http://jenkins-ci.org/commit/subversion-plugin/126225805b03d63e3b9c7780bc2d052315eaf531
            Log:
            Fix memory leak (JENKINS-15376)

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Wouter Born Path: src/main/java/hudson/scm/listtagsparameter/ListSubversionTagsParameterDefinition.java http://jenkins-ci.org/commit/subversion-plugin/126225805b03d63e3b9c7780bc2d052315eaf531 Log: Fix memory leak ( JENKINS-15376 )
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Oleg Nenashev
            Path:
            src/main/java/hudson/scm/listtagsparameter/ListSubversionTagsParameterDefinition.java
            http://jenkins-ci.org/commit/subversion-plugin/e4a043392c0f428aa70de49dbbec6cdbda964880
            Log:
            Merge pull request #196 from wborn/JENKINS-15376-fix

            Fix memory leak (JENKINS-15376)

            Compare: https://github.com/jenkinsci/subversion-plugin/compare/cccaf241a4ce...e4a043392c0f

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: src/main/java/hudson/scm/listtagsparameter/ListSubversionTagsParameterDefinition.java http://jenkins-ci.org/commit/subversion-plugin/e4a043392c0f428aa70de49dbbec6cdbda964880 Log: Merge pull request #196 from wborn/ JENKINS-15376 -fix Fix memory leak ( JENKINS-15376 ) Compare: https://github.com/jenkinsci/subversion-plugin/compare/cccaf241a4ce...e4a043392c0f
            Hide
            oleg_nenashev Oleg Nenashev added a comment -

            It has been released in Subversion Plugin 2.10

            Show
            oleg_nenashev Oleg Nenashev added a comment - It has been released in Subversion Plugin 2.10

              People

              • Assignee:
                Unassigned
                Reporter:
                dsopscak Skip Sopscak
              • Votes:
                2 Vote for this issue
                Watchers:
                8 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: