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

Set-up script failures lead to a memory leak

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Critical Critical
    • slave-setup-plugin
    • None

      We have been seeing our Jenkins instance slowly increase in memory usage and not decrease to the point where it grinds to a halt and can't process any requests. The only way to recover is to restart the server. It has been noticed that agents going offline and then their setup script failing makes the problem a lot worse a lot quicker.

      I have reproduced the issue on a clean install of Jenkins by installing the plugin, creating 20 new agents, and setting the set-up script to the following:

      #!cmd.exe /c "exit /b -1"

      I took a heap dump just after start-up and then another after half an hour of it doing nothing but have 20 agents repeatedly connect and fail setup. Comparing the two showed almost half a million StackTraceElement objects, most of which were being help by Channel objects that couldn't be GCed (of which there were over 3000). If left long enough, the server will stop processing connections and stop responding to anything.

            peppe Giuseppe Landolfi
            nridgway Nick Ridgway
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: