- Operating system: Windows 10 (10.0, amd64)
- SonarLint plugin version: 8.0.0.63273
SonarLint causes slow startup on IntelliJ IDEA (v2022.3.2 IU-223.8617.56).
After analyzing the thread dumps of IntelliJ IDEA, it looks like it is stuck for ~5s trying to establish some connection java.net.Inet6AddressImpl.getHostByAddr(java.base@17.0.5/Native Method)
, which was initiated by SonarLint plugin org.sonarsource.sonarlint.shaded.org.apache.hc.core5.net.InetAddressUtils.getCanonicalLocalHostName(InetAddressUtils.java:186)
:
Here is a pasted stack trace:
"DefaultDispatcher-worker-55" #76 daemon prio=5 os_prio=0 cpu=406.25ms elapsed=2.33s tid=0x0000013726aa96f0 nid=0x10a8 runnable [0x0000001e08efe000]
java.lang.Thread.State: RUNNABLE
at java.net.Inet6AddressImpl.getHostByAddr(java.base@17.0.5/Native Method)
at java.net.InetAddress$PlatformNameService.getHostByAddr(java.base@17.0.5/InetAddress.java:939)
at java.net.InetAddress.getHostFromNameService(java.base@17.0.5/InetAddress.java:662)
at java.net.InetAddress.getCanonicalHostName(java.base@17.0.5/InetAddress.java:635)
at org.sonarsource.sonarlint.shaded.org.apache.hc.core5.net.InetAddressUtils.getCanonicalLocalHostName(InetAddressUtils.java:186)
at org.sonarsource.sonarlint.shaded.org.apache.hc.core5.http.impl.bootstrap.ServerBootstrap.create(ServerBootstrap.java:326)
at org.sonarsource.sonarlint.core.embedded.server.EmbeddedServer.initialize(EmbeddedServer.java:95)
at org.sonarsource.sonarlint.core.SonarLintBackendImpl.initialize(SonarLintBackendImpl.java:106)
at org.sonarlint.intellij.core.BackendService.initialize(BackendService.kt:87)
at org.sonarlint.intellij.core.BackendService.startOnce(BackendService.kt:77)
at org.sonarlint.intellij.InitializeSonarLintOnStartup.appFrameCreated(InitializeSonarLintOnStartup.kt:28)
at java.lang.invoke.LambdaForm$DMH/0x0000000800710000.invokeInterface(java.base@17.0.5/LambdaForm$DMH)
at java.lang.invoke.LambdaForm$MH/0x0000000800710c00.invoke(java.base@17.0.5/LambdaForm$MH)
at java.lang.invoke.LambdaForm$MH/0x000000080066a800.invokeExact_MT(java.base@17.0.5/LambdaForm$MH)
at com.intellij.util.messages.impl.MessageBusImplKt.invokeMethod(MessageBusImpl.kt:655)
at com.intellij.util.messages.impl.MessageBusImplKt.invokeListener(MessageBusImpl.kt:625)
at com.intellij.util.messages.impl.MessageBusImplKt.deliverMessage(MessageBusImpl.kt:395)
at com.intellij.util.messages.impl.MessageBusImplKt.pumpWaiting(MessageBusImpl.kt:374)
at com.intellij.util.messages.impl.MessageBusImplKt.access$pumpWaiting(MessageBusImpl.kt:1)
at com.intellij.util.messages.impl.MessagePublisher.invoke(MessageBusImpl.kt:433)
at jdk.proxy1.$Proxy50.appFrameCreated(jdk.proxy1/Unknown Source)
at com.intellij.idea.IdeStarter.openProjectIfNeeded$suspendImpl(IdeStarter.kt:91)
at com.intellij.idea.IdeStarter.openProjectIfNeeded(IdeStarter.kt)
at com.intellij.idea.IdeStarter$start$2.invokeSuspend(IdeStarter.kt:72)
at com.intellij.idea.IdeStarter$start$2.invoke(IdeStarter.kt)
at com.intellij.idea.IdeStarter$start$2.invoke(IdeStarter.kt)
at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:89)
at kotlinx.coroutines.CoroutineScopeKt.coroutineScope(CoroutineScope.kt:264)
at com.intellij.idea.IdeStarter.start$suspendImpl(IdeStarter.kt:70)
at com.intellij.idea.IdeStarter.start(IdeStarter.kt)
at com.intellij.idea.ApplicationLoader.initApplicationImpl(ApplicationLoader.kt:169)
at com.intellij.idea.ApplicationLoader.access$initApplicationImpl(ApplicationLoader.kt:1)
at com.intellij.idea.ApplicationLoader$initApplicationImpl$1.invokeSuspend(ApplicationLoader.kt)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664)
During which IntelliJ IDEA hangs on the startup splash screen. When user disables the SonarLint plugin, the startup is fast again.
Link to the original issue: https://youtrack.jetbrains.com/issue/IDEA-314690