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

Cobertura Unable to delete coverage.xml on windows

    Details

    • Similar Issues:

      Description

      Sometimes job starting fails after successful executed with the error:

      ERROR: Failed to update svn://...
      org.tmatesoft.svn.core.SVNException: svn: E204900: Unable to delete ...\target\cobertura\report\coverage.xml
      at hudson.scm.subversion.UpdateWithCleanUpdater$TaskImpl$1.handleStatus(UpdateWithCleanUpdater.java:78)
      at org.tmatesoft.svn.core.wc.SVNStatusClient$1.receive(SVNStatusClient.java:356)
      at org.tmatesoft.svn.core.wc.SVNStatusClient$1.receive(SVNStatusClient.java:353)
      at org.tmatesoft.svn.core.wc2.SvnReceivingOperation.receive(SvnReceivingOperation.java:78)
      at org.tmatesoft.svn.core.internal.wc2.old.SvnOldGetStatus.handleStatus(SvnOldGetStatus.java:37)
      at org.tmatesoft.svn.core.internal.wc.SVNStatusEditor.sendUnversionedStatus(SVNStatusEditor.java:361)
      at org.tmatesoft.svn.core.internal.wc.SVNStatusEditor.getDirStatus(SVNStatusEditor.java:209)
      at org.tmatesoft.svn.core.internal.wc.SVNStatusEditor.handleDirEntry(SVNStatusEditor.java:321)
      at org.tmatesoft.svn.core.internal.wc.SVNStatusEditor.getDirStatus(SVNStatusEditor.java:256)
      at org.tmatesoft.svn.core.internal.wc.SVNStatusEditor.handleDirEntry(SVNStatusEditor.java:321)
      at org.tmatesoft.svn.core.internal.wc.SVNStatusEditor.getDirStatus(SVNStatusEditor.java:256)
      at org.tmatesoft.svn.core.internal.wc.SVNStatusEditor.closeEdit(SVNStatusEditor.java:114)
      at org.tmatesoft.svn.core.internal.wc16.SVNStatusClient16.doStatus(SVNStatusClient16.java:430)
      at org.tmatesoft.svn.core.internal.wc2.old.SvnOldGetStatus.run(SvnOldGetStatus.java:22)
      at org.tmatesoft.svn.core.internal.wc2.old.SvnOldGetStatus.run(SvnOldGetStatus.java:13)
      at org.tmatesoft.svn.core.internal.wc2.SvnOperationRunner.run(SvnOperationRunner.java:20)
      at org.tmatesoft.svn.core.wc2.SvnOperationFactory.run(SvnOperationFactory.java:1235)
      at org.tmatesoft.svn.core.wc2.SvnOperation.run(SvnOperation.java:291)
      at org.tmatesoft.svn.core.wc.SVNStatusClient.doStatus(SVNStatusClient.java:360)
      at hudson.scm.subversion.UpdateWithCleanUpdater$TaskImpl.preUpdate(UpdateWithCleanUpdater.java:66)
      at hudson.scm.subversion.UpdateUpdater$TaskImpl.perform(UpdateUpdater.java:151)
      at hudson.scm.subversion.WorkspaceUpdater$UpdateTask.delegateTo(WorkspaceUpdater.java:153)
      at hudson.scm.SubversionSCM$CheckOutTask.perform(SubversionSCM.java:903)
      at hudson.scm.SubversionSCM$CheckOutTask.invoke(SubversionSCM.java:884)
      at hudson.scm.SubversionSCM$CheckOutTask.invoke(SubversionSCM.java:867)
      at hudson.FilePath.act(FilePath.java:906)
      at hudson.FilePath.act(FilePath.java:879)
      at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:843)
      at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:781)
      at hudson.model.AbstractProject.checkout(AbstractProject.java:1387)
      at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:676)
      at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88)
      at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:581)
      at hudson.model.Run.execute(Run.java:1593)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
      at hudson.model.ResourceController.execute(ResourceController.java:88)
      at hudson.model.Executor.run(Executor.java:247)
      Caused by: svn: E204900: Unable to delete ...\target\cobertura\report\coverage.xml
      at org.tmatesoft.svn.core.SVNErrorMessage.create(SVNErrorMessage.java:109)
      ... 37 more
      Caused by: java.io.IOException: Unable to delete ...\target\cobertura\report\coverage.xml
      at hudson.Util.deleteFile(Util.java:253)
      at hudson.Util.deleteRecursive(Util.java:305)
      at hudson.Util.deleteContentsRecursive(Util.java:202)
      at hudson.Util.deleteRecursive(Util.java:296)
      at hudson.Util.deleteContentsRecursive(Util.java:202)
      at hudson.Util.deleteRecursive(Util.java:296)
      at hudson.Util.deleteContentsRecursive(Util.java:202)
      at hudson.Util.deleteRecursive(Util.java:296)
      at hudson.scm.subversion.UpdateWithCleanUpdater$TaskImpl$1.handleStatus(UpdateWithCleanUpdater.java:74)
      ... 36 more
      ERROR: Subversion update failedERROR: Failed to update svn://...

      The target\cobertura\report\coverage.xml is result of ant build step. I think that the Cobertura Plugin contains the file descriptor leaks. At the result, I need restart the Jenkins.

        Attachments

          Activity

          Hide
          stevejxsn Steve Jackson added a comment -

          I'm still seeing this on Windows 7 in Jenkins 1.5.27 using the 1.9.2 version of the cobertura-plugin.

          Show
          stevejxsn Steve Jackson added a comment - I'm still seeing this on Windows 7 in Jenkins 1.5.27 using the 1.9.2 version of the cobertura-plugin.
          Hide
          w25r William Lichtenberger added a comment -

          I am seeing this issue after upgrading to 1.9.2. It is on Linux though. The plugin does not appear to play nicely with deleting the workspace before the next build.

          I'm going to try excluding that file as a work around.

          This didn't work. #realTime

          It made it past deleting the workspace but eventually tried deleting that file during the build. It appears that there is some sort of process that holds on to that file for a minute or two after the build is complete? Should this be a new bug?

          Show
          w25r William Lichtenberger added a comment - I am seeing this issue after upgrading to 1.9.2. It is on Linux though. The plugin does not appear to play nicely with deleting the workspace before the next build. I'm going to try excluding that file as a work around. This didn't work. #realTime It made it past deleting the workspace but eventually tried deleting that file during the build. It appears that there is some sort of process that holds on to that file for a minute or two after the build is complete? Should this be a new bug?
          Hide
          marc Marc Reder added a comment -

          I have the same problem on three build slaves (Windows Server 2008 R2) with some build jobs.
          Currently i remove the lock on the coverage.xml with the tool "unlocker".

          Jenkins: 1.504
          Cobertura Plugin: 1.8

          Show
          marc Marc Reder added a comment - I have the same problem on three build slaves (Windows Server 2008 R2) with some build jobs. Currently i remove the lock on the coverage.xml with the tool "unlocker". Jenkins: 1.504 Cobertura Plugin: 1.8
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: kunigaku
          Path:
          src/main/java/hudson/plugins/cobertura/CoberturaPublisher.java
          http://jenkins-ci.org/commit/cobertura-plugin/3d7a8d2b276d4c534a07f4cda3314e2f22106cbe
          Log:
          Fix JENKINS-18858

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: kunigaku Path: src/main/java/hudson/plugins/cobertura/CoberturaPublisher.java http://jenkins-ci.org/commit/cobertura-plugin/3d7a8d2b276d4c534a07f4cda3314e2f22106cbe Log: Fix JENKINS-18858
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Seiji Sogabe
          Path:
          src/main/java/hudson/plugins/cobertura/CoberturaPublisher.java
          http://jenkins-ci.org/commit/cobertura-plugin/cf35b92937ffc7b64cf88c43de482376bf56a3f3
          Log:
          Merge pull request #19 from kunigaku/file-leak

          Fix JENKINS-18858

          Compare: https://github.com/jenkinsci/cobertura-plugin/compare/d04c87d72915...cf35b92937ff

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Seiji Sogabe Path: src/main/java/hudson/plugins/cobertura/CoberturaPublisher.java http://jenkins-ci.org/commit/cobertura-plugin/cf35b92937ffc7b64cf88c43de482376bf56a3f3 Log: Merge pull request #19 from kunigaku/file-leak Fix JENKINS-18858 Compare: https://github.com/jenkinsci/cobertura-plugin/compare/d04c87d72915...cf35b92937ff

            People

            • Assignee:
              sogabe sogabe
              Reporter:
              romaerzhuk Roman Erzhukov
            • Votes:
              6 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

              • Created:
                Updated: