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

Memory Leak in Windows Slave by JnlpSlaveRestarterInstaller

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major Major
    • core
    • None
    • Master: Jenkins ver. 1.596.2, Linux CentOs Server
      Slave: Windows 7 Client, slave started via slave.jar from batch-file with -Xmx option of 2g

      Hi there,

      I have a Jenkins Master/Slave Setup with this configuration

      Master: Jenkins ver. 1.596.2, Linux CentOs Server
      Slave: Windows 7 Client, slave started via slave.jar from batch-file with -Xmx option of 2g

      The build job running on the slave is a Visual Studio C# Build using the MSBuild plugin. Some Windows Batch-Files with delete and xcopy commands do cleanup and preparation and deployment tasks such as deleting and moving files on UNC-paths on network shares.
      Additionally, the build calls a batch file that executes automatic tests and reports the results using the XUnit plugin. That's it.

      Regularly (about every other day) the slave process terminates with an out-of-heap-space memory exception.

      Following the Memory-Leak Guide on
      https://wiki.jenkins-ci.org/display/JENKINS/I'm+getting+OutOfMemoryError
      I enabled the automatic heap-dump and analyzed the dump with jProfiler.
      Here are the results:

      See attached Screenshots, resp. the html pages attached:

      The "hudson.remoting.Engine" takes about 1.5GB memory containing about 4k Objects with a size of 1-3.5MB.

      On the second screenshot you see that the Objects are "jenkins.slave.restarter.JnlpSlaveRestarterInstaller" Objects with a Size of up to 3.5MB, which might be ok.

      The puzzling issue is that there are thousands of these objects in memory. So my first wild guess is that there are more and more of these objects created/started while they are not correctly cleaned up. Bug in the slave implementation?

      Cheers,
      Hauke

            Unassigned Unassigned
            hauke Hauke Fuhrmann
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: