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

workspace being deleted mid-build on slave box.

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major Major
    • subversion-plugin
    • None
    • Platform: All, OS: All

      -version 1.221
      -windows 2003 r2 server configured as Hudson Master
      -suse 10.1 enterprise server configured as slave
      -subversion vcs

      I have a job configured on my Windows master Hudson to run on my Suse slave box
      at 8:30pm. The job always start successfully. However, shortly after 10pm each
      night, while my slave build is still going, the Windows master does a workspace
      cleanup and deletes the "builds" directory on my slave which of course fails the
      build. I can see this by seeing the timestamp on the workspace-cleanup.log file
      on the master system in HUDSON_HOME. The text of the file says:

      "Scanning <my-suse-slave-machine>
      Deleting /hudson/builds/workspace/builds"

      ... where "/hudson/builds" is the defined FS Root of my slave configuration.

      I have searched for a setting to prevent this cleanup but have not found one
      yet. It seems that hudson is not recognizing that a slave build is in process.

      Note that I have not updated slave.jar since earlier 1.2 releases as I assumed
      it has not changed. Thank you.

          [JENKINS-1880] workspace being deleted mid-build on slave box.

          Code changed in hudson
          User: : kohsuke
          Path:
          trunk/hudson/main/core/src/main/java/hudson/model/WorkspaceCleanupThread.java
          http://fisheye4.cenqua.com/changelog/hudson/?cs=10312
          Log:
          JENKINS-1880 Adding one more probe to diagnose this problem.

          SCM/JIRA link daemon added a comment - Code changed in hudson User: : kohsuke Path: trunk/hudson/main/core/src/main/java/hudson/model/WorkspaceCleanupThread.java http://fisheye4.cenqua.com/changelog/hudson/?cs=10312 Log: JENKINS-1880 Adding one more probe to diagnose this problem.

          smarmit added a comment -

          I've set the logging as requested. I likely will have to wait until the night
          build as I cannot reproduce this during the day. There must be some scheduler
          that decides when to do build directory cleanup? I will attach the result of the
          'finer' logs as soon as I see the error again (tonight likely).

          smarmit added a comment - I've set the logging as requested. I likely will have to wait until the night build as I cannot reproduce this during the day. There must be some scheduler that decides when to do build directory cleanup? I will attach the result of the 'finer' logs as soon as I see the error again (tonight likely).

          smarmit added a comment -

          After opening the bug, I did not get this behavior since, until a recent build.
          I started a build at 8:00pm which would then execute on a suse 'slave' box. The
          log snippet below shows the workspace cleanup on that slave, but this happens
          while the build is still running, and the cleanup removes the build directory.
          You can see the final log entry after the cleanup is my 'slave' build failing.
          Thanks for any help or info.

          Jul 13, 2008 10:10:52 PM hudson.model.Run run
          INFO: 1.0_release_nix #12 main build action completed: FAILURE

          Jul 13, 2008 10:10:52 PM hudson.model.PeriodicWork$1 run
          INFO: Finished Workspace clean-up. 4110 ms

          Jul 13, 2008 10:10:52 PM hudson.model.WorkspaceCleanupThread
          FINE: Directory H:\hudson\jobs\windows\workspace is the last workspace for
          hudson.model.FreeStyleProject@618ac5[windows]

          Jul 13, 2008 10:10:52 PM hudson.model.WorkspaceCleanupThread
          FINE: Directory H:\hudson\jobs\1.0_release_windows\workspace is the last
          workspace for hudson.model.FreeStyleProject@81fb[1.0_release_windows]

          Jul 13, 2008 10:10:52 PM hudson.model.WorkspaceCleanupThread
          FINE: Directory /hudson/builds/workspace/repositor-stage is the last workspace
          for hudson.model.FreeStyleProject@514f7f[repositor-stage]

          Jul 13, 2008 10:10:52 PM hudson.model.WorkspaceCleanupThread
          FINE: Directory /hudson/builds/workspace/1.0_release_nix is the last workspace
          for hudson.model.FreeStyleProject@1271ba[1.0_release_nix]

          Jul 13, 2008 10:10:48 PM hudson.model.WorkspaceCleanupThread
          FINE: Directory /hudson/builds/workspace/builds is not owned by any project

          Jul 13, 2008 10:10:48 PM hudson.model.WorkspaceCleanupThread
          FINE: Directory /hudson/builds/workspace/unix-like is the last workspace for
          hudson.model.FreeStyleProject@18177ca[unix-like]

          Jul 13, 2008 10:10:48 PM hudson.model.WorkspaceCleanupThread
          FINE: Directory /hudson/builds/workspace/repositor is the last workspace for
          hudson.maven.MavenModuleSet@5b6d00[repositor]

          Jul 13, 2008 10:10:48 PM hudson.model.PeriodicWork$1 run
          INFO: Started Workspace clean-up

          smarmit added a comment - After opening the bug, I did not get this behavior since, until a recent build. I started a build at 8:00pm which would then execute on a suse 'slave' box. The log snippet below shows the workspace cleanup on that slave, but this happens while the build is still running, and the cleanup removes the build directory. You can see the final log entry after the cleanup is my 'slave' build failing. Thanks for any help or info. Jul 13, 2008 10:10:52 PM hudson.model.Run run INFO: 1.0_release_nix #12 main build action completed: FAILURE Jul 13, 2008 10:10:52 PM hudson.model.PeriodicWork$1 run INFO: Finished Workspace clean-up. 4110 ms Jul 13, 2008 10:10:52 PM hudson.model.WorkspaceCleanupThread FINE: Directory H:\hudson\jobs\windows\workspace is the last workspace for hudson.model.FreeStyleProject@618ac5 [windows] Jul 13, 2008 10:10:52 PM hudson.model.WorkspaceCleanupThread FINE: Directory H:\hudson\jobs\1.0_release_windows\workspace is the last workspace for hudson.model.FreeStyleProject@81fb [1.0_release_windows] Jul 13, 2008 10:10:52 PM hudson.model.WorkspaceCleanupThread FINE: Directory /hudson/builds/workspace/repositor-stage is the last workspace for hudson.model.FreeStyleProject@514f7f [repositor-stage] Jul 13, 2008 10:10:52 PM hudson.model.WorkspaceCleanupThread FINE: Directory /hudson/builds/workspace/1.0_release_nix is the last workspace for hudson.model.FreeStyleProject@1271ba [1.0_release_nix] Jul 13, 2008 10:10:48 PM hudson.model.WorkspaceCleanupThread FINE: Directory /hudson/builds/workspace/builds is not owned by any project Jul 13, 2008 10:10:48 PM hudson.model.WorkspaceCleanupThread FINE: Directory /hudson/builds/workspace/unix-like is the last workspace for hudson.model.FreeStyleProject@18177ca [unix-like] Jul 13, 2008 10:10:48 PM hudson.model.WorkspaceCleanupThread FINE: Directory /hudson/builds/workspace/repositor is the last workspace for hudson.maven.MavenModuleSet@5b6d00 [repositor] Jul 13, 2008 10:10:48 PM hudson.model.PeriodicWork$1 run INFO: Started Workspace clean-up

          smarmit added a comment -

          I was checking the status of this old buy I entered and found that it was
          addressed with bug 3653,
          https://hudson.dev.java.net/issues/show_bug.cgi?id=3653, and marked
          RESOLVED/FIXED. Those are duplicates of this bug (or other way around, who cares
          really).

          Thanks

          smarmit added a comment - I was checking the status of this old buy I entered and found that it was addressed with bug 3653, https://hudson.dev.java.net/issues/show_bug.cgi?id=3653 , and marked RESOLVED/FIXED. Those are duplicates of this bug (or other way around, who cares really). Thanks

            Unassigned Unassigned
            smarmit smarmit
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: