Skip to content

[JENKINS-22088] Disk space leak with multiple copies of winstone-XXXX.jar in TEMP folder #22933

Closed

Description

@jenkins-infra-bot

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.


Originally reported by t0yv0, imported from: Disk space leak with multiple copies of winstone-XXXX.jar in TEMP folder
  • assignee: ifernandezcalvo
  • status: Closed
  • priority: Major
  • component(s): core
  • label(s): winstone
  • resolution: Fixed
  • resolved: 2023-06-22T09:51:07+00:00
  • votes: 20
  • watchers: 34
  • imported: 2025-11-24
Raw content of original issue

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.

  • environment: Windows 8.1 x64, JDK 1.7.0_51, Jenkins 1.553

Activity

  1. jenkins-infra-bot commented on Mar 7, 2014

    @jenkins-infra-bot
    Author
  2. jenkins-infra-bot commented on May 5, 2014

    @jenkins-infra-bot
    Author
    mbshick:
    • Original comment link
    • Raw content of original comment:

      This is a serious problem. I just discovered that my Jenkins installation, which I don't even use, has been filling my drive with these files for at least 2 months, taking up several hundred GB of space. This is on Mac OS X 10.9.

    This is a serious problem. I just discovered that my Jenkins installation, which I don't even use, has been filling my drive with these files for at least 2 months, taking up several hundred GB of space. This is on Mac OS X 10.9.

  3. jenkins-infra-bot commented on May 19, 2014

    @jenkins-infra-bot
    Author
    seand:
    • Original comment link
    • Raw content of original comment:

      I had this issue also. In my case it was caused by the Jenkins service starting and failing constantly and creating a winstone*.jar file in the temp folder each time. This was happening because Jenkins was already running as a process when the service was trying to start. I fixed it by killing the java process for Jenkins in Task Manager, then starting the Jenkins Service.

    I had this issue also. In my case it was caused by the Jenkins service starting and failing constantly and creating a winstone*.jar file in the temp folder each time. This was happening because Jenkins was already running as a process when the service was trying to start. I fixed it by killing the java process for Jenkins in Task Manager, then starting the Jenkins Service.

  4. jenkins-infra-bot commented on Apr 22, 2015

    @jenkins-infra-bot
    Author
    amandaxu:
    • Original comment link
    • Raw content of original comment:

      Hello There. I am running into the same problem. Is there a workaround? My Jenkins version is 1.542. Thanks in advanced.

    Hello There. I am running into the same problem. Is there a workaround? My Jenkins version is 1.542. Thanks in advanced.

  5. jenkins-infra-bot commented on May 11, 2015

    @jenkins-infra-bot
    Author
    plnech:
    • Original comment link
    • Raw content of original comment:

      Hi there,

      I have the same problem with Jenkins ver. 1.612 on Windows 7 64bits.

    Hi there,

    I have the same problem with Jenkins ver. 1.612 on Windows 7 64bits.

  6. jenkins-infra-bot commented on Oct 12, 2015

    @jenkins-infra-bot
    Author
    gsxjay:
    • Original comment link
    • Raw content of original comment:

      Same here on 1.627 on Windows 2008 R2 64 Bit. I'm going to manually clear it out, but this should be fixed.

    Same here on 1.627 on Windows 2008 R2 64 Bit. I'm going to manually clear it out, but this should be fixed.

  7. jenkins-infra-bot commented on Nov 9, 2015

    @jenkins-infra-bot
    Author
    aarondmarasco_vsi:
    • Original comment link
    • Raw content of original comment:

      This seems to happen on non-Windows as well; I have a Linux server and have a bunch in /tmp.

    This seems to happen on non-Windows as well; I have a Linux server and have a bunch in /tmp.

  8. jenkins-infra-bot commented on Jan 8, 2016

    @jenkins-infra-bot
    Author
    deepakkoirala:
    • Original comment link
    • Raw content of original comment:

      Is there a workaround yet? Do we need to manually delete all the winstoneXXXXXXXXXXXX.jar? Deleting these jars won't affect anything, right? We have Jenkins ver. 1.613, installed in windows server and facing the same issue. Almost 70 GB space is full within 3 months. And I saw most of the space is taken by winstone.jar in temp folder.

    Is there a workaround yet? Do we need to manually delete all the winstoneXXXXXXXXXXXX.jar? Deleting these jars won't affect anything, right? We have Jenkins ver. 1.613, installed in windows server and facing the same issue. Almost 70 GB space is full within 3 months. And I saw most of the space is taken by winstone.jar in temp folder.

  9. jenkins-infra-bot commented on Mar 24, 2016

    @jenkins-infra-bot
    Author
    bardelotnzl:
    • Original comment link
    • Raw content of original comment:

      Same here on Windows 2008 Server.

    Same here on Windows 2008 Server.

  10. jenkins-infra-bot commented on May 3, 2016

    @jenkins-infra-bot
    Author
    dan:

    I just stumbled upon this Issue and used https://wiki.jenkins-ci.org/display/JENKINS/Tmp+Cleaner+Plugin as a workaround.
    Had to set all mentioned parameters with system properties when starting Jenkins but result was a cleaned /var/tmp after that.
    YMMV, but might be a valid workaround. HTH, Daniel

  11. jenkins-infra-bot commented on Feb 3, 2017

    @jenkins-infra-bot
    Author
    johey:
    • Original comment link
    • Raw content of original comment:

      I was also affected by this on Windows Server 2008, caused by an old jenkins process lying around while the service started another. A new winstone-XXXX.jar of 2 MB was created once every two seconds. I killed all java processes, deleted all files and restarted the service. Now there's only one of these jar files.

      I don't know the inners of jenkins, but there should be some sanity check before creating a new winstone-XXXX.jar.

    I was also affected by this on Windows Server 2008, caused by an old jenkins process lying around while the service started another. A new winstone-XXXX.jar of 2 MB was created once every two seconds. I killed all java processes, deleted all files and restarted the service. Now there's only one of these jar files.

    I don't know the inners of jenkins, but there should be some sanity check before creating a new winstone-XXXX.jar.

  12. jenkins-infra-bot commented on Feb 7, 2017

    @jenkins-infra-bot
    Author
    erwin_ntt:
    • Original comment link
    • Raw content of original comment:

      Hello. Just run in this issue on our build server. Jenkins ver. 2.32.1. Windows Server 2008 R2 Standard 64 Bit. winstone-XXXX.jar was created and filled up disk space on C:. Solution was to kill all Jenkins/Java processes and restart Jenkins.

    Hello. Just run in this issue on our build server.
    Jenkins ver. 2.32.1.
    Windows Server 2008 R2 Standard 64 Bit.
    winstone-XXXX.jar was created and filled up disk space on C:. Solution was to kill all Jenkins/Java processes and restart Jenkins.

  13. jenkins-infra-bot commented on Mar 23, 2017

    @jenkins-infra-bot
    Author
    juristr:
    • Original comment link
    • Raw content of original comment:

      same here. We just upgraded to 2.32.3 a couple of days ago and now I have this issue. Didn't have it before, at least I did not notice anything.

      The question is, can I delete them safely?

    same here. We just upgraded to 2.32.3 a couple of days ago and now I have this issue. Didn't have it before, at least I did not notice anything.

    The question is, can I delete them safely?

  14. jenkins-infra-bot commented on Mar 23, 2017

    @jenkins-infra-bot
    Author
    johey:
    • Original comment link
    • Raw content of original comment:

      juristr, you probably have an old process running from the previous version. Close all jenkins processes including any old ones, remove all of the temp files and start it up. That's how I solved it and I'm pretty sure it's safe.

    juristr, you probably have an old process running from the previous version. Close all jenkins processes including any old ones, remove all of the temp files and start it up. That's how I solved it and I'm pretty sure it's safe.

  15. jenkins-infra-bot commented on Apr 10, 2017

    @jenkins-infra-bot
    Author
    acerqu:
    • Original comment link
    • Raw content of original comment:

      I can reproduce this error. Set jenkins as a windows service. then stop it. Install another application which is using 8080 port. restart the jenkins service. it will keep generating winstone.jar

    I can reproduce this error. Set jenkins as a windows service. then stop it. Install another application which is using 8080 port. restart the jenkins service. it will keep generating winstone.jar

  16. 16 remaining items

  17. jenkins-infra-bot commented on Apr 5, 2019

    @jenkins-infra-bot
    Author
    ptha:
    • Original comment link
    • Raw content of original comment:

      ifernandezcalvo 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!

       

    ifernandezcalvo 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!

     

  18. jenkins-infra-bot commented on Aug 14, 2019

    @jenkins-infra-bot
    Author
    shashankkulsh:
    • Original comment link
    • Raw content of original comment:

      This issue is happening with my current Jenkins build 2.156 on windows. Is there any solution for windows for this. 

      Disk is getting full, due to so many winstone*.jar in C:\...\AppData\Local\Temp folder

    This issue is happening with my current Jenkins build 2.156 on windows. Is there any solution for windows for this. 

    Disk is getting full, due to so many winstone*.jar in C:\...\AppData\Local\Temp folder

  19. jenkins-infra-bot commented on Aug 15, 2019

    @jenkins-infra-bot
    Author
    ifernandezcalvo:
    • Original comment link
    • Raw content of original comment:

      shashankkulsh Did you read the comment before yours? there you have the solution *--extractedFilesFolder=c:\TMP-FOLDER-PATH*

    shashankkulsh Did you read the comment before yours? there you have the solution *--extractedFilesFolder=c:\TMP-FOLDER-PATH*

  20. jenkins-infra-bot commented on Nov 11, 2019

    @jenkins-infra-bot
    Author
    barna10:
    • Original comment link
    • Raw content of original comment:

      Is there any plan to fix this? Seems wonky that Jenkins knows where to write the jar, but not where to go to delete it.

    Is there any plan to fix this? Seems wonky that Jenkins knows where to write the jar, but not where to go to delete it.

  21. jenkins-infra-bot commented on Sep 24, 2020

    @jenkins-infra-bot
    Author
    smd:
    • Original comment link
    • Raw content of original comment:

      I just had my Windows 2012R2 Jenkins 2.257 server fall to its knees for the second time in a week after something threw a spanner at Jenkins (started as a service). Jenkins was convinced that it needed to restart itself, which failed due to address already in use, so try again and again and again, dumping a new copy of winstone#.jar each time until out of disk space.

      This bizarre behavior seems to be the result of how the Jenkins service is created by default, first failure: restart, second failure: restart, subsequent failures: restart.

      For now I've set subsequent failures to 'take no action' - hopefully this will ease the pain.

    I just had my Windows 2012R2 Jenkins 2.257 server fall to its knees for the second time in a week after something threw a spanner at Jenkins (started as a service). Jenkins was convinced that it needed to restart itself, which failed due to address already in use, so try again and again and again, dumping a new copy of winstone#.jar each time until out of disk space.

    This bizarre behavior seems to be the result of how the Jenkins service is created by default, first failure: restart, second failure: restart, subsequent failures: restart.

    For now I've set subsequent failures to 'take no action' - hopefully this will ease the pain.

  22. jenkins-infra-bot commented on Jun 22, 2023

    @jenkins-infra-bot
    Author
    chrisfetz:
    • Original comment link
    • Raw content of original comment:

      I am currently experiencing this issue with a jenkins 2.401.1 (LTS) running on Windows server 2016. Still seems to be an active issue...

    I am currently experiencing this issue with a jenkins 2.401.1 (LTS) running on Windows server 2016. Still seems to be an active issue...

  23. jenkins-infra-bot commented on Jun 22, 2023

    @jenkins-infra-bot
    Author
    ifernandezcalvo:
    • Original comment link
    • Raw content of original comment:

      The issue was fixed and nobody report a hit in five years, Could you open a new one with the details of your environment and reference this one?

    The issue was fixed and nobody report a hit in five years, Could you open a new one with the details of your environment and reference this one?

  24. removed
    bugFor changelog: Minor bug. Will be listed after features
    on Nov 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions