Error when executing blame for file

Sonarqube Version 7.9.2.30863

In a jenkins pipeline i’m trying to use multiple sonar-scaner instances, each of them running inside one of multiple docker containers running in parallel. All instances working with one shared folder. That folder contains multiple projects and sonar-scanner in each container scans a single project inside. If parallel container number > 1, it is randomly arises errors like that:

13:38:42 ERROR: Error during SonarQube Scanner execution
13:38:42 java.lang.IllegalStateException: Error when executing blame for file src/ctrl/ctrl_p/application.h
13:38:42 	at org.sonar.plugins.scm.svn.SvnBlameCommand.blame(SvnBlameCommand.java:85)
13:38:42 	at org.sonar.plugins.scm.svn.SvnBlameCommand.blame(SvnBlameCommand.java:58)
13:38:42 	at org.sonar.scanner.scm.ScmPublisher.publish(ScmPublisher.java:81)
13:38:42 	at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:363)
13:38:42 	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)
13:38:42 	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)
13:38:42 	at org.sonar.scanner.bootstrap.GlobalContainer.doAfterStart(GlobalContainer.java:141)
13:38:42 	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)
13:38:42 	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)
13:38:42 	at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:73)
13:38:42 	at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:67)
13:38:42 	at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)
13:38:42 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
13:38:42 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
13:38:42 	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
13:38:42 	at java.base/java.lang.reflect.Method.invoke(Unknown Source)
13:38:42 	at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
13:38:42 	at com.sun.proxy.$Proxy0.execute(Unknown Source)
13:38:42 	at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:185)
13:38:42 	at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:137)
13:38:42 	at org.sonarsource.scanner.cli.Main.execute(Main.java:112)
13:38:42 	at org.sonarsource.scanner.cli.Main.execute(Main.java:75)
13:38:42 	at org.sonarsource.scanner.cli.Main.main(Main.java:61)
13:38:42 Caused by: org.tmatesoft.svn.core.SVNException: svn: E204899: Cannot create new file '/var/lib/jenkins/workspace/test/.svn/tmp/annotate.2.tmp'
13:38:42 	at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:91)
13:38:42 	at org.tmatesoft.svn.core.internal.wc.SVNFileUtil.createEmptyFile(SVNFileUtil.java:397)
13:38:42 	at org.tmatesoft.svn.core.internal.wc.SVNFileUtil.createUniqueFile(SVNFileUtil.java:557)
13:38:42 	at org.tmatesoft.svn.core.internal.wc2.remote.SvnRemoteAnnotate.run(SvnRemoteAnnotate.java:97)
13:38:43 	at org.tmatesoft.svn.core.internal.wc2.remote.SvnRemoteAnnotate.run(SvnRemoteAnnotate.java:30)
13:38:43 	at org.tmatesoft.svn.core.internal.wc2.SvnOperationRunner.run(SvnOperationRunner.java:21)
13:38:43 	at org.tmatesoft.svn.core.wc2.SvnOperationFactory.run(SvnOperationFactory.java:1239)
13:38:43 	at org.tmatesoft.svn.core.wc2.SvnOperation.run(SvnOperation.java:294)
13:38:43 	at org.tmatesoft.svn.core.wc.SVNLogClient.doAnnotate(SVNLogClient.java:295)
13:38:43 	at org.sonar.plugins.scm.svn.SvnBlameCommand.blame(SvnBlameCommand.java:83)
13:38:43 	... 22 more
13:38:43 Caused by: java.lang.Exception
13:38:43 	... 31 more
13:38:43 ERROR: 
13:38:43 ERROR: Re-run SonarQube Scanner using the -X switch to enable full debug logging.

or

13:38:47 ERROR: Error during SonarQube Scanner execution
13:38:47 java.lang.IllegalStateException: Error when executing blame for file src/service/a_service/MonitorTDM.cpp
13:38:47 	at org.sonar.plugins.scm.svn.SvnBlameCommand.blame(SvnBlameCommand.java:85)
13:38:47 	at org.sonar.plugins.scm.svn.SvnBlameCommand.blame(SvnBlameCommand.java:58)
13:38:47 	at org.sonar.scanner.scm.ScmPublisher.publish(ScmPublisher.java:81)
13:38:47 	at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:363)
13:38:47 	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)
13:38:47 	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)
13:38:47 	at org.sonar.scanner.bootstrap.GlobalContainer.doAfterStart(GlobalContainer.java:141)
13:38:47 	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)
13:38:47 	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)
13:38:47 	at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:73)
13:38:47 	at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:67)
13:38:47 	at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)
13:38:47 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
13:38:47 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
13:38:47 	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
13:38:47 	at java.base/java.lang.reflect.Method.invoke(Unknown Source)
13:38:47 	at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
13:38:47 	at com.sun.proxy.$Proxy0.execute(Unknown Source)
13:38:47 	at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:185)
13:38:47 	at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:137)
13:38:47 	at org.sonarsource.scanner.cli.Main.execute(Main.java:112)
13:38:47 	at org.sonarsource.scanner.cli.Main.execute(Main.java:75)
13:38:47 	at org.sonarsource.scanner.cli.Main.main(Main.java:61)
13:38:47 Caused by: org.tmatesoft.svn.core.SVNException: svn: E204899: Cannot create new file '/var/lib/jenkins/workspace/test/.svn/tmp/annotate.tmp'
13:38:47 	at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:91)
13:38:47 	at org.tmatesoft.svn.core.internal.wc.SVNFileUtil.createEmptyFile(SVNFileUtil.java:397)
13:38:47 	at org.tmatesoft.svn.core.internal.wc.SVNFileUtil.createUniqueFile(SVNFileUtil.java:557)
13:38:47 	at org.tmatesoft.svn.core.internal.wc2.remote.SvnRemoteAnnotate.run(SvnRemoteAnnotate.java:97)
13:38:47 	at org.tmatesoft.svn.core.internal.wc2.remote.SvnRemoteAnnotate.run(SvnRemoteAnnotate.java:30)
13:38:47 	at org.tmatesoft.svn.core.internal.wc2.SvnOperationRunner.run(SvnOperationRunner.java:21)
13:38:47 	at org.tmatesoft.svn.core.wc2.SvnOperationFactory.run(SvnOperationFactory.java:1239)
13:38:47 	at org.tmatesoft.svn.core.wc2.SvnOperation.run(SvnOperation.java:294)
13:38:47 	at org.tmatesoft.svn.core.wc.SVNLogClient.doAnnotate(SVNLogClient.java:295)
13:38:47 	at org.sonar.plugins.scm.svn.SvnBlameCommand.blame(SvnBlameCommand.java:83)
13:38:47 	... 22 more
13:38:47 Caused by: java.lang.Exception
13:38:47 	... 31 more
13:38:47 ERROR: 
13:38:47 ERROR: Re-run SonarQube Scanner using the -X switch to enable full debug logging.

Looks like some of blames intersect at one point in time and cannot create tmp file because it already exist? Do you have any idea how to workaround that? Or, can it be suppressed?

Hi,

It’s not designed to work like what you’ve described. Each project should be in its own directory and analysis kicked off from there. Then you shouldn’t have any clashes regardless of whether or not analyses are running in parallel.

 
Ann

1 Like