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

Memoryleak in subversion SCM for Hudson

XMLWordPrintable

    • Icon: Patch Patch
    • Resolution: Fixed
    • Icon: Major Major
    • subversion-plugin
    • None
    • Platform: All, OS: All

      When running Hudson for extended periods of time with the SCM polling interval
      set to 1-5 minutes depending on the project being built I've been having some
      problems with OutOfMemoryErrors after running Hudson for about a week or two.
      After looking into the problem using the YourKit Java profiler I've I've noticed
      a fairly consistent leak with regards to the static Timer instance created by
      SVNKit in org.tmatesoft.svn.core.wc.DefaultRepositoryPool. Whenever an instance
      of DefaultRepositoryPool is registered it schedules an instance of the inner
      class TimeoutTask to be run in 10 seconds. This task runs every 10 seconds,
      closing and removing inactive repositories from the pools inactive repositories
      collection.

      Due to the timer thread being a GC root which holds a reference to the pool via
      the TimeoutTasks synthetic reference to the pool instance the tasklist keeps on
      growing forever due to dispose() never being called. After looking at the method
      createSvnClientManager in hudson.scm.SubversionSCM and it seems that dispose()
      is never called on the new instance of SVNClientManager by any of its callers.

            Unassigned Unassigned
            lothor lothor
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: