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

Locked progress preparing execution with AppMap #653

Open
jansorg opened this issue Apr 10, 2024 · 0 comments
Open

Locked progress preparing execution with AppMap #653

jansorg opened this issue Apr 10, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@jansorg
Copy link
Collaborator

jansorg commented Apr 10, 2024

The following threads were blocking.
appland.execution.AppMapExternalSystemExtension#updateVMParameters is called by the SDK via invokeLater which locks the write intent lock.

appland.utils.RunConfigurationUtil#getRunConfigurationModule(com.intellij.openapi.project.Project, com.intellij.execution.configurations.RunProfile, com.intellij.openapi.vfs.VirtualFile) waits for smart mode

It's still unclear if this is caused by the SDK or if this already fixed in later SDKs

"AWT-EventQueue-0@3018" prio=6 tid=0x1f nid=NA waiting
  java.lang.Thread.State: WAITING
	  at jdk.internal.misc.Unsafe.park(Unsafe.java:-1)
	  at java.util.concurrent.locks.LockSupport.park(LockSupport.java:194)
	  at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2081)
	  at java.awt.EventQueue.getNextEvent(EventQueue.java:572)
	  at com.intellij.ide.IdeEventQueue.lambda$getNextEvent$9(IdeEventQueue.java:584)
	  at com.intellij.ide.IdeEventQueue$$Lambda$527.384912246.compute(Unknown Source:-1)
	  at com.intellij.openapi.application.impl.ApplicationImpl.runUnlockingIntendedWrite(ApplicationImpl.java:899)
	  at com.intellij.ide.IdeEventQueue.getNextEvent(IdeEventQueue.java:584)
	  at com.intellij.ide.IdeEventQueue.pumpEventsForHierarchy(IdeEventQueue.java:940)
	  at com.intellij.openapi.progress.util.ProgressWindow.lambda$startBlocking$4(ProgressWindow.java:205)
	  at com.intellij.openapi.progress.util.ProgressWindow$$Lambda$4115.339659123.compute(Unknown Source:-1)
	  at com.intellij.openapi.application.impl.ApplicationImpl.runUnlockingIntendedWrite(ApplicationImpl.java:899)
	  at com.intellij.openapi.progress.util.ProgressWindow.startBlocking(ProgressWindow.java:201)
	  at com.intellij.openapi.progress.impl.ProgressRunner.lambda$execFromEDT$6(ProgressRunner.java:321)
	  at com.intellij.openapi.progress.impl.ProgressRunner$$Lambda$4113.1696944417.accept(Unknown Source:-1)
	  at java.util.concurrent.CompletableFuture.uniAcceptNow(CompletableFuture.java:753)
	  at java.util.concurrent.CompletableFuture.uniAcceptStage(CompletableFuture.java:731)
	  at java.util.concurrent.CompletableFuture.thenAccept(CompletableFuture.java:2108)
	  at com.intellij.openapi.progress.impl.ProgressRunner.execFromEDT(ProgressRunner.java:318)
	  at com.intellij.openapi.progress.impl.ProgressRunner.submit(ProgressRunner.java:259)
	  at com.intellij.openapi.progress.impl.ProgressRunner.submitAndGet(ProgressRunner.java:185)
	  at com.intellij.openapi.application.impl.ApplicationImpl.runProcessWithProgressSynchronously(ApplicationImpl.java:477)
	  at com.intellij.openapi.progress.impl.CoreProgressManager.runProcessWithProgressSynchronously(CoreProgressManager.java:537)
	  at com.intellij.openapi.progress.impl.ProgressManagerImpl.runProcessWithProgressSynchronously(ProgressManagerImpl.java:85)
	  at com.intellij.openapi.progress.impl.CoreProgressManager.run(CoreProgressManager.java:385)
	  at com.intellij.openapi.progress.Task.queue(Task.java:119)
	  at appland.execution.AppMapPatcherUtil.prepareJavaParameters(AppMapPatcherUtil.java:47)
	  at appland.execution.AppMapExternalSystemExtension.updateVMParameters(AppMapExternalSystemExtension.java:32)
	  at com.intellij.openapi.externalSystem.service.execution.configuration.ExternalSystemRunConfigurationExtensionManager.updateVMParameters(ExternalSystemRunConfigurationExtensionManager.kt:29)
	  at com.intellij.openapi.externalSystem.service.execution.configuration.ExternalSystemRunConfigurationExtensionManager$Companion.createVMParameters(ExternalSystemRunConfigurationExtensionManager.kt:85)
	  at com.intellij.openapi.externalSystem.service.execution.configuration.ExternalSystemRunConfigurationExtensionManager.createVMParameters(Unknown Source:-1)
	  at com.intellij.openapi.externalSystem.service.execution.ExternalSystemRunnableState.getJvmParametersSetup(ExternalSystemRunnableState.java:341)
	  at com.intellij.openapi.externalSystem.service.execution.ExternalSystemRunnableState.execute(ExternalSystemRunnableState.java:172)
	  at com.intellij.openapi.externalSystem.service.execution.ExternalSystemTaskRunner.doExecute(ExternalSystemTaskRunner.kt:37)
	  at com.intellij.openapi.externalSystem.service.execution.ExternalSystemTaskRunner.access$doExecute(ExternalSystemTaskRunner.kt:18)
	  at com.intellij.openapi.externalSystem.service.execution.ExternalSystemTaskRunner$execute$1.invoke(ExternalSystemTaskRunner.kt:28)
	  at com.intellij.openapi.externalSystem.service.execution.ExternalSystemTaskRunner$execute$1.invoke(ExternalSystemTaskRunner.kt:18)
	  at com.intellij.execution.impl.ExecutionManagerImpl$startRunProfile$1.invoke(ExecutionManagerImpl.kt:173)
	  at com.intellij.execution.impl.ExecutionManagerImpl$startRunProfile$1.invoke(ExecutionManagerImpl.kt:72)
	  at com.intellij.execution.impl.ExecutionManagerImpl$doStartRunProfile$startRunnable$1.run(ExecutionManagerImpl.kt:234)
	  at com.intellij.openapi.application.TransactionGuardImpl.runWithWritingAllowed(TransactionGuardImpl.java:215)
	  at com.intellij.openapi.application.TransactionGuardImpl.access$100(TransactionGuardImpl.java:22)
	  at com.intellij.openapi.application.TransactionGuardImpl$1.run(TransactionGuardImpl.java:197)
	  at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:873)
	  at com.intellij.openapi.application.impl.ApplicationImpl$3.run(ApplicationImpl.java:511)
	  at com.intellij.openapi.application.impl.FlushQueue.doRun(FlushQueue.java:69)
	  at com.intellij.openapi.application.impl.FlushQueue.runNextEvent(FlushQueue.java:112)
	  at com.intellij.openapi.application.impl.FlushQueue.flushNow(FlushQueue.java:42)
	  at com.intellij.openapi.application.impl.FlushQueue$$Lambda$300.850736553.run(Unknown Source:-1)
	  at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
	  at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:776)
	  at java.awt.EventQueue$4.run(EventQueue.java:727)
	  at java.awt.EventQueue$4.run(EventQueue.java:721)
	  at java.security.AccessController.doPrivileged(AccessController.java:-1)
	  at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
	  at java.awt.EventQueue.dispatchEvent(EventQueue.java:746)
	  at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:898)
	  at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:746)
	  at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$6(IdeEventQueue.java:439)
	  at com.intellij.ide.IdeEventQueue$$Lambda$533.800448700.compute(Unknown Source:-1)
	  at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:803)
	  at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$7(IdeEventQueue.java:438)
	  at com.intellij.ide.IdeEventQueue$$Lambda$532.713499366.run(Unknown Source:-1)
	  at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:106)
	  at com.intellij.ide.IdeEventQueue.performActivity(IdeEventQueue.java:604)
	  at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:436)
	  at com.intellij.ide.IdeEventQueue$$Lambda$531.1139513449.run(Unknown Source:-1)
	  at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:873)
	  at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:484)
	  at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:207)
	  at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
	  at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)
	  at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
	  at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
	  at java.awt.EventDispatchThread.run(EventDispatchThread.java:92)

"ApplicationImpl pooled thread 59@46154" prio=4 tid=0x141 nid=NA waiting
  java.lang.Thread.State: WAITING
	  at jdk.internal.misc.Unsafe.park(Unsafe.java:-1)
	  at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:234)
	  at java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedNanos(AbstractQueuedSynchronizer.java:1079)
	  at java.util.concurrent.locks.AbstractQueuedSynchronizer.tryAcquireSharedNanos(AbstractQueuedSynchronizer.java:1369)
	  at java.util.concurrent.CountDownLatch.await(CountDownLatch.java:278)
	  at com.intellij.openapi.project.DumbServiceImpl.waitForSmartMode(DumbServiceImpl.java:468)
	  at com.intellij.openapi.project.DumbService.runReadActionInSmartMode(DumbService.java:149)
	  at com.intellij.openapi.project.DumbService.runReadActionInSmartMode(DumbService.java:113)
	  at appland.utils.RunConfigurationUtil.getRunConfigurationModule(RunConfigurationUtil.java:31)
	  at appland.execution.AppMapPatcherUtil.prepareUnderProgress(AppMapPatcherUtil.java:60)
	  at appland.execution.AppMapPatcherUtil$1.compute(AppMapPatcherUtil.java:44)
	  at appland.execution.AppMapPatcherUtil$1.compute(AppMapPatcherUtil.java:41)
	  at com.intellij.openapi.progress.Task$WithResult.run(Task.java:335)
	  at com.intellij.openapi.progress.impl.CoreProgressManager.startTask(CoreProgressManager.java:442)
	  at com.intellij.openapi.progress.impl.ProgressManagerImpl.startTask(ProgressManagerImpl.java:114)
	  at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcessWithProgressSynchronously$8(CoreProgressManager.java:526)
	  at com.intellij.openapi.progress.impl.CoreProgressManager$$Lambda$4111.1584776885.run(Unknown Source:-1)
	  at com.intellij.openapi.progress.impl.ProgressRunner.lambda$new$0(ProgressRunner.java:83)
	  at com.intellij.openapi.progress.impl.ProgressRunner$$Lambda$4112.1309345349.apply(Unknown Source:-1)
	  at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$3(ProgressRunner.java:244)
	  at com.intellij.openapi.progress.impl.ProgressRunner$$Lambda$576.828803240.run(Unknown Source:-1)
	  at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:189)
	  at com.intellij.openapi.progress.impl.CoreProgressManager$$Lambda$577.2050114152.run(Unknown Source:-1)
	  at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$12(CoreProgressManager.java:608)
	  at com.intellij.openapi.progress.impl.CoreProgressManager$$Lambda$419.818391402.compute(Unknown Source:-1)
	  at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:683)
	  at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:639)
	  at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:607)
	  at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:60)
	  at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:176)
	  at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$4(ProgressRunner.java:244)
	  at com.intellij.openapi.progress.impl.ProgressRunner$$Lambda$556.1075363902.get(Unknown Source:-1)
	  at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1700)
	  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	  at java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:668)
	  at java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:665)
	  at java.security.AccessController.doPrivileged(AccessController.java:-1)
	  at java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:665)
	  at java.lang.Thread.run(Thread.java:829)

@jansorg jansorg added the bug Something isn't working label Apr 10, 2024
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

No branches or pull requests

1 participant