Illuminated cloud executes thousands of processes when showing coverage

Issue #872 duplicate
Justin Julicher created an issue

Had this issue just like my previously reported one.

To repeat:

  1. Open IntelliJ
  2. CTRL-ALT-6
  3. SELECT org.

IntelliJ Freezes with now 6k+ processes running.

Restarted IntelliJ and it still happens.

Attached log file.

Comments (23)

  1. Scott Wells repo owner

    Crud...sorry for the issue, but thanks for grabbing the logs. Hopefully they'll act as a smoking gun and I can put this to rest once and for all.

  2. Justin Julicher Account Deactivated reporter

    That's cool. I don't know how you've done this whole thing by yourself... it is just yourself developing this right? Bound to be issues that creep in.

    Not sure if I had to put in a Debug Log Setting first? I can do that and grab the logs if you want?

  3. Scott Wells repo owner

    I'll scan the logs. Hopefully even without additional debug logging there will be something in there useful about why this is happening. In the cases I've seen in the past, basically it has to do with async behavior causing re-entrancy while things are running.

    Yup, IC is just me...and as you can imagine, bridging to constantly moving targets (JetBrains IDEs and Salesforce) can be challenging. There are bugs for sure, especially since just about everyone develops for Salesforce a little differently from everyone else. It's definitely been a learning experience!

    I'll let you know what I find...probably won't be until tomorrow or Wednesday.

  4. Derek Wiers

    It happened to me once. I let it sit there and the process count went down. My Mac was having a bad day right then anyway, so I restarted the whole thing and it hasn't happened since, so I chalked it up to karma.

  5. Derek Wiers

    It does eventually figure itself out though. The numbers ratcheted down over the course of a couple minutes (err, they did for me), and eventually IJ/IC was usable again.

  6. Justin Julicher Account Deactivated reporter

    unfortunately for me it didn't recover (I gave it an hour). Although for some reason it hasn't occurred again, thankfully.

  7. Justin Julicher Account Deactivated reporter

    Hi Just letting you know that I just had a recurrence of this exact issue again with IC 2.0.11.

    It seems to be when it's initializing the tooling API.
    thanks

    Justin.

  8. Scott Wells repo owner

    Okay. Let me review the log that was attached a few weeks ago and see if it helps. If not I'll need to get a log from you the next time that it happens. I've tried and tried to reproduce this unsuccessfully. My guess is that it's some particular workflow that leads to it and it's not one that I use. I definitely want to get this one nipped in the bud as I know it's annoying when it happens!

  9. Fabio Andree Scheurel

    I have this issue, too, and it will only (and repeatedly) occur if I work with Scopes in IntelliJ. It looks like attaching the coverage to the classes triggers a project browser refresh, and the scope filter runs as a background process. If I disable the scope, coverage works, if I enable it, thousands of processes are spawned.

  10. Scott Wells repo owner

    Aha! Thank you, Fabio. Hopefully that will allow me to reproduce this reliably. Even if the problem occurs for some folks without using scopes, just getting to a good reproducible state will be huge in terms of putting this issue to rest. Thanks to all of you for helping to corner this thing. Hopefully I'll have a fix soon.

  11. Scott Wells repo owner

    Woohoo! I just had this happen to me upon switching branches with code coverage displayed. I'll gather my own logs to add to the diagnostic pile!

  12. Justin Julicher Account Deactivated reporter

    Hey Scott

    Have you made any progress with this?

    To me it seems to be an issue when I have multiple sandboxes to choose from when retrieving the code coverage. I guess this is generated when you run a test on a sandbox then change connections.

    Is there a way to clear the sandboxes available from the code coverage dialog box?

    thanks.

  13. Scott Wells repo owner

    Unfortunately I haven't made much progress, but not for lack of trying. I've been able to reproduce it exactly once myself, and not while troubleshooting it...it was an "in the wild" reproduction while I was doing my day job. Obviously it's happening much more frequently for a handful of folks (or at least a handful of folks are letting me know about it). The thread dumps I've seen show a TON of threads, but none of them have stack traces that go through IC code which was VERY surprising.

    What I really need is a (semi-)reliable way to reproduce it so that I can debug it while it's happening and see how these threads are being spawned so that I can prevent it at the core. It seems like it's sometimes caused by multiple connections as you've mentioned; other times it's caused by making large changes to the code base while coverage is showing, e.g., switching branches (I think that's how it happened when I saw it).

    If anyone has a foolproof way to reproduce it, please let me know because I would definitely like to put this one to rest for all involved.

  14. Derek Wiers

    I just got this for the first time in a long while. I got a new mac recently, so it's a pretty fresh install of IJ 2018.1.5, along with the latest greatest IC. Here's what happened: 1. I ran 1 class of tests (ended up being only one test) with coverage 2. I ran the same class with no coverage (but didn't specifically hide coverage) 3. I created a class based on a custom template I wrote 4. I said, "yes, I do want to add to metadata subscription" 5. It went into its loop about Apex code coverage overlays

  15. Scott Wells repo owner

    Derek, that's likely just because Flatten packages is enabled under the gear drop-down in the Project view. Just disable it and things will be back to normal. Not sure how it got enabled, though. I support it could be a side-effect of whatever is going on here, but that would be a bit surprising. Nonetheless, that option should take care of it for you.

  16. Scott Wells repo owner

    Rolling this into #686 which is where I've been tracking progress on this issue. I have what I expect to be a true fix for it to be included in the next build.

  17. Log in to comment