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

IOException Could not delete temp file

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • artifactory-plugin
    • None
    • Jenkins 2.263.1, Jenkins Artifactory Plugin 3.13.2

      We encounter an issue that appears seemingly on a random, but regular basis on all our runs. A file from the @tmp folder of the workspace cannot be deleted and throws a IOException rendering a otherwise Successfull run as a Failure.

      We traced the origins of the problem to the Post-Pipeline actions of the Artifactory-Plugin. 

      A look into the code where the exception is thrown, gave us the insight, that the file, that is supposed to be deleted, does indeed exists, but can't be deleted. Possibly due to another process that is still accessing this file or the directory. 

      We could not retrieve further information from this exception, as the wrapped exception ('e') is caught in the try/catch block of ActionableHelper.deleteFilePath()[line 274] and not wrapped as cause into the new IOException.

       

      A similiar issue was reported 5 years ago in this ticket: https://issues.jenkins.io/browse/JENKINS-44418

       

      java.io.IOException: Could not delete temp file: /home/jenkins/workspace/MyProject-Pipeline@tmp/artifactory/classworlds8889614643047634037conf
      	at org.jfrog.hudson.action.ActionableHelper.deleteFilePath(ActionableHelper.java:274)
      	at org.jfrog.hudson.maven3.Maven3Builder.RunMaven(Maven3Builder.java:122)
      	at org.jfrog.hudson.maven3.Maven3Builder.perform(Maven3Builder.java:115)
      	at org.jfrog.hudson.pipeline.common.executors.MavenExecutor.execute(MavenExecutor.java:72)
      	at org.jfrog.hudson.pipeline.scripted.steps.ArtifactoryMavenBuild$Execution.runStep(ArtifactoryMavenBuild.java:65)
      	at org.jfrog.hudson.pipeline.scripted.steps.ArtifactoryMavenBuild$Execution.runStep(ArtifactoryMavenBuild.java:51)
      	at org.jfrog.hudson.pipeline.ArtifactorySynchronousNonBlockingStepExecution.run(ArtifactorySynchronousNonBlockingStepExecution.java:54)
      	at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      	at java.lang.Thread.run(Thread.java:748)
      Finished: FAILURE
      

            eyalbe Eyal Ben Moshe
            benedikt_hahn Benedikt Hahn
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: