Caused by: org.tmatesoft.svn.core.SVNException: svn: E204899: Cannot delete file 'C:\Program Files (x86)\Jenkins\workspace\foo\.svn\tmp\annotate.2.tmp\annotate.tmp'

sonarqube
scanner
svn

(Pops) #1

During the svn blame data scanning phase of few of my jenkins job - this happens.

03:09:06.277 INFO: 29/7453 files analyzed
03:09:16.277 INFO: 29/7453 files analyzed
03:09:26.277 INFO: 29/7453 files analyzed
03:09:36.277 INFO: 29/7453 files analyzed
03:09:46.277 INFO: 29/7453 files analyzed
03:09:56.277 INFO: 29/7453 files analyzed
03:10:06.277 INFO: 29/7453 files analyzed
03:10:16.292 INFO: 29/7453 files analyzed
03:10:26.292 INFO: 29/7453 files analyzed
03:10:36.292 INFO: 29/7453 files analyzed
03:10:46.292 INFO: 29/7453 files analyzed
03:10:56.292 INFO: 29/7453 files analyzed
03:11:06.292 INFO: 29/7453 files analyzed
03:11:16.293 INFO: 29/7453 files analyzed
03:11:26.293 INFO: 29/7453 files analyzed
03:11:36.294 INFO: 29/7453 files analyzed
03:11:46.294 INFO: 29/7453 files analyzed
03:11:50.178 INFO: 29/7453 files analyzed
03:11:50.288 INFO: ------------------------------------------------------------------------
03:11:50.288 INFO: EXECUTION FAILURE
03:11:50.288 INFO: ------------------------------------------------------------------------
03:11:50.288 INFO: Total time: 2:23:01.576s
03:11:50.459 INFO: Final Memory: 21M/2204M
03:11:50.459 INFO: ------------------------------------------------------------------------
03:11:50.459 ERROR: Error during SonarQube Scanner execution
java.lang.IllegalStateException: Error when executing blame for file foo/bar.java
at org.sonar.plugins.scm.svn.SvnBlameCommand.blame(SvnBlameCommand.java:85)
at org.sonar.plugins.scm.svn.SvnBlameCommand.blame(SvnBlameCommand.java:58)
at org.sonar.scanner.scm.ScmPublisher.publish(ScmPublisher.java:85)
at org.sonar.scanner.phases.PublishPhaseExecutor.afterSensors(PublishPhaseExecutor.java:60)
at org.sonar.scanner.phases.AbstractPhaseExecutor.execute(AbstractPhaseExecutor.java:90)
at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:177)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:135)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:121)
at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:291)
at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:286)
at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:264)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:135)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:121)
at org.sonar.scanner.task.ScanTask.execute(ScanTask.java:48)
at org.sonar.scanner.task.TaskContainer.doAfterStart(TaskContainer.java:84)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:135)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:121)
at org.sonar.scanner.bootstrap.GlobalContainer.executeTask(GlobalContainer.java:121)
at org.sonar.batch.bootstrapper.Batch.doExecuteTask(Batch.java:116)
at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:71)
at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
at com.sun.proxy.$Proxy0.execute(Unknown Source)
at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:171)
at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:128)
at org.sonarsource.scanner.cli.Main.execute(Main.java:111)
at org.sonarsource.scanner.cli.Main.execute(Main.java:75)
at org.sonarsource.scanner.cli.Main.main(Main.java:61)
Caused by: org.tmatesoft.svn.core.SVNException: svn: E204899: Cannot delete file ‘C:\Program Files (x86)\Jenkins\workspace\foo.svn\tmp\annotate.2.tmp\annotate.tmp’
at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:70)
at org.tmatesoft.svn.core.internal.wc.SVNFileUtil.deleteFile(SVNFileUtil.java:1350)
at org.tmatesoft.svn.core.internal.wc.SVNFileUtil.deleteAll(SVNFileUtil.java:1322)
at org.tmatesoft.svn.core.internal.wc.SVNFileUtil.deleteAll(SVNFileUtil.java:1313)
at org.tmatesoft.svn.core.internal.wc2.remote.SvnRemoteAnnotate.run(SvnRemoteAnnotate.java:143)
at org.tmatesoft.svn.core.internal.wc2.remote.SvnRemoteAnnotate.run(SvnRemoteAnnotate.java:30)
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 org.tmatesoft.svn.core.wc.SVNLogClient.doAnnotate(SVNLogClient.java:295)
at org.sonar.plugins.scm.svn.SvnBlameCommand.blame(SvnBlameCommand.java:83)
… 31 more
WARN: Unable to locate ‘report-task.txt’ in the workspace. Did the SonarScanner succedeed?
ERROR: SonarQube scanner exited with non-zero code: 1
Finished: FAILURE

which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)

  • Windows Server 2016 standard
  • Sonarqube server - Version 6.7.6 (build 38781) Community Edition
  • Sonarqube svn plugins - Svn 1.8.0.1168 (scmsvn)
  • Svn Server - Version 1.6.6 (r40053)
  • Jenkins- version 2.150.1

** what are you trying to achieve**
get the blame data successfully and scan successfully.

what have you tried so far to achieve this
I have looked up what E204899 means but others do not have the same error as I do(cannot delete file). I can only guess it’s related to not have enough permissions, and have tried to grant full workspace folder control but the error persists. Have also tried deleting the job workspace and rebuild, same story.

I’m not sure what else to do. I can only guess it’s related to the sonarqube svn plugin or svnkit based on the error log. I’m unable to disable blame as requirements forbids. Please advice and thanks in advance.

Thanks,
Eugene