Git Commit hang with Perform SonarLint analysis

  • Java: JetBrains s.r.o. 17.0.5
  • OS: Windows 10(amd64) v10.0
  • IDE: Intellij IDEA 2022.3 (Ultimate) Build #IU-223.7571.182
  • SonarLint plugin version: 7.2.1.58118
  • Connected to SonarQube: 8.9.6

If i want to perform a git commit the commit hang in a “Committing …” if “Perform SonarLint analysis” is selected. Without the selection everything works fine.

3 Likes

Hello @hsh,

Thanks for reporting this problem here :slight_smile:

Could you please extract a thread dump when the UI is hanging and send it to us ? It will help us debug the problem.

Thanks!

Hi,

I have the same problem on Mac OSX - if this adds an extra facet to the problem, I will gladly be of help as well, if I can.

  • IntelliJ IDEA 2022.3 (Ultimate Edition)
    Build #IU-223.7571.182, built on November 29, 2022
    Runtime version: 17.0.5+1-b653.14 x86_64
    VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
  • SonarLint 7.2.1.58118
  • macOS Ventura 13.0.1 (22A400)
  • Connected to SonarCloud

Best Regards

Hello Zeebo!

Thanks for joining this thread. Could you try to follow the instructions in the previous post and send us thread dumps ?

Hi,
sorry for my late reply. Time is money and i have to do my work first.
Ok, when i started my intellij i got 2 Java processes. One for “RemoteMavenServer36” and one unamed (?).

C:\Program Files\JetBrains\IntelliJ IDEA 2021.2\jbr\bin>jps -mlV
17936
1892 org.jetbrains.idea.maven.server.RemoteMavenServer36
23732 jdk.jcmd/sun.tools.jps.Jps -mlV

with full parameters:

17936  exit -Xms128m -Xmx750m -XX:ReservedCodeCacheSize=512m -XX:+UseG1GC -XX:SoftRefLRUPolicyMSPerMB=50 -XX:CICompilerCount=2 -XX:+HeapDumpOnOutOfMemoryError -XX:-OmitStackTraceInFastThrow -XX:+IgnoreUnrecognizedVMOptions -XX:CompileCommand=exclude,com/intellij/openapi/vfs/impl/FilePartNodeRoot,trieDescend -ea -Dsun.io.useCanonCaches=false -Dsun.java2d.metal=true -Djbr.catch.SIGABRT=true -Djdk.http.auth.tunneling.disabledSchemes="" -Djdk.attach.allowAttachSelf=true -Djdk.module.illegalAccess.silent=true -Dkotlinx.coroutines.debug=off -Xmx4096m -Djava.net.preferIPv4Stack=true -Djdk.attach.allowAttachSelf -Dide.usages.page.size=1000 --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac
1892 org.jetbrains.idea.maven.server.RemoteMavenServer36 -Dde.mkgbank.entw.projekte.root=z:\entw\projekte -Dde.mkgbank.entw.bin.root=c:\entw -Djava.awt.headless=true -Dde.mkgbank.entw.properties=c:\entw/etc/mkg.entw.win.properties -Dant.home=c:\entw\ant -Desb.netbeans.home=c:\entw\win\openesb\netbeans -Dmaven.defaultProjectBuilder.disableGlobalModelCache=true -Didea.version=2022.3 -Didea.maven.embedder.version=3.8.1 -Xmx768m -Dmaven.ext.class.path=C:\Program Files\JetBrains\IntelliJ IDEA 2021.2\plugins\maven\lib\maven-event-listener.jar -Dfile.encoding=windows-1252
28716 jdk.jcmd/sun.tools.jps.Jps -mlv -Dapplication.home=C:\Program Files\JetBrains\IntelliJ IDEA 2021.2\jbr -Xms8m -Djdk.module.main=jdk.jcmd

Therefor i make a dump of both processes (dump-1892.txt and dump-17936.txt) for you while intellij hang in the “committing…” dialog.

dump-1892.txt (12.2 KB)
dump-17936.txt (131.9 KB)

Hallo,

today i update my SonarLint plugin to 7.3.0.59206 and now it’s working as it should.

Thanks for the correction (even if it wasn’t reported here).

Hi Henning,

Thanks for updating the thread. It was not reported because we did not do anything :sweat_smile:

Did you update IntelliJ in the meantime ? Could you try to keep an eye on the problem and see if it reappears, and under which circumstances ? Thanks

I’m a bit confused.
After the update this morning everything went great but now after I restarted the Intellij the old effect is back and the program hangs again. :frowning:

Edit:
I always try to keep everything up to date.

  • Intellij IDEA 2022.3.1 (Ultimate) Build #IU-223.8214.52

Have been running into this issue off and on lately, usually cancelling the commit and retrying resolved it. Today I however am consistently running into the issue and retrying does not help. I have to disable the “Perform SonarLint analysis” checkbox to continue.

Manually performing an analysis on VCS changed files works fine.

IntelliJ IDEA 2022.3.1 (Ultimate Edition) Build #IU-223.8214.52
macOS Ventura 13.1
thread-dump-intellij-commit-hang.txt (163.5 KB) (I think this is the right process?)

Hello @Saberos and others,

I finally took the time to have a look at this. I am able to reproduce the problem, and created this ticket. In short there was a regression recently in IntelliJ, in a case that is avoidable since we use an API in a strange way. I’m working on a fix right now, that should be released next week.

Thanks again for raising this issue and using SonarLint!

1 Like

Hi,
i’m just update SonarLint plugin to 7.4.0.60471 and everything works fine now. :+1:

Thanks for the fix.

1 Like

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