Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java.lang.IllegalStateException: Recursive update #660

Closed
danny-su opened this issue Dec 3, 2024 · 6 comments · Fixed by #671
Closed

java.lang.IllegalStateException: Recursive update #660

danny-su opened this issue Dec 3, 2024 · 6 comments · Fixed by #671
Assignees
Labels
bug Something isn't working

Comments

@danny-su
Copy link

danny-su commented Dec 3, 2024

Error while initializing ProjectIndexingDumbAndScanningStrategy

java.lang.IllegalStateException: Recursive update
at java.base/java.util.concurrent.ConcurrentHashMap.replaceNode(ConcurrentHashMap.java:1167)
at java.base/java.util.concurrent.ConcurrentHashMap.remove(ConcurrentHashMap.java:1102)
at com.intellij.util.messages.impl.MessageBusImpl.notifyOnSubscription$intellij_platform_core(MessageBusImpl.kt:250)
at com.intellij.util.messages.impl.BaseBusConnection.subscribe(BaseBusConnection.kt:39)
at com.redhat.devtools.lsp4ij.client.indexing.ProjectIndexingDumbAndScanningStrategy.initialize(ProjectIndexingDumbAndScanningStrategy.java:104)
at com.redhat.devtools.lsp4ij.client.indexing.ProjectIndexingDumbAndScanningStrategy.(ProjectIndexingDumbAndScanningStrategy.java:57)
at com.intellij.platform.instanceContainer.instantiation.InstantiateKt.instantiate$lambda$0(instantiate.kt:46)
at com.intellij.platform.instanceContainer.instantiation.InstantiateKt.instantiate$lambda$8$lambda$7(instantiate.kt:310)
at com.intellij.platform.instanceContainer.instantiation.InstantiateKt.withStoredTemporaryContext(instantiate.kt:328)
at com.intellij.platform.instanceContainer.instantiation.InstantiateKt.instantiate(instantiate.kt:309)
at com.intellij.platform.instanceContainer.instantiation.InstantiateKt.instantiate(instantiate.kt:43)
at com.intellij.serviceContainer.ServiceInstanceInitializer.createInstance$suspendImpl(ServiceInstanceInitializer.kt:30)
at com.intellij.serviceContainer.ServiceInstanceInitializer.createInstance(ServiceInstanceInitializer.kt)
at com.intellij.platform.instanceContainer.internal.LazyInstanceHolder$initialize$1$1.invokeSuspend(LazyInstanceHolder.kt:163)
at com.intellij.platform.instanceContainer.internal.LazyInstanceHolder$initialize$1$1.invoke(LazyInstanceHolder.kt)
at com.intellij.platform.instanceContainer.internal.LazyInstanceHolder$initialize$1$1.invoke(LazyInstanceHolder.kt)
at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:62)
at kotlinx.coroutines.BuildersKt__Builders_commonKt.withContext(Builders.common.kt:163)
at kotlinx.coroutines.BuildersKt.withContext(Unknown Source)
at com.intellij.platform.instanceContainer.internal.LazyInstanceHolder$initialize$1.invokeSuspend(LazyInstanceHolder.kt:161)
at com.intellij.platform.instanceContainer.internal.LazyInstanceHolder$initialize$1.invoke(LazyInstanceHolder.kt)
at com.intellij.platform.instanceContainer.internal.LazyInstanceHolder$initialize$1.invoke(LazyInstanceHolder.kt)
at kotlinx.coroutines.intrinsics.UndispatchedKt.startCoroutineUndispatched(Undispatched.kt:27)
at kotlinx.coroutines.CoroutineStart.invoke(CoroutineStart.kt:90)
at kotlinx.coroutines.AbstractCoroutine.start(AbstractCoroutine.kt:123)
at kotlinx.coroutines.BuildersKt__Builders_commonKt.launch(Builders.common.kt:52)
at kotlinx.coroutines.BuildersKt.launch(Unknown Source)
at com.intellij.platform.instanceContainer.internal.LazyInstanceHolder.initialize(LazyInstanceHolder.kt:146)
at com.intellij.platform.instanceContainer.internal.LazyInstanceHolder.access$initialize(LazyInstanceHolder.kt:14)
at com.intellij.platform.instanceContainer.internal.LazyInstanceHolder.tryInitialize(LazyInstanceHolder.kt:136)
at com.intellij.platform.instanceContainer.internal.LazyInstanceHolder.getInstance(LazyInstanceHolder.kt:96)
at com.intellij.platform.instanceContainer.internal.LazyInstanceHolder.getInstanceInCallerContext$suspendImpl(LazyInstanceHolder.kt:88)
at com.intellij.platform.instanceContainer.internal.LazyInstanceHolder.getInstanceInCallerContext(LazyInstanceHolder.kt)
at com.intellij.serviceContainer.ComponentManagerImplKt$doGetOrCreateInstanceBlocking$1.invokeSuspend(ComponentManagerImpl.kt:1566)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:277)
at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:111)
at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$BuildersKt__BuildersKt(Builders.kt:84)
at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:52)
at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source)
at com.intellij.serviceContainer.ComponentManagerImplKt.runBlockingInitialization$lambda$10(ComponentManagerImpl.kt:1684)
at com.intellij.openapi.progress.ContextKt.prepareThreadContext(context.kt:82)
at com.intellij.serviceContainer.ComponentManagerImplKt.runBlockingInitialization(ComponentManagerImpl.kt:1675)
at com.intellij.serviceContainer.ComponentManagerImplKt.doGetOrCreateInstanceBlocking(ComponentManagerImpl.kt:1565)
at com.intellij.serviceContainer.ComponentManagerImplKt.getOrCreateInstanceBlocking(ComponentManagerImpl.kt:1560)
at com.intellij.serviceContainer.ComponentManagerImpl.doGetService(ComponentManagerImpl.kt:751)
at com.intellij.serviceContainer.ComponentManagerImpl.getService(ComponentManagerImpl.kt:695)
at com.redhat.devtools.lsp4ij.client.indexing.ProjectIndexingDumbAndScanningStrategy.getInstance(ProjectIndexingDumbAndScanningStrategy.java:61)
at com.redhat.devtools.lsp4ij.client.indexing.ProjectIndexingAppLifecycleListener.(ProjectIndexingAppLifecycleListener.java:36)
at com.intellij.serviceContainer.ComponentManagerImpl.findConstructorAndInstantiateClass(ComponentManagerImpl.kt:909)
at com.intellij.serviceContainer.ComponentManagerImpl.doInstantiateClass(ComponentManagerImpl.kt:918)
at com.intellij.serviceContainer.ComponentManagerImpl.instantiateClass(ComponentManagerImpl.kt:903)
at com.intellij.serviceContainer.ComponentManagerImpl.createListener(ComponentManagerImpl.kt:965)
at com.intellij.util.messages.impl.CompositeMessageBus.subscribeLazyListeners$lambda$4(CompositeMessageBus.kt:123)
at com.intellij.openapi.progress.Cancellation.computeInNonCancelableSection(Cancellation.java:114)
at com.intellij.util.messages.impl.CompositeMessageBus.subscribeLazyListeners(CompositeMessageBus.kt:117)
at com.intellij.util.messages.impl.CompositeMessageBus.doComputeSubscribers$intellij_platform_core(CompositeMessageBus.kt:93)
at com.intellij.util.messages.impl.MessageBusImpl.computeSubscribers$intellij_platform_core(MessageBusImpl.kt:243)
at com.intellij.util.messages.impl.CompositeMessageBus.computeSubscribers$intellij_platform_core(CompositeMessageBus.kt:88)
at com.intellij.util.messages.impl.ToDirectChildrenMessagePublisher$publish$handlers$1.invoke(CompositeMessageBus.kt:279)
at com.intellij.util.messages.impl.ToDirectChildrenMessagePublisher$publish$handlers$1.invoke(CompositeMessageBus.kt:279)
at com.intellij.util.messages.impl.ToDirectChildrenMessagePublisher.publish$lambda$0(CompositeMessageBus.kt:279)
at java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1708)
at com.intellij.util.messages.impl.ToDirectChildrenMessagePublisher.publish$intellij_platform_core(CompositeMessageBus.kt:279)
at com.intellij.util.messages.impl.MessagePublisher.invoke(MessageBusImpl.kt:490)
at jdk.proxy2/jdk.proxy2.$Proxy98.appFrameCreated(Unknown Source)
at com.intellij.idea.IdeStarter$openProjectIfNeeded$isOpenProjectNeeded$1$1.invokeSuspend(IdeStarter.kt:123)
at com.intellij.idea.IdeStarter$openProjectIfNeeded$isOpenProjectNeeded$1$1.invoke(IdeStarter.kt)
at com.intellij.idea.IdeStarter$openProjectIfNeeded$isOpenProjectNeeded$1$1.invoke(IdeStarter.kt)
at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:62)
at kotlinx.coroutines.BuildersKt__Builders_commonKt.withContext(Builders.common.kt:163)
at kotlinx.coroutines.BuildersKt.withContext(Unknown Source)
at com.intellij.platform.diagnostic.telemetry.impl.TracerKt.span(tracer.kt:56)
at com.intellij.platform.diagnostic.telemetry.impl.TracerKt.span$default(tracer.kt:48)
at com.intellij.idea.IdeStarter$openProjectIfNeeded$isOpenProjectNeeded$1.invokeSuspend(IdeStarter.kt:121)
at com.intellij.idea.IdeStarter$openProjectIfNeeded$isOpenProjectNeeded$1.invoke(IdeStarter.kt)
at com.intellij.idea.IdeStarter$openProjectIfNeeded$isOpenProjectNeeded$1.invoke(IdeStarter.kt)
at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:62)
at kotlinx.coroutines.BuildersKt__Builders_commonKt.withContext(Builders.common.kt:163)
at kotlinx.coroutines.BuildersKt.withContext(Unknown Source)
at com.intellij.platform.diagnostic.telemetry.impl.TracerKt.span(tracer.kt:56)
at com.intellij.platform.diagnostic.telemetry.impl.TracerKt.span$default(tracer.kt:48)
at com.intellij.idea.IdeStarter.openProjectIfNeeded$suspendImpl(IdeStarter.kt:120)
at com.intellij.idea.IdeStarter.openProjectIfNeeded(IdeStarter.kt)
at com.intellij.idea.IdeStarter$start$2$openProjectBlock$1.invokeSuspend(IdeStarter.kt:81)
at com.intellij.idea.IdeStarter$start$2$openProjectBlock$1.invoke(IdeStarter.kt)
at com.intellij.idea.IdeStarter$start$2$openProjectBlock$1.invoke(IdeStarter.kt)
at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:62)
at kotlinx.coroutines.BuildersKt__Builders_commonKt.withContext(Builders.common.kt:163)
at kotlinx.coroutines.BuildersKt.withContext(Unknown Source)
at com.intellij.idea.IdeStarter$start$2.invokeSuspend(IdeStarter.kt:94)
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:62)
at kotlinx.coroutines.CoroutineScopeKt.coroutineScope(CoroutineScope.kt:261)
at com.intellij.idea.IdeStarter.start$suspendImpl(IdeStarter.kt:66)
at com.intellij.idea.IdeStarter.start(IdeStarter.kt)
at com.intellij.platform.ide.bootstrap.ApplicationLoader$executeApplicationStarter$2.invokeSuspend(ApplicationLoader.kt:438)
at com.intellij.platform.ide.bootstrap.ApplicationLoader$executeApplicationStarter$2.invoke(ApplicationLoader.kt)
at com.intellij.platform.ide.bootstrap.ApplicationLoader$executeApplicationStarter$2.invoke(ApplicationLoader.kt)
at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:62)
at kotlinx.coroutines.BuildersKt__Builders_commonKt.withContext(Builders.common.kt:163)
at kotlinx.coroutines.BuildersKt.withContext(Unknown Source)
at com.intellij.platform.diagnostic.telemetry.impl.TracerKt.span(tracer.kt:56)
at com.intellij.platform.diagnostic.telemetry.impl.TracerKt.span$default(tracer.kt:48)
at com.intellij.platform.ide.bootstrap.ApplicationLoader.executeApplicationStarter(ApplicationLoader.kt:437)
at com.intellij.platform.ide.bootstrap.StartupUtil$startApplication$9.invokeSuspend(startup.kt:318)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:608)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:873)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:763)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:750)

@angelozerr
Copy link
Contributor

angelozerr commented Dec 3, 2024 via email

@danny-su
Copy link
Author

danny-su commented Dec 4, 2024

@angelozerr, Just one time for now.

@angelozerr
Copy link
Contributor

Ok thanks for having reported the issue.

I know that "starting language servers on project indexing finished" code is not very clean ( I had to hack some IJ API), but I will try to improve that in next version of LSP4IJ.

@angelozerr angelozerr added the bug Something isn't working label Dec 4, 2024
@SCWells72
Copy link
Contributor

FWIW, I've seen this a number of times as well. I'd copied the stack trace off to the side to report it, but since it's already been reported here, I'll just confirm that I'm also seeing it from time to time.

@angelozerr
Copy link
Contributor

@SCWells72 @danny-su could you please install https://github.com/redhat-developer/lsp4ij?tab=readme-ov-file#testing-nightly-builds and tell me if it is working better? I have tried to fix it but as I cannot reproduce it it is hard to know if the fix is correct. Thanks for your feedback.

@angelozerr angelozerr self-assigned this Dec 7, 2024
@angelozerr angelozerr reopened this Dec 7, 2024
@angelozerr
Copy link
Contributor

Fixed with #671

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants