RunAway process

Issue #578 resolved
Mike Wannamaker created an issue

So I clicked to run a test with coverage, remembered that I hadn't saved the file. So I went to cancel the test run. I'm not sure how many but every box that came up I hit cancel. Eventually it hung IntelliJ and started instantiating processes like crazy. I had to kill the process. I think this is the last line and it repeated many times in the log file.

See screenshot attached, you can see over 5000 processes running. :)

2017-03-25 10:58:47,624 [46355206] ERROR - plication.impl.ApplicationImpl - IntelliJ IDEA 2017.1 Build #IU-171.3780.107 2017-03-25 10:58:47,624 [46355206] ERROR - plication.impl.ApplicationImpl - JDK: 1.8.0_112-release 2017-03-25 10:58:47,624 [46355206] ERROR - plication.impl.ApplicationImpl - VM: OpenJDK 64-Bit Server VM 2017-03-25 10:58:47,624 [46355206] ERROR - plication.impl.ApplicationImpl - Vendor: JetBrains s.r.o 2017-03-25 10:58:47,624 [46355206] ERROR - plication.impl.ApplicationImpl - OS: Linux 2017-03-25 10:58:47,624 [46355206] ERROR - plication.impl.ApplicationImpl - Last Action: RunCoverage 2017-03-25 10:58:47,624 [46355206] ERROR - plication.impl.ApplicationImpl - Read access is allowed from event dispatch thread or inside read-action only (see com.intellij.openapi.application.Application.runReadAction()) Details: Current thread: Thread[ApplicationImpl pooled thread 291,4,main] 1127892655 ; dispatch thread: false; isDispatchThread(): false SystemEventQueueThread: Thread[AWT-EventQueue-0 2017.1#IU-171.3780.107 IDEA, eap:false, os:Linux 4.4.0-66-generic, java-version:JetBrains s.r.o 1.8.0_112-release-736-b13,6,main] 1747295603 java.lang.Throwable at com.intellij.openapi.diagnostic.Logger.error(Logger.java:150) at com.intellij.openapi.application.impl.ApplicationImpl.assertReadAccessAllowed(ApplicationImpl.java:1068) at com.intellij.psi.impl.source.tree.TreeElement.getStartOffsetInParent(TreeElement.java:130) at com.intellij.psi.impl.source.tree.TreeElement.getStartOffset(TreeElement.java:118) at com.intellij.psi.impl.source.tree.TreeElement.getTextRange(TreeElement.java:109) at com.intellij.extapi.psi.ASTDelegatePsiElement.getTextRange(ASTDelegatePsiElement.java:121) at com.illuminatedcloud.intellij.coverage.ApexCoverageEngine.getExecutableLineNumbers(SourceFile:720) at com.illuminatedcloud.intellij.coverage.ApexCoverageSuite$2.run(SourceFile:418) at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:726) at com.intellij.openapi.progress.impl.CoreProgressManager$6.run(CoreProgressManager.java:410) at com.intellij.openapi.progress.impl.CoreProgressManager.a(CoreProgressManager.java:176) at com.intellij.openapi.progress.impl.CoreProgressManager.a(CoreProgressManager.java:556) at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:501) at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:66) at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:163) at com.intellij.openapi.application.impl.ApplicationImpl.a(ApplicationImpl.java:594) at com.intellij.openapi.application.impl.ApplicationImpl$2.run(ApplicationImpl.java:334) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745)

Comments (9)

  1. Scott Wells repo owner

    Yeah, another user reported this the other day. I had added some logic to provide coverage markers for 100% uncovered classes since Salesforce doesn't provide those details, but it seems it's causing some issues. I may pull that out from the next build until I can figure out what's going on.

  2. Mike Wannamaker reporter

    Ya, just tried running tests with coverage again, just a single test class, and it's hung at Preparing Apex code coverage overlays. Not creating all the processes but hung.

    2017-03-25 11:51:22,556 [1877949] ERROR - plication.impl.ApplicationImpl - Last Action: RunCoverage 2017-03-25 11:51:22,556 [1877949] ERROR - plication.impl.ApplicationImpl - Read access is allowed from event dispatch thread or inside read-action only (see com.intellij.openapi.application.Application.runReadAction()) Details: Current thread: Thread[ApplicationImpl pooled thread 34,4,main] 1583057530 ; dispatch thread: false; isDispatchThread(): false SystemEventQueueThread: Thread[AWT-EventQueue-0 2017.1#IU-171.3780.107 IDEA, eap:false, os:Linux 4.4.0-66-generic, java-version:JetBrains s.r.o 1.8.0_112-release-736-b13,6,main] 1089470798 java.lang.Throwable at com.intellij.openapi.diagnostic.Logger.error(Logger.java:150) at com.intellij.openapi.application.impl.ApplicationImpl.assertReadAccessAllowed(ApplicationImpl.java:1068) at com.intellij.psi.impl.source.PsiFileImpl.getStubTree(PsiFileImpl.java:674) at com.intellij.psi.impl.source.tree.AstPath$RootPath.getFileStubTree(AstPath.java:294) at com.intellij.psi.impl.source.tree.AstPath$ChildPath.getFileStubTree(AstPath.java:199) at com.intellij.psi.impl.source.tree.AstPath.getStub(AstPath.java:66) at com.intellij.extapi.psi.StubBasedPsiElementBase.getStub(StubBasedPsiElementBase.java:385) at com.intellij.extapi.psi.StubBasedPsiElementBase.getParentByStub(StubBasedPsiElementBase.java:337) at com.illuminatedcloud.intellij.psi.impl.ApexDeclarationMixin.getParent(SourceFile:91) at com.intellij.psi.util.PsiTreeUtil.getParentOfType(PsiTreeUtil.java:657) at com.illuminatedcloud.intellij.psi.util.ApexPsiUtil.getParentOfType(SourceFile:361) at com.illuminatedcloud.intellij.psi.util.ApexPsiUtil.getParentOfType(SourceFile:366) at com.illuminatedcloud.intellij.coverage.ApexCoverageEngine$8.isAccepted(SourceFile:702) at com.illuminatedcloud.intellij.psi.util.ApexPsiUtil.collectElements(SourceFile:254) at com.illuminatedcloud.intellij.psi.util.ApexPsiUtil.collectElements(SourceFile:270) at com.illuminatedcloud.intellij.psi.util.ApexPsiUtil.collectElements(SourceFile:270) at com.illuminatedcloud.intellij.psi.util.ApexPsiUtil.collectElements(SourceFile:270) at com.illuminatedcloud.intellij.psi.util.ApexPsiUtil.collectElements(SourceFile:270) at com.illuminatedcloud.intellij.psi.util.ApexPsiUtil.collectElements(SourceFile:270) at com.illuminatedcloud.intellij.psi.util.ApexPsiUtil.collectElements(SourceFile:270) at com.illuminatedcloud.intellij.psi.util.ApexPsiUtil.collectElements(SourceFile:270) at com.illuminatedcloud.intellij.psi.util.ApexPsiUtil.collectElements(SourceFile:270) at com.illuminatedcloud.intellij.psi.util.ApexPsiUtil.collectElements(SourceFile:270) at com.illuminatedcloud.intellij.psi.util.ApexPsiUtil.collectElements(SourceFile:270) at com.illuminatedcloud.intellij.psi.util.ApexPsiUtil.collectElements(SourceFile:270) at com.illuminatedcloud.intellij.psi.util.ApexPsiUtil.collectElements(SourceFile:270) at com.illuminatedcloud.intellij.psi.util.ApexPsiUtil.collectElements(SourceFile:270) at com.illuminatedcloud.intellij.psi.util.ApexPsiUtil.collectElements(SourceFile:270) at com.illuminatedcloud.intellij.psi.util.ApexPsiUtil.collectElements(SourceFile:270) at com.illuminatedcloud.intellij.psi.util.ApexPsiUtil.collectElements(SourceFile:270) at com.illuminatedcloud.intellij.coverage.ApexCoverageEngine.getExecutableLineNumbers(SourceFile:594) at com.illuminatedcloud.intellij.coverage.ApexCoverageSuite$2.run(SourceFile:418) at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:726) at com.intellij.openapi.progress.impl.CoreProgressManager$6.run(CoreProgressManager.java:410) at com.intellij.openapi.progress.impl.CoreProgressManager.a(CoreProgressManager.java:176) at com.intellij.openapi.progress.impl.CoreProgressManager.a(CoreProgressManager.java:556) at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:501) at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:66) at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:163) at com.intellij.openapi.application.impl.ApplicationImpl.a(ApplicationImpl.java:594) at com.intellij.openapi.application.impl.ApplicationImpl$2.run(ApplicationImpl.java:334) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745)

  3. Scott Wells repo owner

    I actually have a fix for the problem you're seeing if you'd like to try it. I can post a build here. It just properly addresses the read action behavior required by the plugin SDK (which is a constantly moving target as JetBrains updates the IDE!).

  4. Scott Wells repo owner

    I'll include the fix for the "Read access is allowed from event dispatch thread or inside read-action only" issue that could very well be the root cause of this in the next build.

  5. Scott Wells repo owner

    Prospective fix delivered in 1.7.8.8. It's addresses the symptom ("must use read action"), so it's very likely it's not an effective fix. Please reopen if the same issue occurs after updating and we'll need to gather some logs to see exactly why this is happening.

  6. Jeff Watson

    I'm seeing this issue (over a year later and just started occurring a few days ago) with runaway processes "Preparing Apex code coverage data" and sometimes "Retrieving Apex code coverage". My processes jump to ~3,500. My current work around is to kill IntelliJ and restart. Not terribly painful as it only happens once or twice a day max, but wanted to report. IC-181.4892.42 Windows 64-bit.

  7. Log in to comment