SonarLint plugin version: All versions above 10.3.0.77475
Programming language you’re coding in: Java / Typescript
Is connected mode used:
Connected to SonarCloud or SonarQube (and which version):
SonarQube: 10.2.1 (build 78527)
IntelliJ 2023.3.6
And a thorough description of the problem / question:
After updating to a newer version above 10.3.0.77475 every sonar lint task is hanging in IntelliJ
and it will acummulate over time and not be finished. See pic:
Hi @dalemb, thank you for the update, and sorry to hear that SonarLint 10.4.2 did not solve your issue.
To help us investigate the issue more deeply, could you please provide more information about your project? How many modules are there? Is it a large project?
Also, could you please make and attach the following thread dumps while the analysis are stuck:
one for the backend of SonarLint service; That can be done by, e.g., running the jps command from the console to find the id of the JVM process for SonarLintServerCli and then making a dump with jstack <id>
In the meantime, we will keep on investigating this.
Hi nicolas.quinquenel,
apologies for the delayed reply as I was on leave.
It has about 20 modules and is a very large project.
I’ll try to upload the thread dumps, but I need to switch to a newer sonar version again.
I use a downgrade to version 10.3.0.77475 as a workaround.
I’ll inquire about the server logs as well, since I don’t have the rights for it.
Thank you for your reply. We identified a scenario that we missed that could make the synchronization slow. The improvements will be included in the next release, which will happen in the following weeks, and we look forward to your feedback.
First impression looks good, the hanging tasks are gone.
I’m currently still on IntelliJ IDEA 2023.3.6.
I’ll give an update once I’ve the newer version from IntelliJ running.
After a shutting down the laptop and starting it the next morning,
the Sonar PlugIn spawned around 400+ tasks.
It resolved itself after a while and so far that is the only noticable difference to version 10.3.0.77475.
With the current version 10.6.2.78685 I had massiv problems with IntelliJ hanging, disabling the plugin fixed the issue. I was unable to do anything sadly.
I went back to an older version 10.3.0.77475 again and this works fine.
one for the backend of SonarLint service; That can be done by, e.g., running the jps command from the console to find the id of the JVM process for SonarLintServerCli and then making a dump with jstack <id>
Also, we would appreciate it if you could enable the logs and share them with us when the issue happens.
Sorry for the late reply, @dalemb. I would like to ensure whether you are still encountering the issue. We have released new versions since then, which provide improvements. Have you reproduced the issue on the latest version, 10.8.1? If yes, I’d gladly continue the investigation with your help.
Here are my IntelliJ version and plugin version:
IntelliJ IDEA 2024.2.0.2 (Ultimate Edition)
Build #IU-242.20224.419, built on August 19, 2024
Runtime version: 21.0.3+13-b509.4 amd64 (JCEF 122.1.9)
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Toolkit: sun.awt.windows.WToolkit
Windows 11.0
GC: G1 Young Generation, G1 Concurrent GC, G1 Old Generation
Memory: 16384M
Cores: 16
Registry:
ide.experimental.ui=true
ide.images.show.chessboard=true
Non-Bundled Plugins: org.sonarlint.idea (10.8.1.79205)
com.github.copilot (1.5.20.6554)
Jetbrains TeamCity Plugin (2024.03.156166)
Kotlin: 242.20224.419-IJ
Is it possible to identify the root cause of this, with these information?
Hello, the problem seems to be, that the connection to the SonarQube server could not be established anymore. I tried testing the connection within the plugin, but the UI gets stucked at this point:
Hi @nicolas.quinquenel the problem still persist in the newest version.
I’ve looked into the logs and I only could find some issues in the threaddump_freeze.
I’ve attached them, maybe there is something usful in there. threadDumps_freeze081024.zip (709.2 KB)
I now also have an exception for the connection issue:
Validate Connection Task task expired
java.util.concurrent.TimeoutException
at org.sonarlint.intellij.util.FutureUtils.waitForFutureWithTimeout(FutureUtils.java:97)
at org.sonarlint.intellij.util.FutureUtils.waitForTaskWithoutCatching(FutureUtils.java:57)
at org.sonarlint.intellij.util.ThreadUtilsKt.computeOnPooledThreadWithoutCatching(ThreadUtils.kt:65)
at org.sonarlint.intellij.tasks.ConnectionTestTask.compute(ConnectionTestTask.kt:39)
at org.sonarlint.intellij.tasks.ConnectionTestTask.compute(ConnectionTestTask.kt:31)
at com.intellij.openapi.progress.Task$WithResult.run(Task.java:395)
at com.intellij.openapi.progress.impl.CoreProgressManager.startTask(CoreProgressManager.java:477)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.startTask(ProgressManagerImpl.java:133)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcessWithProgressSynchronously$9(CoreProgressManager.java:567)
at com.intellij.openapi.progress.impl.ProgressRunner.lambda$new$0(ProgressRunner.java:85)
at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$4(ProgressRunner.java:249)
at com.intellij.openapi.progress.ProgressManager.lambda$runProcess$0(ProgressManager.java:98)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$1(CoreProgressManager.java:221)
at com.intellij.platform.diagnostic.telemetry.helpers.TraceKt.use(trace.kt:49)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:220)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$13(CoreProgressManager.java:660)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:735)
at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:691)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:659)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:79)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:202)
at com.intellij.openapi.progress.ProgressManager.runProcess(ProgressManager.java:98)
at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$5(ProgressRunner.java:249)
at com.intellij.openapi.progress.impl.ProgressRunner$ProgressRunnable.run(ProgressRunner.java:501)
at com.intellij.openapi.progress.impl.ProgressRunner.lambda$launchTask$18(ProgressRunner.java:466)
at com.intellij.util.concurrency.ChildContext$runAsCoroutine$1.invoke(propagation.kt:92)
at com.intellij.util.concurrency.ChildContext$runAsCoroutine$1.invoke(propagation.kt:92)
at com.intellij.util.concurrency.ChildContext.runAsCoroutine(propagation.kt:97)
at com.intellij.util.concurrency.ChildContext.runAsCoroutine(propagation.kt:92)
at com.intellij.openapi.progress.impl.ProgressRunner.lambda$launchTask$19(ProgressRunner.java:464)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:735)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:732)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:400)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:732)
at java.base/java.lang.Thread.run(Thread.java:1583)
After some time, my SonarLint plugin is no longer able to connect to the SonarQube server.
Btw. by browser i can access the SonarQube server. Only restarting IntelliJ and reconnect to VPN network seems to fix this.