SonarLint 10.6 Eclipse Plugin is freezing/crashing Eclipse 24_06

  • Operating system:
    Windows Windows 11 Pro

  • PC
    AMD Ryzen 9 5950X 16-Core Processor
    64,0 GB RAM

  • SonarLint plugin version:
    10.6

  • Programming language you’re coding in:
    Java Gradle Project

  • Is connected mode used:
    Connected to SonarCloud or SonarQube (and which version):
    The freeze occurs before I use it.

  • And a thorough description of the problem / question:

I deleted eclipse completely. Then I installed eclipse 24_06 completely new. I imported a githhub Java Project. The currently used plugins are: Checkstyle Plug-on 10.18.1, Eclipse m2e - Maven support in Eclipse IDE Latest, Eclipse Marketplace Client 1.10.3, TM Terminal CDT 11-6 (2024-06).

At this point everthing works. But when I add SonarLint 10.6 eclipse freezes, after restart. One can see that in the tab “Progress” its currently trying to “Refreshing workspace”… but it halts/stalls at a certain file of the project (/svws-server/.settings/org.eclipse.jdt.core.prefs). The CPU is also working all the time, there are several “Java TM” processeses using CPU.

I also tried configuring SonarLint, but clicking on “Windows > Preferences > SonarLint” leads to eclipse not responding, and then of eclipse crashing.

The problem is reproduceable.

The problem is solvable, if I deinstall the SolarLint plugin.

I would appreciate any help here.
Sincerely Benjamin

Hey there.

It sounds like obtaining some thread dumps would be very useful for debugging the situation.

… here is some part of the log file. There are much more lines.

What I could see is

File content changed: /admin/.settings/org.eclipse.core.runtime.prefs

… this does repeat continously.

SonarLint_Log1.txt (51.2 KB)

… what ist also interesting is, that after killin the process [Refreshing workspace (Cancel Requeted)], SolarLint continues to write log-informations and is not notified properly that the process should be canceled. I still get lines like this:

File content changed: /deployment/linux-installer/.settings/org.eclipse.jdt.core.prefs
[FileSystemSynchronizer#visitDeltaPostChange] Try get file from event 'P/linux-installer' (added/changed) -> 'P/linux-installer' could not be adapted to 'org.sonarlint.eclipse.core.resource.ISonarLintFile'
[FileSystemSynchronizer#visitDeltaPostChange] Try get file from event 'F/linux-installer/.settings' (added/changed) -> 'F/linux-installer/.settings' could not be adapted to 'org.sonarlint.eclipse.core.resource.ISonarLintFile'
[DefaultSonarLintProjectAdapter#files] Try get file of resource 'P/svws-browser-test' -> 'P/svws-browser-test' could not be adapted to 'org.sonarlint.eclipse.core.resource.ISonarLintFile'
File content changed: /linux-installer/.settings/org.eclipse.jdt.core.prefs
[FileSystemSynchronizer#visitDeltaPostChange] Try get file from event 'P/svws-module-reporting' (added/changed) -> 'P/svws-module-reporting' could not be adapted to 'org.sonarlint.eclipse.core.resource.ISonarLintFile'
[FileSystemSynchronizer#visitDeltaPostChange] Try get file from event 'F/svws-module-reporting/.settings' (added/changed) -> 'F/svws-module-reporting/.settings' could not be adapted to 'org.sonarlint.eclipse.core.resource.ISonarLintFile'
File content changed: /svws-module-reporting/.settings/org.eclipse.core.runtime.prefs
File content changed: /svws-module-reporting/.settings/org.eclipse.jdt.core.prefs
[FileSystemSynchronizer#visitDeltaPostChange] Try get file from event 'P/svws-schulen' (added/changed) -> 'P/svws-schulen' could not be adapted to 'org.sonarlint.eclipse.core.resource.ISonarLintFile'
[FileSystemSynchronizer#visitDeltaPostChange] Try get file from event 'F/svws-schulen/.settings' (added/changed) -> 'F/svws-schulen/.settings' could not be adapted to 'org.sonarlint.eclipse.core.resource.ISonarLintFile'

Hey there.

I appreciate the logs, but what I’m really interested in are the thread dumps.

How to get SonarLint thread dumps

In some cases, it can be useful to extract thread dumps from the running instance of your IDE for debugging; thread dumps can help us investigate UI freeze issues or threading problems.

Sorry for not reading it exactly. I tried to create a thread dump but I did not succeed. Here is what I did in Windows PowerShell in the java/bin folder:

PS C:\Program Files\Java\jdk-21\bin> .\jps.exe
10944 GradleDaemon
2916 Jps
13180 org.eclipse.equinox.launcher_1.6.800.v20240513-1750.jar
17244 GradleDaemon
8284 SonarLintServerCli

PS C:\Program Files\Java\jdk-21\bin> ./jstack -F -l 8284 > D:\sonarlint_thread_dump.txt
Error: -F option used
Cannot connect to core dump or remote debug server. Use jhsdb jstack instead
PS C:\Program Files\Java\jdk-21\bin>

I Also tried jhsdb instead but I did not succeed in creating anything.

Okay without “-F” it does fill the txt-file with content.

sonarlint_thread_dump.txt (138.6 KB)

And another Information I forgot to add. A team-member of the same java project also has the same problem with SonarLint 10.6. So the problem is not a “pc”-specific problem. He said that going back to SonarLint 10.5 did help.

Okay, here is some further analysis. The process does not loop forever, it does halt after 82 minutes.

sonarlint_thread_dump_12h_11min.txt (138.6 KB)

Thanks for these data points. I’m escalating them to the right team.

Hi @benjaminbartsch,

thanks for reaching out. I will be investigating this issue.

Can you tell me a bit about the project you imported? Is it big, does it contain multiple sub-projects? I guess you imported the project as a Gradle project or each project as a Java project (JDT) into Eclipse?
Maybe, if the repo is available on GitHub, then you can link it perhaps?

I already have something in mind where it might be coming from but I need a little bit more information here in order to determine the root cause and create a bug ticket.

Best,
Tobias

It is this project:

  • it has subprojects (as far as I understand)
  • I imported it as (as one) Gradle-Project.

Hi @benjaminbartsch,

thanks for the repo. I used it to successfully reproduce the issue you had. I created a ticket and worked on it today to get it done.

The tests done on my side not only showed that the issue was fixed but also the performance improved overall.

The build is currently running and once it is ready I will drop you a dogfooding artifact for testing (probably Monday morning).

Best,
Tobias

Hi @benjaminbartsch,

there is a SonarLint for Eclipse dogfooding artifact ready at the Dogfooding Eclipse Update Site. Please give it a try and check if the freezing / crashing still happens.

I’ve tested with the version of the Eclipse IDE you mentioned as well as using the same repository on Linux, and couldn’t reproduce it anymore.

Best,
Tobias

3 persons of the project (me included) tested it and the problem does not occur anymore.

thank you very much

1 Like

Hi @benjaminbartsch,

thanks for the very positive feedback! The actual release is currently scheduled sometime between the 30th of September - the 2nd of October.

Until then you can use the Dogfooding artifact (aka the latest green master build on our side) and even further if you like. Otherwise, maybe mirror the GitHub release page for the next released version as the next version is releasing there first before any announcement happening on the Community Forum.

Best,
Tobias

We encountered the same problem and I can also verify that the Dogfooding Eclipse Update Site fixed the issue for our Eclipse Workspace (> 100 Java Projects)

3 Likes