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

Failed to checkout SVN keeps files open

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Component/s: subversion-plugin
    • Labels:
      None
    • Environment:
      Jenkins 2.150.3 on master
      Windows 10 slave with JRE version 1.8.0_201-b09
    • Similar Issues:

      Description

      If a pipeline step "checkout scm" on a build fails midway through an SVN checkout, files within the working directory are kept open by the jenkins process and later builds on the same host fail because the old workspace cannot be fully deleted.

      The original SVN failure looks like (with hostname scubbed):

      ERROR: Failed to check out https://host.example.com/svn/project/trunk
      org.tmatesoft.svn.core.SVNException: svn: E175002: Connection reset
      svn: E175002: REPORT request failed on '/svn/!svn/vcc/default'
      at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:112)
      at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:96)
      at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:765)
      at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:352)
      at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:340)
      at org.tmatesoft.svn.core.internal.io.dav.DAVConnection.performHttpRequest(DAVConnection.java:910)
      at org.tmatesoft.svn.core.internal.io.dav.DAVConnection.doReport(DAVConnection.java:363)
      at org.tmatesoft.svn.core.internal.io.dav.DAVRepository.runReport(DAVRepository.java:1349)
      at org.tmatesoft.svn.core.internal.io.dav.DAVRepository.update(DAVRepository.java:847)
      at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgAbstractUpdate.updateInternal(SvnNgAbstractUpdate.java:263)
      at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgAbstractUpdate.update(SvnNgAbstractUpdate.java:115)
      at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgAbstractUpdate.checkout(SvnNgAbstractUpdate.java:877)
      at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgCheckout.run(SvnNgCheckout.java:26)
      at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgCheckout.run(SvnNgCheckout.java:11)
      at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgOperationRunner.run(SvnNgOperationRunner.java:20)
      at org.tmatesoft.svn.core.internal.wc2.SvnOperationRunner.run(SvnOperationRunner.java:21)
      at org.tmatesoft.svn.core.wc2.SvnOperationFactory.run(SvnOperationFactory.java:1239)
      at org.tmatesoft.svn.core.wc2.SvnOperation.run(SvnOperation.java:294)
      at hudson.scm.subversion.CheckoutUpdater$SubversionUpdateTask.perform(CheckoutUpdater.java:133)
      at hudson.scm.subversion.WorkspaceUpdater$UpdateTask.delegateTo(WorkspaceUpdater.java:168)
      at hudson.scm.subversion.WorkspaceUpdater$UpdateTask.delegateTo(WorkspaceUpdater.java:176)
      at hudson.scm.subversion.UpdateUpdater$TaskImpl.perform(UpdateUpdater.java:134)
      at hudson.scm.subversion.WorkspaceUpdater$UpdateTask.delegateTo(WorkspaceUpdater.java:168)
      at hudson.scm.SubversionSCM$CheckOutTask.perform(SubversionSCM.java:1041)
      at hudson.scm.SubversionSCM$CheckOutTask.invoke(SubversionSCM.java:1017)
      at hudson.scm.SubversionSCM$CheckOutTask.invoke(SubversionSCM.java:990)
      at hudson.FilePath$FileCallableWrapper.call(FilePath.java:3086)
      at hudson.remoting.UserRequest.perform(UserRequest.java:212)
      at hudson.remoting.UserRequest.perform(UserRequest.java:54)
      at hudson.remoting.Request$2.run(Request.java:369)
      at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
      at java.util.concurrent.FutureTask.run(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      at hudson.remoting.Engine$1.lambda$newThread$0(Engine.java:93)
      at java.lang.Thread.run(Unknown Source)

      with the later failure looking like:

      [WS-CLEANUP] Deleting project workspace...
      [WS-CLEANUP] Deferred wipeout is used...
      ERROR: Cannot delete workspace :Unable to delete 'c:\jenkins\workspace\project\.svn\svn.da1e85c5-6901-0010-a2aa-8db97d3cc16d.tmp'. Tried 3 times (of a maximum of 3) waiting 0.1 sec between attempts.

        Attachments

          Activity

          Hide
          bsipos Brian Sipos added a comment -

          A workaround is to manually restart the jenkins slave windows service, but this can only be done when somebody notices the file is being held open causing later builds to fail.

          Show
          bsipos Brian Sipos added a comment - A workaround is to manually restart the jenkins slave windows service, but this can only be done when somebody notices the file is being held open causing later builds to fail.

            People

            • Assignee:
              Unassigned
              Reporter:
              bsipos Brian Sipos
            • Votes:
              2 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated: