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

Workspace Cleanup Plugin fails on cygwin unix slave

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • ws-cleanup-plugin
    • CentOS release 6.5 (Final)
      Jenkins 1.532
      Workspace Cleanup 0.20
      Cygpath plugin 1.5

      When either pre or post ws cleanup is run, it fails with exception

      Deleting project workspace...
      Cannot delete workspace :remote file operation failed: /home/dtcdt/projects/jenkins/workspace/CommonLib/label/Build-Win2003R2 at hudson.remoting.Channel@6701c06:Build-Win2003R2
      ERROR: Publisher hudson.plugins.ws_cleanup.WsCleanup aborted due to exception
      hudson.AbortException: Cannot delete workspace: remote file operation failed: /home/dtcdt/projects/jenkins/workspace/CommonLib/label/Build-Win2003R2 at hudson.remoting.Channel@6701c06:Build-Win2003R2
      at hudson.plugins.ws_cleanup.WsCleanup.perform(WsCleanup.java:180)
      at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
      at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:782)
      at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:754)
      at hudson.model.Build$BuildExecution.cleanUp(Build.java:192)
      at hudson.model.Run.execute(Run.java:1710)
      at hudson.matrix.MatrixRun.run(MatrixRun.java:146)
      at hudson.model.ResourceController.execute(ResourceController.java:88)
      at hudson.model.Executor.run(Executor.java:246)
      Finished: FAILURE

          [JENKINS-22378] Workspace Cleanup Plugin fails on cygwin unix slave

          Tomas Kislan added a comment -

          I have identified that problem is caused when it tries to delete files created by git clone.
          These files have only read access (dunno why git clone them like that), but on Unixes it still can delete them without problems, so I guess windows (or NFS) has problems with it.

          Tomas Kislan added a comment - I have identified that problem is caused when it tries to delete files created by git clone. These files have only read access (dunno why git clone them like that), but on Unixes it still can delete them without problems, so I guess windows (or NFS) has problems with it.

          Tomas Kislan added a comment -

          I have tracked down this to JGit, it doesn't release the file descriptors, thus files can't be deleted
          Simple workaround for me is to trick jenkins into using the native windows git implementation on cygwin slave

          Tomas Kislan added a comment - I have tracked down this to JGit, it doesn't release the file descriptors, thus files can't be deleted Simple workaround for me is to trick jenkins into using the native windows git implementation on cygwin slave

            vjuranek vjuranek
            pinker Tomas Kislan
            Votes:
            2 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: