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

scm sync configuration causes memory leak



    • Bug
    • Resolution: Fixed
    • Major
    • None
    • Latest jenkins latest scm-sync-configuration plugin.


      Every week we have to reboot our jenkins server, as it goes out of memory.

      To pinpoint the memory leak, we dumped a memory mapped and examined with the eclipse memory analyzer.

      From this analysis, we found out that the scm sync plugin takes/leaks a log of data in the format of "msg" and "fail" variables attached to a jelly context.

      After running for a week we see 2138 instances of those strings, for which every string takes around 750kilobyte.

      The string itselves, contains the content of scm-sync-configuration.fail.log. Which contains hunderds of lines containing:

      <br/>Thu May 03 21:50:49 CEST 2012 : Synchronize file <path to job>/config.xml

      Which as far as we can see it are not failures but debug output.

      We also find it strange that for every "msg" and every "fail" string has the same content, but the character array is not shared between those strings. So those strings take around 1.1GB of memory.

      We removed the scm-sync log files, as proposed by the string. But within a week this file and the strings will have grown again.
      We do not think that such large string should ever exists in so many copies in memory.




            bpaquet Bertrand Paquet
            steven_aerts Steven Aerts
            2 Vote for this issue
            5 Start watching this issue