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

Asynchronous delete of workspace doesn't detect fail to rename

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Component/s: core, ws-cleanup-plugin
    • Labels:
      None
    • Environment:
      Jenkins 1.595. Workspace cleanup plugin 0.24.
      Windows Server 2008 R2 Enterprise. AMD64. Oracle Java 1.7u25.
    • Similar Issues:

      Description

      I've witnessed Jenkins randomly fail to remove a workspace (job configured with "Delete workspace before build starts" selected). This seems to happen randomly and results in the build failing due to old data being present.

      I can force this to occur by opening a command prompt in the workspace before starting the build.

      I've had a quick glance at the Jenkins code, and it looks like the call workspace.renameTo call in the Wipeout class is failing silently. This in turn seems to be because the implementation of renameTo in FilePath doesn't check the return value of the java.lang.File.renameTo call.

      If the workspace cannot be renamed for any reason, the cleanup should either fallback to deleting synchronously (and still potentially fail due to whatever lock prevented the rename) or immediately report an error.

        Attachments

          Activity

            People

            • Assignee:
              olivergondza Oliver Gondža
              Reporter:
              pmilliken Paul Milliken
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: