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

Disk space leak with multiple copies of winstone-XXXX.jar in TEMP folder

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: core
    • Labels:
    • Environment:
      Windows 8.1 x64, JDK 1.7.0_51, Jenkins 1.553
    • Similar Issues:

      Description

      Continued operation of Jenkins creates multiple copies of "winstone.jar" with a numeric suffix in TEMP folder (winstone12343543634634.jar). We had about 800Gb of these accumulated, slowing down the host system.

      We are currently running Jenkins directly (`java -jar jenkins.jar`) via Windows scheduled task.

        Attachments

          Activity

          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Oleg Nenashev
          Path:
          war/pom.xml
          http://jenkins-ci.org/commit/jenkins/bff2d2a399018655e3b54e1883f5efff176f3f8c
          Log:
          Merge pull request #3223 from oleg-nenashev/extras-executable-war/1.37

          JENKINS-22088 - Upgrade Extras Executable War from 1.36 to 1.37

          Compare: https://github.com/jenkinsci/jenkins/compare/2a6fc653ee7b...bff2d2a39901

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: war/pom.xml http://jenkins-ci.org/commit/jenkins/bff2d2a399018655e3b54e1883f5efff176f3f8c Log: Merge pull request #3223 from oleg-nenashev/extras-executable-war/1.37 JENKINS-22088 - Upgrade Extras Executable War from 1.36 to 1.37 Compare: https://github.com/jenkinsci/jenkins/compare/2a6fc653ee7b...bff2d2a39901
          Hide
          ptha Peter Hannon added a comment - - edited

          I am still seeing this issue with Jenkins v 2.121.3. From jenkins release notes: https://jenkins.io/changelog-stable/#v2.107.1 I thought this had been fixed in v2.107.1

          I noticed recently that there were several winstone jars in my /tmp. I manually removed all but the most recent.  I then did a safeRestart of Jenkins and there were then 2 winstone jars in the /tmp directory of the master Jenkins node.

          ls -lrt winstone*.jar
          -rw-r--r-- 1 jenkins users 2146767 2019-03-04 12:23 winstone9180695101677339973.jar
          -rw-r--r-- 1 jenkins users 2146767 2019-04-04 11:21 winstone8639977864837551161.jar
          

          We are running the Jenkins war directly via a shell script

          #!/bin/bash
          nohup /home/jenkins/jdk8/bin/java -jar /home/jenkins/jenkins.war --httpPort=8081 > /home/jenkins/jenkins.log 2>&1 &
          

           

          I'm not sure if it's related but I am also seeing some empty jetty directories with similar timestamps:

          ls -ldrt jetty*
          drwxr-xr-x 2 jenkins users 4096 2019-03-04 12:23 jetty-0.0.0.0-8081-war-_-any-2428298004054280574.dir
          drwxr-xr-x 2 jenkins users 4096 2019-04-04 11:21 jetty-0.0.0.0-8081-war-_-any-7220745071344149958.dir
          

           

           

          Show
          ptha Peter Hannon added a comment - - edited I am still seeing this issue with Jenkins v 2.121.3. From jenkins release notes:  https://jenkins.io/changelog-stable/#v2.107.1  I thought this had been fixed in v2.107.1 I noticed recently that there were several winstone jars in my /tmp. I manually removed all but the most recent.  I then did a safeRestart of Jenkins and there were then 2 winstone jars in the /tmp directory of the master Jenkins node. ls -lrt winstone*.jar -rw-r--r-- 1 jenkins users 2146767 2019-03-04 12:23 winstone9180695101677339973.jar -rw-r--r-- 1 jenkins users 2146767 2019-04-04 11:21 winstone8639977864837551161.jar We are running the Jenkins war directly via a shell script #!/bin/bash nohup /home/jenkins/jdk8/bin/java -jar /home/jenkins/jenkins.war --httpPort=8081 > /home/jenkins/jenkins.log 2>&1 &   I'm not sure if it's related but I am also seeing some empty jetty directories with similar timestamps: ls -ldrt jetty* drwxr-xr-x 2 jenkins users 4096 2019-03-04 12:23 jetty-0.0.0.0-8081-war-_-any-2428298004054280574.dir drwxr-xr-x 2 jenkins users 4096 2019-04-04 11:21 jetty-0.0.0.0-8081-war-_-any-7220745071344149958.dir    
          Hide
          ptha Peter Hannon added a comment -

          Ivan Fernandez Calvo thanks for the reply, if you see my comment (the shell script), I'm running this in linux, so the windows service change is not applicable for me.

          Are you saying for a linux environment, this generated winstone jar file needs to be cleaned manually?

          Show
          ptha Peter Hannon added a comment - Ivan Fernandez Calvo thanks for the reply, if you see my comment (the shell script), I'm running this in linux, so the windows service change is not applicable for me. Are you saying for a linux environment, this generated winstone jar file needs to be cleaned manually?
          Hide
          ifernandezcalvo Ivan Fernandez Calvo added a comment -

          Peter Hannon sorry, I've replied something unrelated.

          You have to pass an argument to enable the cleanup `--extractedFilesFolder=FOLDER_PATH`

          https://github.com/kuisathaverat/extras-executable-war/blob/8f00f05c22cb4953ed0a034e0d7ef35c0076f99f/src/main/java/Main.java#L229-L232

          Show
          ifernandezcalvo Ivan Fernandez Calvo added a comment - Peter Hannon sorry, I've replied something unrelated. You have to pass an argument to enable the cleanup `--extractedFilesFolder=FOLDER_PATH` https://github.com/kuisathaverat/extras-executable-war/blob/8f00f05c22cb4953ed0a034e0d7ef35c0076f99f/src/main/java/Main.java#L229-L232
          Hide
          ptha Peter Hannon added a comment -

          Ivan Fernandez Calvo thanks again!

          As per your suggestion, I updated my start shell script to:

           

          #!/bin/bash
          nohup /home/jenkins/jdk8/bin/java -jar /home/jenkins/jenkins.war --httpPort=8081 --extractedFilesFolder=/tmp > /home/jenkins/jenkins.log 2>&1 &
          

          Now the extra winstone jars are cleaned up on startup, I also tested a safeRestart and again there was only 1 winstone jar file (for the running Jenkins).

          So it's solved for me, cheers!

           

          Show
          ptha Peter Hannon added a comment - Ivan Fernandez Calvo  thanks again! As per your suggestion, I updated my start shell script to:   #!/bin/bash nohup /home/jenkins/jdk8/bin/java -jar /home/jenkins/jenkins.war --httpPort=8081 --extractedFilesFolder=/tmp > /home/jenkins/jenkins.log 2>&1 & Now the extra winstone jars are cleaned up on startup, I also tested a safeRestart and again there was only 1 winstone jar file (for the running Jenkins). So it's solved for me, cheers!  

            People

            • Assignee:
              ifernandezcalvo Ivan Fernandez Calvo
              Reporter:
              t0yv0 Anton Tayanovskyy
            • Votes:
              20 Vote for this issue
              Watchers:
              31 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: