Hi @brampat,
Welcome to the community and thanks for this report!
Can you add sonar.scanner.scm.echoAll=true to your analysis properties and post the log here, please?
Thx,
Ann
Hi @brampat,
Welcome to the community and thanks for this report!
Can you add sonar.scanner.scm.echoAll=true to your analysis properties and post the log here, please?
Thx,
Ann
Hi again @brampat and @martinC,
I actually need you to add 2 parameters:
sonar.verbose=true
sonar.scanner.scm.echoAll=true
Not just the one ![]()
Thx!
Ann
Using the extra verbose logging and echoAll=true we identified this stacktrace:
[DEBUG] Native git blame failed. Falling back to jgit: <redacted/SomeClass.java>
org.apache.commons.exec.ExecuteException: Execution failed (Exit value: -559038737)
at org.apache.commons.exec.DefaultExecutor.lambda$execute$0(DefaultExecutor.java:313)
at java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.lang.IllegalStateException: Couldn't parse author email from: author-mail <First Last@0.0.0.0>
at org.sonar.scm.git.BlameOutputProcessor.process(BlameOutputProcessor.java:59)
at org.sonar.core.util.ProcessWrapperFactory$ProcessWrapper$1.processLine(ProcessWrapperFactory.java:99)
at org.apache.commons.exec.LogOutputStream.processLine(LogOutputStream.java:134)
at org.apache.commons.exec.LogOutputStream.processBuffer(LogOutputStream.java:124)
at org.apache.commons.exec.LogOutputStream.flush(LogOutputStream.java:107)
at org.apache.commons.exec.PumpStreamHandler.stop(PumpStreamHandler.java:315)
at org.apache.commons.exec.DefaultExecutor.executeInternal(DefaultExecutor.java:376)
at org.apache.commons.exec.DefaultExecutor.lambda$execute$0(DefaultExecutor.java:308)
... 1 common frames omitted
The author-mail has been adjusted to follow the pattern but without personal information. Any time a file was committed with git history containing an author email with a space in the name our bitbucket pipeline would timeout.
Adding the option -Dsonar.scm.use.blame.algorithm=GIT_FILES_BLAME as a workaround was successful.
Welcome to the community and thanks for this report!
Could you supply that full log, please?
Thx,
Ann
The broken log, or the log where we use GIT_FILES_BLAME?
I’ll need to scrub company information, will the lines where the problem occurs suffice or is there going to be missing information that would be beneficial?
hi @ganncamp ,
We’re seeing the same issue:
14:27:04.087 INFO ------------- Gather SCA dependencies on project
14:27:04.317 INFO Checking if SCA is enabled for organization XXXX
14:27:04.524 INFO Dependency analysis skipped
14:27:04.526 INFO SCM Publisher SCM provider for this project is: git
14:27:04.526 INFO SCM Publisher 8 source files to be analyzed
14:27:14.527 INFO 6/8 source files have been analyzed
14:27:24.527 INFO 6/8 source files have been analyzed
14:27:34.527 INFO 6/8 source files have been analyzed
14:27:44.528 INFO 6/8 source files have been analyzed
14:27:54.528 INFO 6/8 source files have been analyzed
14:28:04.528 INFO 6/8 source files have been analyzed
We’ve added below to our sonar prepare task:
sonar.scanner.scm.echoAll=true
sonar.scm.use.blame.algorithm=GIT_FILES_BLAME
Any suggestions?
Hi @gwg,
Could you post the logs you get from adding those two parameters? It would be a tremendous help!
And once you’ve done that, the workaround of using sonar.scm.use.blame.algorithm=GIT_FILES_BLAME seems to be working for most (but not all) people.
Thx,
Ann
Please ignore my previous comment
, turns out i was adding the extra config options at a different place
It worked after adding them at right location. Thanks
redacted-sonar.log (75.4 KB)
Provided a redacted log starting from the SCA check output. This uses the verbose echoAll output.
If more output prior to this is needed I can work on redacting and sharing more. (This is using the maven plugin so there is a lot of logging for maven builds and such as well)
The end of the file shows a few lines after I killed the process manually when it was “stuck” on the repeating output [INFO] 3/6 source files have been analyzed
I have also produced a log file with the requested config flags set. Happy to provide it unredacted if there’s any way to set that up.
Possibly of note: I know the email-with-spaces was said to be a red herring, but here’s the final line before task hangs. “Build Service” here being the Azure DevOps Build Service user that would be named similarly for everyone building on Azure DevOps agents (though probably not universal for that user to be making git commits):
2025-07-18T14:15:08.7132890Z 14:15:07.355 DEBUG [CommonsExecStreamPumper-pool-12-thread-1] [stdout] previous 8396aaa8a41cdc04a2195272b7c44505d48a89e9 client/package-lock.json
2025-07-18T14:15:08.7133164Z 14:15:07.355 DEBUG [CommonsExecStreamPumper-pool-12-thread-1] [stdout] filename client/package-lock.json
2025-07-18T14:15:08.7133413Z 14:15:07.355 DEBUG [CommonsExecStreamPumper-pool-12-thread-1] [stdout] "follow-redirects": "^1.15.6",
2025-07-18T14:15:08.7133670Z 14:15:07.355 DEBUG [CommonsExecStreamPumper-pool-12-thread-1] [stdout] 68e1cd7e414300f6a8d26e2b790200a5c08f88a1 3217 3318 2
2025-07-18T14:15:08.7133937Z 14:15:07.355 DEBUG [CommonsExecStreamPumper-pool-12-thread-1] [stdout] author SunStream Build Service (SunStreamServices)
2025-07-18T14:15:08.7134213Z 14:15:07.355 DEBUG [CommonsExecStreamPumper-pool-12-thread-1] [stdout] author-mail <SunStream Build Service (SunStreamServices)>
2025-07-18T14:15:15.4149508Z 14:15:15.414 INFO 4/5 source files have been analyzed
2025-07-18T14:15:25.4150634Z 14:15:25.414 INFO 4/5 source files have been analyzed
2025-07-18T14:15:35.4152667Z 14:15:35.414 INFO 4/5 source files have been analyzed
...
...
2025-07-18T14:51:25.4455422Z 14:51:25.445 INFO 4/5 source files have been analyzed
2025-07-18T14:51:35.4456999Z 14:51:35.445 INFO 4/5 source files have been analyzed
2025-07-18T14:51:38.9073240Z ##[error]The Operation will be canceled. The next steps may not contain expected logs.
2025-07-18T14:51:38.9233805Z ##[error]The operation was canceled.
2025-07-18T14:51:38.9239863Z ##[section]Finishing: SonarCloudAnalyze
I can also confirm that the sonar.scm.use.blame.algorithm=GIT_FILES_BLAME setting worked to get the scan to succeed for us.
Hi @tsorensen-illuminate and @sunstream-dl,
Thanks for the logs and the openness to providing full unredacted logs privately. This is super helpful.
Unfortunately, this landed after Europe already started its weekend. (I know, right?
)
So please don’t think that a lack of immediate movement on this means we’re not grateful or not interested. We’re just human.
And I expect we’ll be back on this first thing Monday morning. So please do keep those logs handy!
Thx,
Ann
Will do
Will do, thanks.
So after adding the config sonar.scm.use.blame.algorithm=GIT_FILES_BLAME in our Azure pipeline this worked.
However I’m confused as to what this config does and how it resolved the issue.
I’ve attached a log snippet with redacted info. It seemed to point to one test file in particular however I haven’t spotted anything unusual with the file. Could it be to do with commit authors/ messages?
07:34:27.263 DEBUG [CommonsExecStreamPumper-pool-42-thread-1] [stdout] summary <redacted commit-summary>
07:34:27.263 DEBUG [CommonsExecStreamPumper-pool-42-thread-1] [stdout] previous d63e5959ace3f9503c96235539966eb7d903fd8a <redacted-filepath>/<redacted-file>.spec.ts
07:34:27.263 DEBUG [CommonsExecStreamPumper-pool-42-thread-1] [stdout] filename <redacted-filepath>/<redacted-file>.spec.ts
07:34:27.263 DEBUG [CommonsExecStreamPumper-pool-42-thread-1] [stdout] expect(<redacted-test>).<redacted method>();
07:34:27.263 DEBUG [CommonsExecStreamPumper-pool-42-thread-1] [stdout] ebb9fcf49206ee3c5875344e03bdd915d286ce07 457 517
07:34:27.263 DEBUG [CommonsExecStreamPumper-pool-42-thread-1] [stdout] author <redacted-author>
07:34:27.263 DEBUG [CommonsExecStreamPumper-pool-42-thread-1] [stdout] author-mail <redacted-author-email>
07:34:27.263 DEBUG [CommonsExecStreamPumper-pool-42-thread-1] [stdout] author-time 1749636284
07:34:27.263 DEBUG [CommonsExecStreamPumper-pool-42-thread-1] [stdout] author-tz +0100
07:34:27.263 DEBUG [CommonsExecStreamPumper-pool-42-thread-1] [stdout] committer <redacted-author>
07:34:27.263 DEBUG [CommonsExecStreamPumper-pool-42-thread-1] [stdout] committer-mail <redacted-author-email>
07:34:27.263 DEBUG [CommonsExecStreamPumper-pool-42-thread-1] [stdout] committer-time 1752763182
07:34:27.263 DEBUG [CommonsExecStreamPumper-pool-42-thread-1] [stdout] committer-tz +0000
07:34:27.263 DEBUG [CommonsExecStreamPumper-pool-42-thread-1] [stdout] summary <redacted commit summary>
07:34:27.263 DEBUG [CommonsExecStreamPumper-pool-42-thread-1] [stdout] previous d63e5959ace3f9503c96235539966eb7d903fd8a <redacted-filepath>/<redacted-file>.spec.ts
07:34:27.263 DEBUG [CommonsExecStreamPumper-pool-42-thread-1] [stdout] filename <redacted-filepath>/<redacted-file>.spec.ts
07:34:27.263 DEBUG [CommonsExecStreamPumper-pool-42-thread-1] [stdout] });
07:34:27.263 DEBUG [CommonsExecStreamPumper-pool-42-thread-1] [stdout] 2412b7ed77ab68ad528275df8461c875974fe6e8 25 518 1
07:34:27.263 DEBUG [CommonsExecStreamPumper-pool-42-thread-1] [stdout] author <redacted-author>
07:34:27.263 DEBUG [CommonsExecStreamPumper-pool-42-thread-1] [stdout] author-mail <redacted-author-email>
07:34:27.263 DEBUG [CommonsExecStreamPumper-pool-42-thread-1] [stdout] author-time 1601375779
07:34:27.263 DEBUG [CommonsExecStreamPumper-pool-42-thread-1] [stdout] author-tz +0100
07:34:27.263 DEBUG [CommonsExecStreamPumper-pool-42-thread-1] [stdout] committer <redacted-author>
07:34:27.263 DEBUG [CommonsExecStreamPumper-pool-42-thread-1] [stdout] committer-mail <redacted-author-email>
07:34:27.263 DEBUG [CommonsExecStreamPumper-pool-42-thread-1] [stdout] committer-time 1601375779
07:34:27.263 DEBUG [CommonsExecStreamPumper-pool-42-thread-1] [stdout] committer-tz +0100
07:34:27.263 DEBUG [CommonsExecStreamPumper-pool-42-thread-1] [stdout] summary <redacted commit summary>
07:34:27.263 DEBUG [CommonsExecStreamPumper-pool-42-thread-1] [stdout] filename <redacted-filepath>/<redacted filename>
07:34:27.263 DEBUG [CommonsExecStreamPumper-pool-42-thread-1] [stdout] });
07:34:27.299 DEBUG [git-scm-1] Command [[git, --git-dir, /home/vsts/work/1/s/.git, -C, /home/vsts/work/1/s, blame, --line-porcelain, -w, --, <redacted-filepath>/<redacted-filename>.spec.ts]] executed with exit value [0]
07:34:35.557 INFO 10/11 source files have been analyzed
07:34:45.558 INFO 10/11 source files have been analyzed
07:34:55.558 INFO 10/11 source files have been analyzed
07:35:05.558 INFO 10/11 source files have been analyzed
07:35:15.558 INFO 10/11 source files have been analyzed
07:35:25.558 INFO 10/11 source files have been analyzed
07:35:35.559 INFO 10/11 source files have been analyzed
07:35:45.559 INFO 10/11 source files have been analyzed
07:35:55.559 INFO 10/11 source files have been analyzed
07:36:05.559 INFO 10/11 source files have been analyzed
07:36:15.560 INFO 10/11 source files have been analyzed
07:36:25.560 INFO 10/11 source files have been analyzed
07:36:35.560 INFO 10/11 source files have been analyzed
07:36:45.560 INFO 10/11 source files have been analyzed
07:36:55.560 INFO 10/11 source files have been analyzed
07:37:05.561 INFO 10/11 source files have been analyzed
07:37:15.561 INFO 10/11 source files have been analyzed
07:37:25.561 INFO 10/11 source files have been analyzed
07:37:35.561 INFO 10/11 source files have been analyzed
07:37:45.561 INFO 10/11 source files have been analyzed
07:37:55.562 INFO 10/11 source files have been analyzed
07:38:05.562 INFO 10/11 source files have been analyzed
07:38:15.562 INFO 10/11 source files have been analyzed
07:38:25.562 INFO 10/11 source files have been analyzed
07:38:35.563 INFO 10/11 source files have been analyzed
07:38:45.563 INFO 10/11 source files have been analyzed
07:38:55.563 INFO 10/11 source files have been analyzed
07:39:05.564 INFO 10/11 source files have been analyzed
07:39:15.564 INFO 10/11 source files have been analyzed
07:39:25.564 INFO 10/11 source files have been analysed
##[error]The Operation will be canceled. The next steps may not contain expected logs.
##[error]The operation was canceled.
Finishing: SonarCloud Analyze
Could it have something to do with the following param?
steps:
- task: SonarCloudAnalyze@3
displayName: SonarCloud Analyze
continueOnError: true
Hi @martinC,
We initially discounted spaces in committers’ emails as a red herring, but the other two extraverbose logs we’ve gotten point back to that. Can you check the emails in your original log and see if there’s an email with a space in it?
Thx,
Ann
Reason why I asked is that we’ve updated our pipeline lib to include that param (among other things) and when I switched to the previous version, the Sonarcloud analyze step finished just fine, but failed on the quality gate. I’m going to try and get that logging on our most recent version of the pipelin lib, which uses that param and see what it says.
Also, sidenote: in both cases, the issue only happened on the develop branch, after a pull-request was merged (main branch is called ‘master’) while on the branch / pull-request, there was no issue (as in: Sonarcloud scan finished just fine).
I added the line:
sonar.scm.use.blame.algorithm=GIT_FILES_BLAME
And this seems to resolve the issue. Do you still need / like the debug-logs? Lemme know which specific parts plz. I’ll have to scrub some info from it.
Just wanted to chime in and say that we experienced the same issue and this SonarCloud analysis gets stuck at 12/13 files - #59 by brampat resolved it for us. Thanks.