Closed ericzundel closed 9 years ago
OK, I take it back. When I expanded the project I can only see the files in the root directory of the repo I can't use this project. There should be a lot more files there.
I believe this is the log file for the run that was hanging but I'm not sure.
https://gist.github.com/ericzundel/a3174dd3e7d0fdafbc82
I am upgrading IntelliJ and all my plugins to see if that helps
I updated to IntelliJ 14.1.4 and upgraded all of my plugins.
I performed the same import of the same project. The IntelliJ window is beachballed 12 minutes into the process (this is a pretty small project)
Here's the top of that same thread from jstack:
"ApplicationImpl pooled thread 8" #52 prio=4 os_prio=31 tid=0x000000013501c800 nid=0x13347 runnable [0x00000001344fe000]
java.lang.Thread.State: RUNNABLE
at java.util.HashMap.hash(HashMap.java:338)
at java.util.HashMap.put(HashMap.java:611)
at java.util.HashSet.add(HashSet.java:219)
at java.util.AbstractCollection.addAll(AbstractCollection.java:344)
at com.intellij.openapi.roots.impl.RootIndex.a(RootIndex.java:233)
at com.intellij.openapi.roots.impl.RootIndex.a(RootIndex.java:214)
at com.intellij.openapi.roots.impl.RootIndex.getOrderEntries(RootIndex.java:618)
at com.intellij.openapi.roots.impl.DirectoryIndexImpl.getOrderEntries(DirectoryIndexImpl.java:192)
at com.intellij.openapi.roots.impl.ProjectFileIndexImpl.getOrderEntriesForFile(ProjectFileIndexImpl.java:112)
at com.jetbrains.python.psi.impl.PythonLanguageLevelPusher.findSdk(PythonLanguageLevelPusher.java:133)
at com.jetbrains.python.psi.impl.PythonLanguageLevelPusher.getFileSdk(PythonLanguageLevelPusher.java:127)
at com.jetbrains.python.psi.impl.PythonLanguageLevelPusher.getFileLanguageLevel(PythonLanguageLevelPusher.java:111)
at com.jetbrains.python.psi.impl.PythonLanguageLevelPusher.getImmediateValue(PythonLanguageLevelPusher.java:103)
at com.jetbrains.python.psi.impl.PythonLanguageLevelPusher.getImmediateValue(PythonLanguageLevelPusher.java:66)
at com.intellij.openapi.roots.impl.PushedFilePropertiesUpdaterImpl.a(PushedFilePropertiesUpdaterImpl.java:218)
at com.intellij.openapi.roots.impl.PushedFilePropertiesUpdaterImpl.findAndUpdateValue(PushedFilePropertiesUpdaterImpl.java:318)
at com.intellij.openapi.roots.impl.PushedFilePropertiesUpdaterImpl.b(PushedFilePropertiesUpdaterImpl.java:307)
at com.intellij.openapi.roots.impl.PushedFilePropertiesUpdaterImpl.access$1000(PushedFilePropertiesUpdaterImpl.java:63)
at com.intellij.openapi.roots.impl.PushedFilePropertiesUpdaterImpl$11.run(PushedFilePropertiesUpdaterImpl.java:293)
at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:872)
at com.intellij.openapi.roots.impl.PushedFilePropertiesUpdaterImpl.a(PushedFilePropertiesUpdaterImpl.java:288)
at com.intellij.openapi.roots.impl.PushedFilePropertiesUpdaterImpl.access$700(PushedFilePropertiesUpdaterImpl.java:63)
at com.intellij.openapi.roots.impl.PushedFilePropertiesUpdaterImpl$10$1$1.processFile(PushedFilePropertiesUpdaterImpl.java:275)
at com.intellij.openapi.vfs.VfsUtilCore$1.visitFileEx(VfsUtilCore.java:252)
at com.intellij.openapi.vfs.VfsUtilCore.visitChildrenRecursively(VfsUtilCore.java:267)
at com.intellij.openapi.vfs.VfsUtilCore.visitChildrenRecursively(VfsUtilCore.java:299)
at com.intellij.openapi.vfs.VfsUtilCore.visitChildrenRecursively(VfsUtilCore.java:299)
at com.intellij.openapi.vfs.VfsUtilCore.visitChildrenRecursively(VfsUtilCore.java:299)
at com.intellij.openapi.vfs.VfsUtilCore.visitChildrenRecursively(VfsUtilCore.java:299)
at com.intellij.openapi.vfs.VfsUtilCore.iterateChildrenRecursively(VfsUtilCore.java:247)
and here is the idea.log in progress:
https://gist.github.com/ericzundel/322879568163f23fd7c6
here is the heap dump (shows lots of free space from what I can tell?) https://gist.github.com/ericzundel/52ebea0fd730065d011d
Regarding project view it's because of "Show Only Loaded Files" options that is on by default in 1.3.4. See description here: https://github.com/pantsbuild/intellij-pants-plugin#plugin-features
Regarding diagnosing the performance issue. Could you please provide full output of jstack? Or at least the one for AWT-EventQueue. Could you please also add #com.twitter.intellij.pants.service.project.PantsResolver to debug categories(Help --> Configure Debug Log Settings). Unfortunately my fix is not available in IJ 14 so you need to check a few idea.log files in ~/Library/Logs/IdeaIC14.
BTW from the current stack it looks Python plugin is doing something. You can also try to disable Python Plugin and try again.
I think I understand what the "Show Only Loaded Files" is, but there were no files shown at all, so the project must have been corrupt?
Full jstack: https://gist.github.com/ericzundel/a5e1209e756a953fe60b
As for Help -> Configure Debug Log Settings: When I opened that dialog I had: com.twitter.intellij.pants.service.project.PantsResolver
Looks like you wanted me to turn that off by adding #
in front of it, right?
Sorry, I haven't had a chance to re-run without the Python plugin yet.
Yeah. You need # in front.
My understanding is that when IJ tries to update/write all project files with the newly created structure it's waiting for someone to release a write lock in AWT-EventQueue-0. The only running thread is ApplicationImpl and it's indexing unindexed files. But PythonLanguageLevelPusher from python plugin is triggered during the indexing and I'm not sure if it's a right thing.
I suggest you to take 2-3 dups with 10-20 seconds in between and send them to support@jetbrains.com. They clearly knows what is happening. And of course to verify my guess with Python plugin you might try to disable it.
I've turned off the debugging as you suggested. After that, I kept getting an error about "Problem validating target ..." so I did an rm -rf .idea/pants-projects in the root of my repo.
Now the project seems to import pretty quickly. (The python plugin is still on.)
I'm seeing IntelliJ 14.1.3 with the Plugin version 1.3.4 on my MacBook pro running MacOS 10.0 lock up and take 100% cpu when using the Plugin for IntelliJ. This is right after importing a new project using Pants to import a directory. I've seen this a few times now, so I sat down to do some diagnosis.
At this point I don't think its 100% locked up, but running very slowly.
The reason I say its running slowly is that it did finally finish the opening dialogs and now shows the project tree
Top shows the idea process eating CPU
When running 'jstack' I see this stacktrace running (I took 4 dumps over a period of about 10 minutes and it was always there)
The heap seems OK to me (lots of free space)
I eventually killed the idea process and restarted intelliJ. It came back up and now I can see the project.