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

workspace being deleted mid-build on slave

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Minor Minor
    • core
    • None
    • Jenkins 1.633 on Ubuntu 14.04
      slave: Ubuntu 12.04

      I have a matrix project configured such that the main job is executed on the master and subjobs for the various configuration on respective slaves. Occasionally a build fails because the job's workspace on a slave is being deleted while the job is still running. From last night's nightly build:

      Gestartet durch vorgelagertes Projekt "Bar-Nightly", Build 222
      originally caused by:
       Gestartet durch vorgelagertes Projekt "Foo-Nightly", Build 80
       originally caused by:
        Build wurde durch eine SCM-Änderung ausgelöst.
      Baue auf Slave BonefishMac-Ubuntu-12.04 (x86 Ubuntu-12.04) in Arbeitsbereich /home/jenkins/jenkins/workspace/Bar-Nightly/label/Ubuntu-12.04
       > git rev-parse --is-inside-work-tree # timeout=10
      Fetching changes from the remote Git repository
      [...]
      [com.bar] $ ant -file build.xml -Dlabel=Ubuntu-12.04 -Dtarget.arch=x86 -Ddependencies.foo.zip=../build-dependencies/Foo.zip -Dlong.running.unit.tests=on -Ddependencies.base.dir=/home/jenkins/build-environments clean installer run-unit-tests
      Buildfile: /home/jenkins/jenkins/workspace/Bar-Nightly/label/Ubuntu-12.04/com.bar/build.xml
      [...]
      write-version-properties:
      [propertyfile] Creating new property file: /home/jenkins/jenkins/workspace/Bar-Nightly/label/Ubuntu-12.04/com.bar/bin/classes/com/bar/ui/swt/version.properties
      
      jar:
            [jar] Building jar: /home/jenkins/jenkins/workspace/Bar-Nightly/label/Ubuntu-12.04/com.bar/bin/package/bar.jar
      
      BUILD FAILED
      /home/jenkins/jenkins/workspace/Bar-Nightly/label/Ubuntu-12.04/com.bar/build.xml:264: Problem creating jar: /home/jenkins/jenkins/workspace/Bar-Nightly/label/Ubuntu-12.04/com.bar/src/log4j.properties (No such file or directory)
      
      Total time: 18 seconds
      Build step 'Ant aufrufen' marked build as failure
      Zeichne Testergebnisse auf.
      ERROR: Build step failed with exception
      /home/jenkins/jenkins/workspace/Bar-Nightly/label/Ubuntu-12.04 does not exist.
      	at org.apache.tools.ant.types.AbstractFileSet.getDirectoryScanner(AbstractFileSet.java:483)
      	at org.apache.tools.ant.types.AbstractFileSet.getDirectoryScanner(AbstractFileSet.java:460)
      	at hudson.tasks.junit.JUnitParser$ParseResultCallable.invoke(JUnitParser.java:110)
      	at hudson.tasks.junit.JUnitParser$ParseResultCallable.invoke(JUnitParser.java:93)
      	at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2691)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:121)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:49)
      	at hudson.remoting.Request$2.run(Request.java:326)
      	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      	at java.lang.Thread.run(Thread.java:745)
      	at ......remote call to BonefishMac-Ubuntu-12.04(Native Method)
      	at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1413)
      	at hudson.remoting.UserResponse.retrieve(UserRequest.java:221)
      	at hudson.remoting.Channel.call(Channel.java:778)
      	at hudson.FilePath.act(FilePath.java:980)
      	at hudson.FilePath.act(FilePath.java:969)
      	at hudson.tasks.junit.JUnitParser.parseResult(JUnitParser.java:90)
      	at hudson.tasks.junit.JUnitResultArchiver.parse(JUnitResultArchiver.java:120)
      	at hudson.tasks.junit.JUnitResultArchiver.perform(JUnitResultArchiver.java:137)
      	at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:75)
      	at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:726)
      	at hudson.model.Build$BuildExecution.post2(Build.java:185)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:671)
      	at hudson.model.Run.execute(Run.java:1766)
      	at hudson.matrix.MatrixRun.run(MatrixRun.java:146)
      	at hudson.model.ResourceController.execute(ResourceController.java:98)
      	at hudson.model.Executor.run(Executor.java:408)
      

      Apparently the workspace has been deleted while ant was running. Not only this job's workspace is gone on the slave, but also the workspace of the job it depends on.

      Both the job and the job it depends are generated by the Job DSL plugin. Yesterday I updated various plugins, including the Job DSL plugin (to 1.39), and reran the seed job, so that all jobs have been updated. I notice that workspaces of jobs not generated by the Job DSL plugin are still present on the slave (even ones of no longer existing jobs). On the other build slaves none of the workspaces have been deleted.

            Unassigned Unassigned
            bonefish Ingo Weinhold
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: