StackOverflowError Error during SonarScanner execution

  • ALM used: Azure DevOps
  • CI system used: Azure DevOps
  • Languages of the repository: C#
  • Error observed:
    Today 22-Apr around 9am GMT we started seeing SackOverflowError in all our analysis steps:
Starting: SonarCloud Analyse Run
==============================================================================
Task         : Run Code Analysis
Description  : Run scanner and upload the results to the SonarCloud server.
Version      : 1.21.0
Author       : sonarsource
Help         : Version: 1.21.0. This task is not needed for Maven and Gradle projects since the scanner should be run as part of the build.
<<Ommitted lines>>
INFO: SonarScanner 4.4.0.2170
INFO: Java 11.0.10 AdoptOpenJDK (64-bit)
INFO: Linux 5.4.0-1046-azure amd64
<<Ommitted lines>>

INFO: ------------------------------------------------------------------------
INFO: Total time: 47.419s
INFO: Final Memory: 8M/34M
INFO: ------------------------------------------------------------------------
##[error]ERROR: Error during SonarScanner execution
ERROR: Error during SonarScanner execution
##[error]java.lang.StackOverflowError
java.lang.StackOverflowError
##[error]at java.base/java.util.regex.Pattern$Curly.match(Pattern.java:4372)
	at java.base/java.util.regex.Pattern$Curly.match(Pattern.java:4372)
##[error]at java.base/java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3964)
	at java.base/java.util.regex.Pattern$Curly.match2(Pattern.java:4456)
	at java.base/java.util.regex.Pattern$Curly.match(Pattern.java:4383)
	at java.base/java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3964)
	at java.base/java.util.regex.Pattern$Curly.match2(Pattern.java:4456)
	at java.base/java.util.regex.Pattern$Curly.match(Pattern.java:4383)
	at java.base/java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3964)
	at java.base/java.util.regex.Pattern$Curly.match2(Pattern.java:4456)
	at java.base/java.util.regex.Pattern$Curly.match(Pattern.java:4383)
	at java.base/java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3964)
	at java.base/java.util.regex.Pattern$Curly.match2(Pattern.java:4456)
	at java.base/java.util.regex.Pattern$Curly.match(Pattern.java:4383)
##[error]at java.base/java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3964)
	at java.base/java.util.regex.Pattern$GroupTail.match(Pattern.java:4863)
	at java.base/java.util.regex.Pattern$Curly.match2(Pattern.java:4456)
	at java.base/java.util.regex.Pattern$Curly.match(Pattern.java:4383)
	at java.base/java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3964)
	at java.base/java.util.regex.Pattern$GroupTail.match(Pattern.java:4863)
	at java.base/java.util.regex.Pattern$Curly.match2(Pattern.java:4456)

<<Ommitted lines>>
  • Steps to reproduce
    None
  • Potential workaround
    None

Hi @sdiachen-ss,

Are you using DotCover coverage reports in your CI? If yes, can you share your DotCover report file with us? I can provide a private conversation for this if needed.

Can you please take a look at the beginning of the stack trace to see if it’s related to DotCoverReportParser?

If yes, can you give us a method name from there, where the SO began?

Thanks

1 Like

We’re reverting back to analyzer version 8.20 on SonarCloud to avoid this issue, it should be done in approximately 2 hours from now.

@sdiachen-ss Can you please help us identify the root cause for the bugfix release?

hi @Pavel_Mikula,
Yes, we use DotCover.
I should be able to send the report - let me check on it. Also I’d need some time to change the pipeline to publish it.

We use dotCover 2020.3.2. We did not have any changes to it for some time.
Also, we have other C# projects that run on Jenkins, but they do not use dotCover and they did not experience any failures.

The error log in Azure Pipelines does not contain dotcover reference:

.

Thanks for the quick response - it works now.

Yes, we are very open to helping to resolve this issue. How can we help?

2 Likes

Hi @sdiachen-ss,

Thank you for the DotCover confirmation! We appreciate it.

It would be great if you could share the DotCover html files with us. That should allow us to reproduce the issue with the previous version. You can share them in the private thread that I created.

Thank you

Yes, I can do it early next week.

1 Like

Also, it is not the most recent dotCover version. Should we just try to upgrade?

We’d like to understand the root cause so it would useful to have the reproducer for the StackOverflow as it happened with the old version.

You can update your tool chain independently :slight_smile:

Hi @sdiachen-ss ,

Thank you for sharing the report files with us. It unfortunately doesn’t reproduce in UT on my machine. Do you have set some SONAR_SCANNER_OPTS environment variable or begin step argument in your CI?

Pavel

Pavel,
No, there are no extra properties or smth. Posted a config in private thread.

The problematic part will be reimplemented in 8.24 release of our .NET analyzers.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.