Illegal state from Sonar when scanning sprint boot application

This is a very strange issue, it looks like Sonar which we have integrated into our CI/CD is throwing an exception every other build. NOT every build. But can find no other reports or source that would explain why. Is this a bug in Sonar? OR is it a problem in my code?

    Analyzing 13059 functions to detect bugs.
    Failed to analyze xxx.xxxx.xxx.SomeService#someMethod(Lroot/to/Class;ILjava/util/concurrent/atomic/AtomicInteger;Ljava/util/Set;Lroot/to/another/class;)Ljava/util/Optional; due to an exception; skipping.
    java.lang.IllegalStateException: Incompatible type constraints were ANDed - this should be impossible because the corresponding paths should be eliminated
    	at com.sonarsource.A.A.G.C$_B.A(na:874)
    	at com.sonarsource.A.A.B.F.A(na:2546)
    	at com.sonarsource.A.A.R.C(na:297)
    	at com.sonarsource.A.A.V.A(na:3143)
    	at com.sonarsource.A.A.V.A(na:1340)
    	at com.sonarsource.A.A.V.A(na:920)
    	at com.sonarsource.A.A.V.A(na:12)
    	at com.sonarsource.A.A.V.E(na:2983)
    	at com.sonarsource.A.A.V.A(na:932)
    	at com.sonarsource.A.A.V.B(na:3509)
    	at com.sonarsource.A.A.V.A(na:1908)
    	at com.sonarsource.A.C.executeChecksOnFunction(na:479)
    	at com.sonarsource.A.C.executeChecks(na:1032)
    	at com.sonarsource.A.C.execute(na:3562)
    	at org.sonar.scanner.sensor.AbstractSensorWrapper.analyse(AbstractSensorWrapper.java:62)
    	at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:75)
    	at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:51)
    	at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:64)
    	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:123)
using org.sonarqube  version "4.4.1.3373"

Hi,

Welcome to the community!

Can you give us the version string that appears in your SonarQube page footer, please?

 
Thx,
Ann

Hi, We run Sonar from gradle and capture the files, so not sure what SonarQube page you are talking about, From gradle:
plugins {
id “org.sonarqube” version “4.4.1.3373”
}
Thanks
Gavin

Hi Gavin,

When you analyze… where do your results go?

 
Ann

The results are published on https://sonarcloud.io/
But that works fine, its the gradle build thats failing

If you are able to message me a Zoom link I could maybe show you exactly what I mean?
Thanks
Gavin

Hi Gavin,

You filed this in the SonarQube category, which is why I was asking you for your SonarQube version. I’ll move it to the appropriate category.

Now that I know you’re on a current product version (by definition, SonarCloud is always current)…

Since this problem happens only every other build, I suspect some build agent-side caching is part of what’s going on, but I’m going to flag this for more expert eyes.

 
Ann

Thank you! Sorry I mis-spoke when I say every other, I would say MOST of them but not every build!

Hi @gavin_fitzpatrick ,

Thank you for reporting this problem!

Is this a bug in Sonar?

Yes, this looks like there is a bug in our analyzer!

If your project is open source, please put a link to it so that we can directly reproduce the bug.

Otherwise, if your project is private, you could share with us privately the content of ir/java generated folder ( you should see the full path from the analysis logs, something like Reading IR files from /agent/_work/53/s/target/sonar/ir/java).