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

Removing a template from the EC2 plugin while a job is still building causes a file leak

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • ec2-plugin
    • None

      Issue: When a job is running on a template from EC2 and then you go and change or delete that template it causes a file leak of files `($INSTANCE_ID)/slave.log.*` which are the traditional log files open for agents but they are not cleaned up ever afterwards and as the agent is running it opens more and more of these file handles until eventually the whole instance crashes or the build is done (the files are not released at that point but they do not continue to increase)

      Steps to reproduce:
      1. Create a EC2 cloud
      2. Create a template within that cloud
      3. Create a job which takes a long period of time and uses that template
      4. Run that job
      5. Delete the template
      6. Observe the file handles continue to increase and you can find many file handles of the format above

      What I would normally expect:
      I think the file handles being opened is OK but they should not continue to re-open. Also they should be cleaned up when the job is done and the agent goes away

      I have not been able to reproduce locally with the code using hpi:run as of yet so I am not sure what is causing the leak

          [JENKINS-61669] Removing a template from the EC2 plugin while a job is still building causes a file leak

          raihaan out of curiosity, have you seen this issue reproduced in any other way after https://github.com/jenkinsci/ec2-plugin/pull/429 fixed the NPE situation?

          Evaristo Gutierrez added a comment - raihaan out of curiosity, have you seen this issue reproduced in any other way after https://github.com/jenkinsci/ec2-plugin/pull /429 fixed the NPE situation?

          No, i haven't been able to reproduce this consistently

          Raihaan Shouhell added a comment - No, i haven't been able to reproduce this consistently

            thoulen FABRIZIO MANFREDI
            ataylor Alex Taylor
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: