SonarTS: CALL_AND_RETRY_LAST Allocation failed- JavaScript heap out of memory

sonarlint
typescript

(Jai Kumar) #1

Hi,

SonarLint on vscode fails. I have tried to close all my applications and disable all extensions on VScode. but I am getting the same error.

Can someone please help?

The error message:

[Info  - 11:34:02 AM] Using storage for server 'sonarqube-1' (last update 10/30/18 12:41 PM)
[Info  - 11:34:03 AM] Starting SonarTS Server
Deploying bundle from `/sonarts-bundle.zip` to `C:\Users\userName\.sonarlint\work\.sonartmp_2011290871417080648\1292654374288304238`
[Error - 11:34:26 AM] FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
[Error - 11:34:30 AM] Failed to start SonarTS Server
[Error - 11:34:30 AM] java.net.SocketTimeoutException: Accept timed out
	at java.net.DualStackPlainSocketImpl.waitForNewConnection(Native Method)
	at java.net.DualStackPlainSocketImpl.socketAccept(Unknown Source)
	at java.net.AbstractPlainSocketImpl.accept(Unknown Source)
	at java.net.PlainSocketImpl.accept(Unknown Source)
	at java.net.ServerSocket.implAccept(Unknown Source)
	at java.net.ServerSocket.accept(Unknown Source)
	at org.sonar.plugin.typescript.ContextualServer.startSonarTSServer(ContextualServer.java:118)
	at org.sonar.plugin.typescript.ContextualServer.start(ContextualServer.java:92)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.invokeMethod(ReflectionLifecycleStrategy.java:110)
	at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.start(ReflectionLifecycleStrategy.java:89)
	at org.sonarsource.sonarlint.core.container.ComponentContainer$1.start(ComponentContainer.java:279)
	at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.start(AbstractInjectionFactory.java:84)
	at org.picocontainer.behaviors.AbstractBehavior.start(AbstractBehavior.java:169)
	at org.picocontainer.behaviors.Stored$RealComponentLifecycle.start(Stored.java:132)
	at org.picocontainer.behaviors.Stored.start(Stored.java:110)
	at org.picocontainer.DefaultPicoContainer.potentiallyStartAdapter(DefaultPicoContainer.java:1016)
	at org.picocontainer.DefaultPicoContainer.startAdapters(DefaultPicoContainer.java:1009)
	at org.picocontainer.DefaultPicoContainer.start(DefaultPicoContainer.java:767)
	at org.sonarsource.sonarlint.core.container.ComponentContainer.startComponents(ComponentContainer.java:124)
	at org.sonarsource.sonarlint.core.container.storage.StorageContainer.doAfterStart(StorageContainer.java:122)
	at org.sonarsource.sonarlint.core.container.ComponentContainer.startComponents(ComponentContainer.java:125)
	at org.sonarsource.sonarlint.core.ConnectedSonarLintEngineImpl.start(ConnectedSonarLintEngineImpl.java:118)
	at org.sonarsource.sonarlint.core.ConnectedSonarLintEngineImpl.<init>(ConnectedSonarLintEngineImpl.java:77)
	at org.sonarlint.languageserver.ConnectedEngineFactory.createEngine(ConnectedEngineFactory.java:74)
	at org.sonarlint.languageserver.ConnectedEngineFactory.create(ConnectedEngineFactory.java:57)
	at org.sonarlint.languageserver.DefaultEngineCache.getOrCreateConnectedEngine(DefaultEngineCache.java:65)
	at org.sonarlint.languageserver.SonarLintLanguageServer.updateBinding(SonarLintLanguageServer.java:340)
	at org.sonarlint.languageserver.SonarLintLanguageServer.initialize(SonarLintLanguageServer.java:253)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.lambda$null$0(GenericEndpoint.java:61)
	at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.request(GenericEndpoint.java:116)
	at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.handleRequest(RemoteEndpoint.java:257)
	at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.consume(RemoteEndpoint.java:186)
	at org.eclipse.lsp4j.jsonrpc.Launcher$Builder.lambda$wrapMessageConsumer$0(Launcher.java:308)
	at org.eclipse.lsp4j.jsonrpc.validation.ReflectiveMessageValidator.consume(ReflectiveMessageValidator.java:71)
	at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.handleMessage(StreamMessageProducer.java:188)
	at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.listen(StreamMessageProducer.java:90)
	at org.eclipse.lsp4j.jsonrpc.json.ConcurrentMessageProcessor.run(ConcurrentMessageProcessor.java:95)
	at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
	at java.util.concurrent.FutureTask.run(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)


(Andrea Guarino) #2

Hi @Jai_Kumar,
I suspect this is related to this issue.
However it would help to have more precise information, like the following:

  • SonarTS version, node version, TypeScript version and memory on your machine.
  • Do you always get the same error?
  • Have you already tried analysing a different project? Did you get the same error?

Andrea


(Jai Kumar) #3

Hi @Andrea_Guarino,

Thanks for the reply. It does look like the issue is related to the what you sent. Do you know if there was a solution or fix?

  • Here are the versions:

    • SonarTS 1.7.0.2893
    • node v6.11.2
    • typescript 2.9.2
  • Yes, it is always the same error

  • I haven’t tried analyzing any other project, but i do know it works for other members of the team.

Hope this info helps!

Thanks,
Jai


(Andrea Guarino) #4

Thanks for your reply.
We didn’t work yet on that ticket, but we will soon.

In the meanwhile could you please also provide how much memory your computer has?
Moreover, could you try upgrading nodejs version and see if you have the same issue?

Thanks.
Andrea