SonarLint 10.4.1 crashes with thread "httpclient-dispatch-4" out of memory

  • Operating system: macOS Sonoma Version 14.4 (23E214)
  • SonarLint plugin version: 10.4.1.77998
  • Programming language you’re coding in: TypeScript/SCSS
  • Is connected mode used:
    • Tried both, it does not matter.

The current SonarLint 10.4.1 won’t start, it eats all available memory and dies. When disabling auto-triggering of analysis, the same crash happens on the first manual run. It does not matter if I use connected or local mode.

Downgrading to previous 10.4 solves the issue.

Log (names/key replaced by **)

Starting the SonarLint service process...
Listing SonarLint service files:
/**/PhpStorm2023.3/plugins/sonarlint-intellij/sloop
/**/PhpStorm2023.3/plugins/sonarlint-intellij/sloop/lib
/**/PhpStorm2023.3/plugins/sonarlint-intellij/sloop/lib/spring-context-5.3.30.jar
/**/PhpStorm2023.3/plugins/sonarlint-intellij/sloop/lib/sonar-markdown-9.4.0.54424.jar
/**/PhpStorm2023.3/plugins/sonarlint-intellij/sloop/lib/commons-csv-1.10.0.jar
/**/PhpStorm2023.3/plugins/sonarlint-intellij/sloop/lib/xodus-openAPI-2.0.1.jar
/**/PhpStorm2023.3/plugins/sonarlint-intellij/sloop/lib/xodus-environment-2.0.1.jar
/**/PhpStorm2023.3/plugins/sonarlint-intellij/sloop/lib/kotlin-logging-1.7.9.jar
/**/PhpStorm2023.3/plugins/sonarlint-intellij/sloop/lib/slf4j-api-1.7.36.jar
/**/PhpStorm2023.3/plugins/sonarlint-intellij/sloop/lib/org.eclipse.lsp4j.jsonrpc-0.21.1.jar
/**/PhpStorm2023.3/plugins/sonarlint-intellij/sloop/lib/sonarlint-telemetry-10.0.2.77223.jar
/**/PhpStorm2023.3/plugins/sonarlint-intellij/sloop/lib/javax.annotation-api-1.3.2.jar
/**/PhpStorm2023.3/plugins/sonarlint-intellij/sloop/lib/j2objc-annotations-2.8.jar
/**/PhpStorm2023.3/plugins/sonarlint-intellij/sloop/lib/commons-io-2.11.0.jar
/**/PhpStorm2023.3/plugins/sonarlint-intellij/sloop/lib/spring-core-5.3.30.jar
/**/PhpStorm2023.3/plugins/sonarlint-intellij/sloop/lib/sonar-classloader-1.0.jar
/**/PhpStorm2023.3/plugins/sonarlint-intellij/sloop/lib/commons-compress-1.24.0.jar
/**/PhpStorm2023.3/plugins/sonarlint-intellij/sloop/lib/picocli-4.7.3.jar
/**/PhpStorm2023.3/plugins/sonarlint-intellij/sloop/lib/sonarlint-plugin-commons-10.0.2.77223.jar
/**/PhpStorm2023.3/plugins/sonarlint-intellij/sloop/lib/spring-aop-5.3.30.jar
/**/PhpStorm2023.3/plugins/sonarlint-intellij/sloop/lib/sonarlint-rule-extractor-10.0.2.77223.jar
/**/PhpStorm2023.3/plugins/sonarlint-intellij/sloop/lib/sonarlint-server-connection-10.0.2.77223.jar
/**/PhpStorm2023.3/plugins/sonarlint-intellij/sloop/lib/xodus-entity-store-2.0.1.jar
/**/PhpStorm2023.3/plugins/sonarlint-intellij/sloop/lib/checker-qual-3.33.0.jar
/**/PhpStorm2023.3/plugins/sonarlint-intellij/sloop/lib/sonarlint-rpc-protocol-10.0.2.77223.jar
/**/PhpStorm2023.3/plugins/sonarlint-intellij/sloop/lib/logback-core-1.2.13.jar
/**/PhpStorm2023.3/plugins/sonarlint-intellij/sloop/lib/sonarlint-plugin-api-10.0.2.77223.jar
/**/PhpStorm2023.3/plugins/sonarlint-intellij/sloop/lib/failureaccess-1.0.1.jar
/**/PhpStorm2023.3/plugins/sonarlint-intellij/sloop/lib/gson-2.10.jar
/**/PhpStorm2023.3/plugins/sonarlint-intellij/sloop/lib/xodus-vfs-2.0.1.jar
/**/PhpStorm2023.3/plugins/sonarlint-intellij/sloop/lib/annotations-13.0.jar
/**/PhpStorm2023.3/plugins/sonarlint-intellij/sloop/lib/sonarlint-backend-cli-10.0.2.77223.jar
/**/PhpStorm2023.3/plugins/sonarlint-intellij/sloop/lib/xodus-compress-2.0.1.jar
/**/PhpStorm2023.3/plugins/sonarlint-intellij/sloop/lib/spring-jcl-5.3.30.jar
/**/PhpStorm2023.3/plugins/sonarlint-intellij/sloop/lib/sonar-channel-4.2.jar
/**/PhpStorm2023.3/plugins/sonarlint-intellij/sloop/lib/sonarlint-http-10.0.2.77223.jar
/**/PhpStorm2023.3/plugins/sonarlint-intellij/sloop/lib/sonar-scanner-protocol-7.9.jar
/**/PhpStorm2023.3/plugins/sonarlint-intellij/sloop/lib/spring-beans-5.3.30.jar
/**/PhpStorm2023.3/plugins/sonarlint-intellij/sloop/lib/sonar-plugin-api-10.1.0.809.jar
/**/PhpStorm2023.3/plugins/sonarlint-intellij/sloop/lib/kotlin-stdlib-common-1.6.21.jar
/**/PhpStorm2023.3/plugins/sonarlint-intellij/sloop/lib/listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar
/**/PhpStorm2023.3/plugins/sonarlint-intellij/sloop/lib/protobuf-java-3.25.1.jar
/**/PhpStorm2023.3/plugins/sonarlint-intellij/sloop/lib/httpclient5-5.2.1.jar
/**/PhpStorm2023.3/plugins/sonarlint-intellij/sloop/lib/sonarlint-rpc-impl-10.0.2.77223.jar
/**/PhpStorm2023.3/plugins/sonarlint-intellij/sloop/lib/jul-to-slf4j-1.7.36.jar
/**/PhpStorm2023.3/plugins/sonarlint-intellij/sloop/lib/xodus-utils-2.0.1.jar
/**/PhpStorm2023.3/plugins/sonarlint-intellij/sloop/lib/httpcore5-h2-5.2.jar
/**/PhpStorm2023.3/plugins/sonarlint-intellij/sloop/lib/commons-codec-1.15.jar
/**/PhpStorm2023.3/plugins/sonarlint-intellij/sloop/lib/error_prone_annotations-2.18.0.jar
/**/PhpStorm2023.3/plugins/sonarlint-intellij/sloop/lib/kotlin-stdlib-1.6.21.jar
/**/PhpStorm2023.3/plugins/sonarlint-intellij/sloop/lib/sonarlint-commons-10.0.2.77223.jar
/**/PhpStorm2023.3/plugins/sonarlint-intellij/sloop/lib/sslcontext-kickstart-8.1.6.jar
/**/PhpStorm2023.3/plugins/sonarlint-intellij/sloop/lib/httpcore5-5.2.jar
/**/PhpStorm2023.3/plugins/sonarlint-intellij/sloop/lib/sonarlint-server-api-10.0.2.77223.jar
/**/PhpStorm2023.3/plugins/sonarlint-intellij/sloop/lib/commons-lang-2.6.jar
/**/PhpStorm2023.3/plugins/sonarlint-intellij/sloop/lib/logback-classic-1.2.13.jar
/**/PhpStorm2023.3/plugins/sonarlint-intellij/sloop/lib/commons-lang3-3.12.0.jar
/**/PhpStorm2023.3/plugins/sonarlint-intellij/sloop/lib/guava-32.1.1-jre.jar
/**/PhpStorm2023.3/plugins/sonarlint-intellij/sloop/lib/sonarlint-analysis-engine-10.0.2.77223.jar
/**/PhpStorm2023.3/plugins/sonarlint-intellij/sloop/lib/sonarlint-core-10.0.2.77223.jar
/**/PhpStorm2023.3/plugins/sonarlint-intellij/sloop/lib/spring-expression-5.3.30.jar
/**/PhpStorm2023.3/plugins/sonarlint-intellij/sloop/lib/javax.inject-1.jar
Using JRE from /Users/**/Applications/PhpStorm.app/Contents/jbr/Contents/Home
Migrating the storage...
Listening for SonarLint service exit...
Initializing the SonarLint service...
SonarLint backend started, instance=org.sonarsource.sonarlint.core.rpc.impl.SonarLintRpcServerImpl@41005828
Analysis skipped as the engine is not ready yet
Started embedded server on port 64120
SonarLint service initialized...
[SYNC] Synchronizing taint issues for project '**' on branch 'master'
Downloaded plugin list in 68ms
[SYNC] Synchronizing analyzer configuration for project '**'
Downloaded settings in 149ms
[SYNC] Active rules for 'cloudformation' are up-to-date
[SYNC] Active rules for 'css' are up-to-date
[SYNC] Active rules for 'docker' are up-to-date
[SYNC] Active rules for 'js' are up-to-date
[SYNC] Active rules for 'kotlin' are up-to-date
[SYNC] Active rules for 'kubernetes' are up-to-date
[SYNC] Active rules for 'php' are up-to-date
[SYNC] Active rules for 'py' are up-to-date
[SYNC] Active rules for 'ruby' are up-to-date
[SYNC] Active rules for 'scala' are up-to-date
[SYNC] Active rules for 'secrets' are up-to-date
[SYNC] Active rules for 'terraform' are up-to-date
[SYNC] Active rules for 'ts' are up-to-date
[SYNC] Active rules for 'web' are up-to-date
[SYNC] Active rules for 'xml' are up-to-date
[SYNC] Active rules for 'yaml' are up-to-date
Synchronizing project branches for project '**'
[SYNC] Synchronizing issues for project '**' on branch 'master'
[SYNC] Synchronizing taint issues for project '**' on branch 'master'
[SYNC] Synchronizing hotspots for project '**' on branch 'master'
Did synchronize config scopes [/Users/**/.idea/misc.xml]
[SYNC] Synchronizing issues for project '**' on branch 'master'
[SYNC] Synchronizing taint issues for project '**' on branch 'master'
[SYNC] Synchronizing hotspots for project '**' on branch 'master'
Did synchronize config scopes [**]
StdErr: Exception in thread "httpclient-dispatch-4" java.lang.OutOfMemoryError: Java heap space
StdErr: 	at java.base/java.util.Collections$UnmodifiableCollection.iterator(Collections.java:1050)
StdErr: 	at org.apache.hc.core5.reactor.SingleCoreIOReactor.validateActiveChannels(SingleCoreIOReactor.java:167)
StdErr: 	at org.apache.hc.core5.reactor.SingleCoreIOReactor.doExecute(SingleCoreIOReactor.java:130)
StdErr: 	at org.apache.hc.core5.reactor.AbstractSingleCoreIOReactor.execute(AbstractSingleCoreIOReactor.java:86)
StdErr: 	at org.apache.hc.core5.reactor.IOReactorWorker.run(IOReactorWorker.java:44)
StdErr: 	at java.base/java.lang.Thread.run(Thread.java:840)
StdErr: java.util.concurrent.ExecutionException: java.lang.OutOfMemoryError: Java heap space
StdErr: 	at java.base/java.util.concurrent.FutureTask.report(FutureTask.java:122)
StdErr: 	at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:191)
StdErr: 	at org.eclipse.lsp4j.jsonrpc.json.ConcurrentMessageProcessor$1.get(ConcurrentMessageProcessor.java:54)
StdErr: 	at org.eclipse.lsp4j.jsonrpc.json.ConcurrentMessageProcessor$1.get(ConcurrentMessageProcessor.java:50)
StdErr: 	at org.sonarsource.sonarlint.core.backend.cli.SonarLintServerCli.run(SonarLintServerCli.java:49)
StdErr: 	at org.sonarsource.sonarlint.core.backend.cli.SonarLintServerCli.call(SonarLintServerCli.java:35)
StdErr: 	at org.sonarsource.sonarlint.core.backend.cli.SonarLintServerCli.call(SonarLintServerCli.java:30)
StdErr: 	at picocli.CommandLine.executeUserObject(CommandLine.java:2041)
StdErr: 	at picocli.CommandLine.access$1500(CommandLine.java:148)
StdErr: 	at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2461)
StdErr: 	at picocli.CommandLine$RunLast.handle(CommandLine.java:2453)
StdErr: 	at picocli.CommandLine$RunLast.handle(CommandLine.java:2415)
StdErr: 	at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2273)
StdErr: 	at picocli.CommandLine$RunLast.execute(CommandLine.java:2417)
StdErr: 	at picocli.CommandLine.execute(CommandLine.java:2170)
StdErr: 	at org.sonarsource.sonarlint.core.backend.cli.SonarLintServerCli.main(SonarLintServerCli.java:61)
StdErr: Caused by: java.lang.OutOfMemoryError: Java heap space
StdErr: 	at java.base/java.util.Arrays.copyOfRange(Arrays.java:3822)
StdErr: 	at java.base/java.lang.StringLatin1.newString(StringLatin1.java:769)
StdErr: 	at java.base/java.lang.String.substring(String.java:2714)
StdErr: 	at java.base/java.net.URI$Parser.parseHierarchical(URI.java:3230)
StdErr: 	at java.base/java.net.URI$Parser.parse(URI.java:3177)
StdErr: 	at java.base/java.net.URI.<init>(URI.java:623)
StdErr: 	at java.base/java.net.URI.create(URI.java:904)
StdErr: 	at org.sonarsource.sonarlint.core.rpc.protocol.adapter.UriTypeAdapter.read(UriTypeAdapter.java:47)
StdErr: 	at org.sonarsource.sonarlint.core.rpc.protocol.adapter.UriTypeAdapter.read(UriTypeAdapter.java:30)
StdErr: 	at com.google.gson.internal.bind.TypeAdapters$34$1.read(TypeAdapters.java:1007)
StdErr: 	at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.readIntoField(ReflectiveTypeAdapterFactory.java:212)
StdErr: 	at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$FieldReflectionAdapter.readField(ReflectiveTypeAdapterFactory.java:431)
StdErr: 	at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:391)
StdErr: 	at com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.read(TypeAdapterRuntimeTypeWrapper.java:40)
StdErr: 	at com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.read(CollectionTypeAdapterFactory.java:82)
StdErr: 	at com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.read(CollectionTypeAdapterFactory.java:61)
StdErr: 	at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.readIntoField(ReflectiveTypeAdapterFactory.java:212)
StdErr: 	at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$FieldReflectionAdapter.readField(ReflectiveTypeAdapterFactory.java:431)
StdErr: 	at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:391)
StdErr: 	at com.google.gson.Gson.fromJson(Gson.java:1214)
StdErr: 	at com.google.gson.Gson.fromJson(Gson.java:1173)
StdErr: 	at org.eclipse.lsp4j.jsonrpc.json.adapters.MessageTypeAdapter.fromJson(MessageTypeAdapter.java:344)
StdErr: 	at org.eclipse.lsp4j.jsonrpc.json.adapters.MessageTypeAdapter.parseResult(MessageTypeAdapter.java:189)
StdErr: 	at org.eclipse.lsp4j.jsonrpc.json.adapters.MessageTypeAdapter.read(MessageTypeAdapter.java:124)
StdErr: 	at org.eclipse.lsp4j.jsonrpc.json.adapters.MessageTypeAdapter.read(MessageTypeAdapter.java:56)
StdErr: 	at com.google.gson.Gson.fromJson(Gson.java:1214)
StdErr: 	at com.google.gson.Gson.fromJson(Gson.java:1173)
StdErr: 	at org.eclipse.lsp4j.jsonrpc.json.MessageJsonHandler.parseMessage(MessageJsonHandler.java:119)
StdErr: 	at org.eclipse.lsp4j.jsonrpc.json.MessageJsonHandler.parseMessage(MessageJsonHandler.java:114)
StdErr: 	at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.handleMessage(StreamMessageProducer.java:193)
StdErr: 	at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.listen(StreamMessageProducer.java:94)
StdErr: 	at org.eclipse.lsp4j.jsonrpc.json.ConcurrentMessageProcessor.run(ConcurrentMessageProcessor.java:113)
null
null
null
null
null
null
null
1 Like

Hi @Miloslav_Dornak and welcome to the :sonar: Community.

We are aware of issues that can appear in rare cases while iterating over large number of project files at startup.

We have a custom build which may prevent the issue you are encountering. Could you please follow these steps and see if there is an improvement:

If the issue is still present, please take a thread dump so we can have a better understanding of what could be blocking SonarLint.

Thank you!

Vojtech from :sonarlint:

1 Like

Hello Vojto, in the custom build, the issue is no longer there, thank you.

3 Likes

Thank you for trying the custom build, Miloslav. I’m glad it helped resolve the issue.

The fixies from the custom build will be available in the next official release of :sonarlint_intellij:.

Best,

Vojta

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