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

Asynchronous delete of workspace doesn't detect fail to rename

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved (View Workflow)
    • Minor
    • Resolution: Fixed
    • core, ws-cleanup-plugin
    • None
    • Jenkins 1.595. Workspace cleanup plugin 0.24.
      Windows Server 2008 R2 Enterprise. AMD64. Oracle Java 1.7u25.

    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

          pmilliken Paul Milliken created issue -
          olivergondza Oliver Gondža made changes -
          Field Original Value New Value
          Assignee vjuranek [ vjuranek ] Oliver Gondža [ olivergondza ]
          olivergondza Oliver Gondža made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          scm_issue_link SCM/JIRA link daemon made changes -
          Resolution Fixed [ 1 ]
          Status In Progress [ 3 ] Resolved [ 5 ]
          rtyler R. Tyler Croy made changes -
          Workflow JNJira [ 160244 ] JNJira + In-Review [ 196378 ]

          People

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

            Dates

              Created:
              Updated:
              Resolved: