"Java heap space error" with SonarLint version 10.11

  • Operating system: multiple
  • SonarLint plugin version: SonarLint for Eclipse 10.11.0.82462
  • Programming language you’re coding in: Java
  • Is connected mode used:
    • Connected to SonarQube (and which version): Developer Edition v10.6 (92116)

Since we updated from 10.6.0.82217 to 10.10.0.82440 and later to 10.11.0.82462 many developers in our team reported errors due to SonarLint in Eclipse:

With YourKit attached, we see that it seems to be related to some cache from Sonar:

Is there anything we can do to fix or investigate this error?

It is really annoying for the team members experiencing this issue.

1 Like

Hey @jmini, thanks for reaching out to us about this.

We are aware of this issue and are actively working on a solution. This is likely because we are blaming files from your project, and the blaming algorithm takes a lot of memory space to process all your git history. This is especially an issue for massive projects.

I can’t tell you when this will be fixed yet, but we are definitely making progress on this topic. We will keep you updated.

1 Like

Is there some ETA?

Or is the recommendation to switch back to 10.6.0.82217 for now?

Hey @jmini,

my colleague is currently on vacation, so I’ll be taking over. Before Christmas he was starting this investigation but did not conclude yet.

The next release for SonarQube for Eclipse 10.12 is planned for the end of the month but I cannot say for certain that this will be put into this version if this requires a lot of effort. But we will try of course :smile:

If you encounter this issue too often, then yes, please switch back to 10.6.0.82217.

We will keep you posted once everyone is back and we have results for you to work with :smiley:

Best,
Tobias

This is what we implemented for the time being.

Do you have a public issue tracker where I can check when this issue is solved. I will not try to install 10.12 if this is not fixed, or if there is no option to turn off the “blame” feature.

Our project is 10+ years old. So yes the blaming operation takes its time in Eclipse IDE (I use it manually from time to time and it is acceptable for a single file, but computing it on every files locally seems an overkill).

OS : Windows 11
Eclipse version: 2024-12 (4.34.0)
Eclipse Build: Build id: 20241128-0757
Sonar plugin version : 10.12.0.82500
Connected mode : No. Not connected to SonarCube server or cloud.

When I right click on file and ask to Analyse, CPU usage increased for process SonarLintServerCli.
Nothing happens in eclipse, it is stuck at Sonarlint processing file…

On taking thread dump, “SonarLint Server RPC request executor” thread is taking CPU.

It is going in git blame or something. I am not looking for any of this stuff. Just want plain old file analysis. It is trying to use jgit do treewalk for files or something.

dump1.txt (71.0 KB)

The SonarLint eclipse library calculates when each line in submitted file was changed. For this, it uses blame command and using jgit library. It runs endlessly for large project like mine. Don’t know why.

I commented the code which uses blame command. Then I built the sonarlint-core jar and copied new jar in eclipse plugin folder.

Now analysis result comes up very quickly. I am now using latest sonarlint plugin with patched sonarlint-core jar.

Request Sonarlint devs to please add an option in eclipse to bypass the blame.

Hey @RahulT, we appreciate your effort in investigating this issue. As mentioned in my previous message, this has already been identified on our side, and we are still actively working on this. Turning off the blaming would prevent us from computing the date the issue appeared in your project. We will soon develop optimizations that considerably reduce the time spent on this task. SonarQube for IDE is meant to run in near real-time, and I agree that in the current state, on a huge git project, this is not acceptable. Lastly, you can always downgrade to SonarQube for IDE 10.6.0.