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

CLI calls are causing file descriptor leaks.

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      I have a job that dynamically creates jobs using the CLI. I have noticed that since installing the job, which verifies the existing of jobs by calling 'get-job', Jenkins is leaking file descriptors. I am currently making around 40 calls per build, which runs on every CVS commit. I have a job setup to monitor the number of FD's in /proc/$jenkins_pid/fd. Calling garbage collection in the JVM doesn't release the FD's and thus the only cure is to restart Jenkins before the number of files reaches the Open file ulimit. I have set my ulimit to 65356 so I don't have to reboot so frequently. I restarted Jenkins at 7:49 this morning and the file descriptor count is currently at 6147 files; it's now 12:10 in the afternoon, so it's been steadily leaking FD's at approximately 1500 per hour.

        Attachments

          Issue Links

            Activity

            Hide
            jayanmn Jayan MN added a comment - - edited

            Is this really fixed?

            I am on  Jenkins ver. 2.32.3.  Tested with script  to run a dummy job --that seems to have leaked handles - one per invocation.

             

             

            JAVA_CMD=java
            CLI_JAR=/jenkins/jenkins-cli.jar
            JOB_NAME=dummyJob
            URL=http://testserver:8080/

             

            for i in {1..1000}
            do
             $JAVA_CMD -jar $CLI_JAR -s $URL build $JOB_NAME 
            done

             

            Show
            jayanmn Jayan MN added a comment - - edited Is this really fixed? I am on  Jenkins ver. 2.32.3.  Tested with script  to run a dummy job --that seems to have leaked handles - one per invocation.     JAVA_CMD=java CLI_JAR=/jenkins/jenkins-cli.jar JOB_NAME=dummyJob URL= http://testserver:8080/   for i in {1..1000 } do  $JAVA_CMD -jar $CLI_JAR -s $URL build $JOB_NAME  done  
            Hide
            danielbeck Daniel Beck added a comment - - edited

            Jayan MN There's really no point testing this on an outdated version of Jenkins when 2.46.2 contained a major rewrite of the CLI. If you're affected by an issue that looks like this one, start by upgrading to a recent version of Jenkins.

            If the problem persists (given the age of this issue and major changes since), please file a new bug.

            Show
            danielbeck Daniel Beck added a comment - - edited Jayan MN There's really no point testing this on an outdated version of Jenkins when 2.46.2 contained a major rewrite of the CLI. If you're affected by an issue that looks like this one, start by upgrading to a recent version of Jenkins. If the problem persists (given the age of this issue and major changes since), please file a new bug.
            Hide
            jayanmn Jayan MN added a comment -

            Thanks, great news.

            I posted my case as this was claimed to be addressed long back in 1.563.... I will pick 2.46.2  and test it in next couple of days.. 

            Show
            jayanmn Jayan MN added a comment - Thanks, great news. I posted my case as this was claimed to be addressed long back in 1.563.... I will pick 2.46.2  and test it in next couple of days.. 
            Hide
            danielbeck Daniel Beck added a comment -

            Jayan MN

            this was claimed to be addressed long back in 1.563

            Right; an indicator you might be seeing a different bug, so please file a new issue if it's still present. It's very confusing to have multiple reports of the "same" issue that have very different causes.

            Show
            danielbeck Daniel Beck added a comment - Jayan MN this was claimed to be addressed long back in 1.563 Right; an indicator you might be seeing a different bug, so please file a new issue if it's still present. It's very confusing to have multiple reports of the "same" issue that have very different causes.
            Hide
            jayanmn Jayan MN added a comment -

            tested with Jenkins ver. 2.60.2 - I will create a new bug as you suggested.  

            Show
            jayanmn Jayan MN added a comment - tested with  Jenkins ver. 2.60.2  - I will create a new bug as you suggested.  

              People

              • Assignee:
                kohsuke Kohsuke Kawaguchi
                Reporter:
                iwonbigbro Craig Phillips
              • Votes:
                0 Vote for this issue
                Watchers:
                15 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: