Freezing on metadata retrieve

Issue #1702 resolved
Nic Edwards created an issue

Hey Scott,

I’ve noticed lately that Idea has been freezing during metadata retrieve. I cannot find any other complaints of this, so it may just be me? In the attached “Screenshot.png”, you can see the frozen state. Here it freezes immediately upon clicking “Custom”.

A workaround is to delete the entire project, and recreate it. The initial retrieve works without issue - just any subsequent retrieves fail before the required metadata can be selected.

Cheers,

Nic

IC2 2.1.3.7

IntelliJ IDEA 2020.2.1 (Ultimate Edition)
Build #IU-202.6948.69, built on August 25, 2020
Licensed to Nic
Subscription is active until July 17, 2021
Runtime version: 11.0.8+10-b944.31 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Windows 10 10.0
GC: ParNew, ConcurrentMarkSweep
Memory: 19933M
Cores: 8
Non-Bundled Plugins: com.illuminatedcloud2.intellij, org.jetbrains.kotlin

Comments (27)

  1. Scott Wells repo owner

    Hi, Nic. There was an issue with this several builds back, but once I put out a fix I haven't heard about it from anyone. It was also specifically tied to hitting the Refresh toolbar button. I'm not seeing a deadlock or similar in the provided thread dumps either. Since it sounds like this is pretty easy for you to reproduce, can you do so one more time, wait about a minute, then send me your logs again--specifically the thread dumps--and hopefully they'll include something useful from a diagnostic standpoint.

  2. Scott Wells repo owner

    Unfortunately I'm not seeing anything that looks like a deadlock in the provided thread dumps/logs. For those of you having this issue, can you please provide the exact steps you're taking that lead to this behavior? Also please include any other information about your project, metadata, etc., that might be of use. Hopefully I can get to where I can reproduce it in which case it should be simple to address.

  3. Scott Wells repo owner

    Wow! Pranay, can you please provide your idea.log so I can see if there's anything in there like corrupted indices?

    Based on what you're seeing, I'm now wondering if perhaps there's some kind of infinite loop causing this and not a deadlock, so I may have those of you who are seeing this try to get a CPU profiling snapshot that should point to the issue. That will require you to be using a commercial JetBrains IDE, i.e., not Community Edition. If you are seeing this and using a commercial IDE, please enable the Performance Testing plugin, then use Help>Diagnostic Tools>Start CPU Usage Profiling. Reproduce the behavior and then (if possible) use Help>Diagnostic Tools>Stop CPU Usage Profiling. That will create a CPU profiling snapshot that I'd like to see.

    If no one is using a commercial IDE--or if you are but because of this behavior you're unable to do the Stop CPU Usage Profiling step above to capture the snapshot--we'll see if we can corner this another way.

  4. Scott Wells repo owner

    Thanks, Pranay. I'm seeing a number of issues in your provided log, some of which may be the result of repeated in-place upgrades of the IDE from 2019.1.2 to 2020.2. I think perhaps the best next step for you is to install a fresh version of IntelliJ IDEA Community Edition 2020.2.1 and Illuminated Cloud. You shouldn't lose any of your existing configuration. However, given the number of core IDE warnings and errors I'm seeing in the log I think we need to do that to get a better signal-to-noise ratio.

    Also, please don't install the PowerShell plugin into this new install until after you try to reproduce the performance issue. If the performance issue exists in the new install with just the IC2 plugin installed AND all of those other core IDE warnings and errors are gone, that will quite clearly indicate IC2 as the culprit. If the performance issue is gone, go ahead and install the PowerShell plugin and see if things are still good.

    I did see one IC-specific warning in the log that I've already addressed locally, and I also have been making a small change that may or may not help based on the logs provided so far from those experiencing the freeze. I'll post a test build here shortly with those fixes that I'd like each of you to install to see whether it helps or not.

  5. Scott Wells repo owner

    Okay, here's a pre-release build that includes a few fixes intended for 2.1.3.8 plus a few things I've implemented based on the provided logs, thread dumps, etc., that I'm hoping will help either resolve the issues you're having or at least help me to understand them better.

    You can install this build by downloading it--don't extract the archive--and then go into Settings/Preferences>Plugins and click Install plugin from disk from under the gear drop-down menu. Allow the IDE to restart and then try to reproduce the issues you've been seeing.

    Please let me know the outcome either way, and if there are still issues--whether the same or new--please provide the latest logs for review.

  6. Scott Wells repo owner

    Pranay, that does look much cleaner. The main remaining exception:

    2020-09-01 19:50:02,141 [1049075]   WARN - util.DeprecatedMethodException - The default implementation of ConfigurationFactory.getId is deprecated, you need to override it in org.jetbrains.kotlin.idea.nodejs.protractor.KotlinProtractorConfigurationType$1. The default implementation delegates to 'getName' which may be localized but return value of this method must not depend on current localization. 
    com.intellij.util.DeprecatedMethodException: The default implementation of ConfigurationFactory.getId is deprecated, you need to override it in org.jetbrains.kotlin.idea.nodejs.protractor.KotlinProtractorConfigurationType$1. The default implementation delegates to 'getName' which may be localized but return value of this method must not depend on current localization.
    

    can be cleaned up by disabling the Kotlin plugin assuming you're not doing Kotlin development.

    Otherwise is the product behaving and performing properly for you, or are there still performance issues?

  7. Scott Wells repo owner

    Pranay, I'm not aware of any indexing bug. Given that you just completely reset quite a few things, can you please use File > Invalidate Caches / Restart to rebuild all caches & indices and see if that resolves the issue?

  8. Pranay Jaiswal

    from what can I see it gets stuck at indexing classes. could be due to having a large set of files in project.

  9. Scott Wells repo owner

    And that happens even after doing a full File > Invalidate Caches / Restart? If so, I'd need to see a thread dump from when it's stuck.

  10. Scott Wells repo owner

    I just posted 2.1.3.8 which includes all of the prospective fixes included in the attached build plus a few others. My guess is that this is not fully resolved, but if you've been experiencing this issue, please let me know how things look after updating to that version.

  11. Brian Nørremark

    I’m sorry to say, but I installed 2.1.3.8 and after File > Invalidate Caches / Restart things are still slow for me in Retrieve Metadata. I moved the Retrieval Scope window to see if it was ‘frozen’ or not. I am not sure I can provide any logs or anything because of nature of the project that I work on.

  12. Scott Wells repo owner

    Hi, Brian. The frozen thread dumps don't include any proprietary information. They just show the stack traces of each thread in the JVM at the point that things seemed frozen. That's actually the most helpful diagnostic tool to me if you're able to get this into such a state consistently.

  13. Scott Wells repo owner

    Hey, folks. Is this problem still occurring? I assume it is but I haven't received any additional diagnostic info from anyone. If you're still seeing this behavior, please send over frozen thread dumps if possible. If you're not sure what to send, let me know and I'll be happy to provide detailed instructions.

    I also have a new build coming out tomorrow that includes a few more prospective fixes in this area.

  14. Brian Nørremark

    I tried following this guide https://intellij-support.jetbrains.com/hc/en-us/articles/206544899-Getting-a-thread-dump-when-IDE-hangs-and-doesn-t-respond - and all I got was this:

    bnoerremark@bnoerremar-ltm1 ~ % jps -mv                   

    38037 Jps -mv -Dapplication.home=/Library/Java/JavaVirtualMachines/jdk-12.jdk/Contents/Home -Xms8m -Djdk.module.main=jdk.jcmd

    4444  -Xms128m -Xmx3000m -XX:ReservedCodeCacheSize=240m -XX:+UseCompressedOops -Dfile.encoding=UTF-8 -XX:+UseConcMarkSweepGC -XX:SoftRefLRUPolicyMSPerMB=50 -ea -Dsun.io.useCanonCaches=false -Djava.net.preferIPv4Stack=true -Djdk.http.auth.tunneling.disabledSchemes="" -XX:+HeapDumpOnOutOfMemoryError -XX:-OmitStackTraceInFastThrow -XX:ErrorFile=/Users/bnoerremark/java_error_in_idea_%p.log -XX:HeapDumpPath=/Users/bnoerremark/java_error_in_idea.hprof -Djb.vmOptionsFile=/Users/bnoerremark/Library/Application Support/JetBrains/IntelliJIdea2020.2/idea.vmoptions -Didea.paths.selector=IntelliJIdea2020.2 -Didea.executable=idea -Didea.home.path=/Applications/IntelliJ IDEA.app/Contents -Didea.vendor.name=JetBrains

    bnoerremark@bnoerremar-ltm1 ~ % jstack -l 4444 > dump.txt

    4444: Unable to open socket file /var/folders/9s/4s7k8w3j3j75pf2xmvscfnt80000gq/T/.java_pid4444: target process 4444 doesn't respond within 10500ms or HotSpot VM not loaded

  15. Scott Wells repo owner

    Hi, Brian. The IDE actually creates thread dumps automatically for you in the same location as its log files. If you use Help>Show Log in Finder, you should see directories named threadDumps-freeze-<timestamp>*. You might open that directory, reproduce this behavior, let it sit for a minute until you see a new thread dump directory created, and then send that to me for review along with the corresponding idea.log file. Feel free to email them to support@illuminatedcloud.com.

  16. Scott Wells repo owner

    Okay, here's a build that's basically 2.1.3.9 but with a specific performance optimization based on what I've observed in the provided logs. Please download it (but don't extract the archive) and install it using Settings/Preferences>Plugins>Install plugin from disk (under the gear drop-down menu). Allow the IDE to restart and then try to reproduce the freeze. Please let me know the results either way.

  17. Scott Wells repo owner

    That's great! Okay, go ahead and sit tight on that build. The fix will be in the next official build which I'll likely release Thursday morning. Thanks for helping troubleshoot, everyone!

  18. Log in to comment