cpu spinning with 2.8 code Follow
I've been dying since after build 75 where we moved to scala 2.8. Now using Idea is painful, every keystroke takes seconds as the cpu is spinning (see stack trace below). I've posted a bunch of stack traces with http://youtrack.jetbrains.net/issue/SCL-1590. Is anybody else out there using 2.8? Do you also find the plugin spinning out of control?
My latest stack:
"JobScheduler pool 1/4" prio=6 tid=0x000000000a1c8800 nid=0xb58 runnable [0x000000000f00e000]
java.lang.Thread.State: RUNNABLE
at com.intellij.extapi.psi.ASTWrapperPsiElement.getParent(ASTWrapperPsiElement.java:1)
at com.intellij.extapi.psi.PsiElementBase.isPhysical(PsiElementBase.java:55)
at com.intellij.extapi.psi.PsiElementBase.isPhysical(PsiElementBase.java:71)
at com.intellij.extapi.psi.PsiElementBase.isPhysical(PsiElementBase.java:71)
at com.intellij.extapi.psi.PsiElementBase.isPhysical(PsiElementBase.java:71)
at com.intellij.psi.impl.source.resolve.ResolveCache.a(ResolveCache.java:105)
at com.intellij.psi.impl.source.resolve.ResolveCache.resolveWithCaching(ResolveCache.java:39
)
at org.jetbrains.plugins.scala.lang.psi.impl.base.ScStableCodeReferenceElementImpl.multiReso
lve(ScStableCodeReferenceElementImpl.scala:161)
at org.jetbrains.plugins.scala.lang.psi.api.base.ScReferenceElement$class.bind(ScReferenceEl
ement.scala:29)
at org.jetbrains.plugins.scala.lang.psi.impl.base.ScStableCodeReferenceElementImpl.bind(ScSt
ableCodeReferenceElementImpl.scala:38)
at org.jetbrains.plugins.scala.lang.psi.types.ScProjectionType.resolveResult(ScProjectionTyp
e.scala:17)
at org.jetbrains.plugins.scala.lang.psi.types.ScType$.extractDesignated(ScType.scala:235)
at org.jetbrains.plugins.scala.lang.psi.types.ScParameterizedType.<init>(ScParameterizedType
.scala:37)
at org.jetbrains.plugins.scala.lang.psi.types.ScSubstitutor.substInternal(ScSubstitutor.scal
a:93)
at org.jetbrains.plugins.scala.lang.psi.types.ScSubstitutor$$anonfun$1.apply(ScSubstitutor.s
cala:87)
at org.jetbrains.plugins.scala.lang.psi.types.ScSubstitutor$$anonfun$1.apply(ScSubstitutor.s
cala:87)
at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:157)
at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:157)
at scala.collection.mutable.ResizableArray$class.foreach(ResizableArray.scala:73)
at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:28)
at scala.collection.TraversableLike$class.map(TraversableLike.scala:157)
at scala.collection.mutable.ArrayBuffer.map(ArrayBuffer.scala:28)
at org.jetbrains.plugins.scala.lang.psi.types.ScSubstitutor.substInternal(ScSubstitutor.scal
a:87)
at org.jetbrains.plugins.scala.lang.psi.types.ScSubstitutor.subst(ScSubstitutor.scala:51)
at org.jetbrains.plugins.scala.lang.psi.types.Conformance$$anonfun$rightRec$4.apply(Conforma
nce.scala:219)
at org.jetbrains.plugins.scala.lang.psi.types.Conformance$$anonfun$rightRec$4.apply(Conforma
nce.scala:219)
at scala.collection.LinearSeqLike$class.find(LinearSeqLike.scala:147)
at scala.collection.immutable.List.find(List.scala:29)
at org.jetbrains.plugins.scala.lang.psi.types.Conformance$.rightRec(Conformance.scala:219)
at org.jetbrains.plugins.scala.lang.psi.types.Conformance$.org$jetbrains$plugins$scala$lang$
psi$types$Conformance$$conforms(Conformance.scala:171)
at org.jetbrains.plugins.scala.lang.psi.types.Conformance$$anonfun$rightRec$4.apply(Conforma
nce.scala:219)
at org.jetbrains.plugins.scala.lang.psi.types.Conformance$$anonfun$rightRec$4.apply(Conforma
nce.scala:219)
at scala.collection.LinearSeqLike$class.find(LinearSeqLike.scala:147)
at scala.collection.immutable.List.find(List.scala:29)
at org.jetbrains.plugins.scala.lang.psi.types.Conformance$.rightRec(Conformance.scala:219)
at org.jetbrains.plugins.scala.lang.psi.types.Conformance$.org$jetbrains$plugins$scala$lang$
psi$types$Conformance$$conforms(Conformance.scala:171)
at org.jetbrains.plugins.scala.lang.psi.types.Conformance$$anonfun$org$jetbrains$plugins$sca
la$lang$psi$types$Conformance$$conforms$7.apply(Conformance.scala:166)
at org.jetbrains.plugins.scala.lang.psi.types.Conformance$$anonfun$org$jetbrains$plugins$sca
la$lang$psi$types$Conformance$$conforms$7.apply(Conformance.scala:166)
at scala.collection.IndexedSeqLike$$anonfun$1.apply(IndexedSeqLike.scala:77)
at scala.collection.IndexedSeqLike$$anonfun$1.apply(IndexedSeqLike.scala:77)
at scala.collection.IndexedSeqLike$class.segmentLength(IndexedSeqLike.scala:184)
at scala.collection.mutable.GenericArray.segmentLength(GenericArray.scala:25)
at scala.collection.SeqLike$class.prefixLength(SeqLike.scala:172)
at scala.collection.mutable.GenericArray.prefixLength(GenericArray.scala:25)
at scala.collection.IndexedSeqLike$class.find(IndexedSeqLike.scala:77)
at scala.collection.mutable.GenericArray.find(GenericArray.scala:25)
...
Please sign in to leave a comment.
Some performance problems was fixed in trunk. I'll compile new plugin version for 90.154 (which I missed), and upload with this fix.
Best regards,
Alexander Podkhalyuzin.
Thanks Alexander. I just upgraded to build 108 with 154 but still any time I enter a character in a scala file the cpus spin for minutes. Below are several dumps.
I'm pretty much forced to edit code in Notepad++ and only go back to Idea to compile since there is a half second delay between keystrokes.
Note that after a few minutes *with no editing* the threads will complete. But any edit will kick them up again.
Please let me know if there is anything I can do help pinpoint the issue.
-barry
java.lang.Thread.State: RUNNABLE
at java.lang.reflect.Array.set(Native Method)
at scala.runtime.ScalaRunTime$.array_update(ScalaRunTime.scala:42)
at scala.Array$.slowcopy(Array.scala:64)
at scala.Array$.copy(Array.scala:85)
at scala.collection.mutable.ResizableArray$class.copyToArray(ResizableArray.scala:60)
at scala.collection.mutable.ArrayBuffer.copyToArray(ArrayBuffer.scala:28)
at scala.collection.TraversableLike$class.toArray(TraversableLike.scala:705)
at scala.collection.mutable.ArrayBuffer.toArray(ArrayBuffer.scala:28)
at org.jetbrains.plugins.scala.lang.psi.types.ScParameterizedType.<init>(ScParameterizedType
at org.jetbrains.plugins.scala.lang.psi.types.ScSubstitutor.substInternal(ScSubstitutor.scal
at org.jetbrains.plugins.scala.lang.psi.types.ScSubstitutor.subst(ScSubstitutor.scala:51)
at org.jetbrains.plugins.scala.lang.psi.types.Conformance$$anonfun$rightRec$4.apply(Conforma
at org.jetbrains.plugins.scala.lang.psi.types.Conformance$$anonfun$rightRec$4.apply(Conforma
at scala.collection.LinearSeqLike$class.find(LinearSeqLike.scala:147)
at scala.collection.immutable.List.find(List.scala:29)
at org.jetbrains.plugins.scala.lang.psi.types.Conformance$.rightRec(Conformance.scala:219)
at org.jetbrains.plugins.scala.lang.psi.types.Conformance$.org$jetbrains$plugins$scala$lang$
at org.jetbrains.plugins.scala.lang.psi.types.Conformance$$anonfun$rightRec$4.apply(Conforma
at org.jetbrains.plugins.scala.lang.psi.types.Conformance$$anonfun$rightRec$4.apply(Conforma
at scala.collection.LinearSeqLike$class.find(LinearSeqLike.scala:147)
at scala.collection.immutable.List.find(List.scala:29)
at org.jetbrains.plugins.scala.lang.psi.types.Conformance$.rightRec(Conformance.scala:219)
at org.jetbrains.plugins.scala.lang.psi.types.Conformance$.org$jetbrains$plugins$scala$lang$
at org.jetbrains.plugins.scala.lang.psi.types.Conformance$$anonfun$rightRec$4.apply(Conforma
at org.jetbrains.plugins.scala.lang.psi.types.Conformance$$anonfun$rightRec$4.apply(Conforma
at scala.collection.LinearSeqLike$class.find(LinearSeqLike.scala:147)
at scala.collection.immutable.List.find(List.scala:29)
at org.jetbrains.plugins.scala.lang.psi.types.Conformance$.rightRec(Conformance.scala:219)
at org.jetbrains.plugins.scala.lang.psi.types.Conformance$.org$jetbrains$plugins$scala$lang$
at org.jetbrains.plugins.scala.lang.psi.types.Conformance$$anonfun$rightRec$4.apply(Conforma
at org.jetbrains.plugins.scala.lang.psi.types.Conformance$$anonfun$rightRec$4.apply(Conforma
at scala.collection.LinearSeqLike$class.find(LinearSeqLike.scala:147)
at scala.collection.immutable.List.find(List.scala:29)
at org.jetbrains.plugins.scala.lang.psi.types.Conformance$.rightRec(Conformance.scala:219)
at org.jetbrains.plugins.scala.lang.psi.types.Conformance$.org$jetbrains$plugins$scala$lang$
at org.jetbrains.plugins.scala.lang.psi.types.Conformance$$anonfun$org$jetbrains$plugins$sca
at org.jetbrains.plugins.scala.lang.psi.types.Conformance$$anonfun$org$jetbrains$plugins$sca
at scala.collection.IndexedSeqLike$$anonfun$1.apply(IndexedSeqLike.scala:77)
at scala.collection.IndexedSeqLike$$anonfun$1.apply(IndexedSeqLike.scala:77)
at scala.collection.IndexedSeqLike$class.segmentLength(IndexedSeqLike.scala:184)
at scala.collection.mutable.GenericArray.segmentLength(GenericArray.scala:25)
at scala.collection.SeqLike$class.prefixLength(SeqLike.scala:172)
at scala.collection.mutable.GenericArray.prefixLength(GenericArray.scala:25)
at scala.collection.IndexedSeqLike$class.find(IndexedSeqLike.scala:77)
at scala.collection.mutable.GenericArray.find(GenericArray.scala:25)
at org.jetbrains.plugins.scala.lang.psi.types.Conformance$.org$jetbrains$plugins$scala$lang$
at org.jetbrains.plugins.scala.lang.psi.types.Conformance$.conforms(Conformance.scala:26)
at org.jetbrains.plugins.scala.lang.psi.types.ScType$class.conforms(ScType.scala:23)
java.lang.Thread.State: RUNNABLE
at java.lang.Integer.hashCode(Integer.java:733)
at java.util.HashMap.get(HashMap.java:300)
at com.intellij.util.indexing.MemoryIndexStorage.read(MemoryIndexStorage.java:40)
at com.intellij.util.indexing.MapReduceIndex.getData(MapReduceIndex.java:34)
at com.intellij.psi.stubs.StubIndexImpl.get(StubIndexImpl.java:5)
at org.jetbrains.plugins.groovy.lang.stubs.GroovyShortNamesCache.getScriptClassesByFQName(Gr
at org.jetbrains.plugins.groovy.lang.stubs.GroovyShortNamesCache.getClassesByFQName(GroovySh
at org.jetbrains.plugins.groovy.lang.psi.impl.javaView.GroovyClassFinder.findClasses(GroovyC
at com.intellij.psi.impl.JavaPsiFacadeImpl.findClasses(JavaPsiFacadeImpl.java:2)
at com.intellij.psi.impl.file.PsiPackageImpl.a(PsiPackageImpl.java:62)
at com.intellij.psi.impl.file.PsiPackageImpl.a(PsiPackageImpl.java:91)
at com.intellij.psi.impl.file.PsiPackageImpl.processDeclarations(PsiPackageImpl.java:148)
at org.jetbrains.plugins.scala.lang.resolve.BaseProcessor.processElement(BaseProcessor.scala
at org.jetbrains.plugins.scala.lang.resolve.BaseProcessor.processType(BaseProcessor.scala:76
at org.jetbrains.plugins.scala.lang.resolve.BaseProcessor.processType(BaseProcessor.scala:65
at org.jetbrains.plugins.scala.lang.resolve.BaseProcessor.processType(BaseProcessor.scala:13
at org.jetbrains.plugins.scala.lang.resolve.BaseProcessor.processType(BaseProcessor.scala:65
at org.jetbrains.plugins.scala.lang.psi.types.ScProjectionType.equiv(ScProjectionType.scala:
at org.jetbrains.plugins.scala.lang.psi.types.ScDesignatorType.equiv(ScParameterizedType.sca
at org.jetbrains.plugins.scala.lang.psi.types.Conformance$.org$jetbrains$plugins$scala$lang$
at org.jetbrains.plugins.scala.lang.psi.types.Conformance$$anonfun$rightRec$4.apply(Conforma
at org.jetbrains.plugins.scala.lang.psi.types.Conformance$$anonfun$rightRec$4.apply(Conforma
at scala.collection.LinearSeqLike$class.find(LinearSeqLike.scala:147)
at scala.collection.immutable.List.find(List.scala:29)
at org.jetbrains.plugins.scala.lang.psi.types.Conformance$.rightRec(Conformance.scala:219)
at org.jetbrains.plugins.scala.lang.psi.types.Conformance$.org$jetbrains$plugins$scala$lang$
at org.jetbrains.plugins.scala.lang.psi.types.Conformance$$anonfun$rightRec$4.apply(Conforma
at org.jetbrains.plugins.scala.lang.psi.types.Conformance$$anonfun$rightRec$4.apply(Conforma
at scala.collection.LinearSeqLike$class.find(LinearSeqLike.scala:147)
at scala.collection.immutable.List.find(List.scala:29)
at org.jetbrains.plugins.scala.lang.psi.types.Conformance$.rightRec(Conformance.scala:219)
at org.jetbrains.plugins.scala.lang.psi.types.Conformance$.org$jetbrains$plugins$scala$lang$
at org.jetbrains.plugins.scala.lang.psi.types.Conformance$$anonfun$rightRec$4.apply(Conforma
at org.jetbrains.plugins.scala.lang.psi.types.Conformance$$anonfun$rightRec$4.apply(Conforma
at scala.collection.LinearSeqLike$class.find(LinearSeqLike.scala:147)
at scala.collection.immutable.List.find(List.scala:29)
at org.jetbrains.plugins.scala.lang.psi.types.Conformance$.rightRec(Conformance.scala:219)
at org.jetbrains.plugins.scala.lang.psi.types.Conformance$.org$jetbrains$plugins$scala$lang$
at org.jetbrains.plugins.scala.lang.psi.types.Conformance$$anonfun$rightRec$4.apply(Conforma
at org.jetbrains.plugins.scala.lang.psi.types.Conformance$$anonfun$rightRec$4.apply(Conforma
at scala.collection.LinearSeqLike$class.find(LinearSeqLike.scala:147)
at scala.collection.immutable.List.find(List.scala:29)
at org.jetbrains.plugins.scala.lang.psi.types.Conformance$.rightRec(Conformance.scala:219)
at org.jetbrains.plugins.scala.lang.psi.types.Conformance$.org$jetbrains$plugins$scala$lang$
at org.jetbrains.plugins.scala.lang.psi.types.Conformance$$anonfun$rightRec$4.apply(Conforma
at org.jetbrains.plugins.scala.lang.psi.types.Conformance$$anonfun$rightRec$4.apply(Conforma
at scala.collection.LinearSeqLike$class.find(LinearSeqLike.scala:147)
at scala.collection.immutable.List.find(List.scala:29)
java.lang.Thread.State: RUNNABLE
at gnu.trove.THash.size(THash.java:119)
at gnu.trove.TIterator.<init>(TIterator.java:46)
at gnu.trove.THashIterator.<init>(THashIterator.java:53)
at gnu.trove.THashMap$EntryView$EntryIterator.<init>(THashMap.java:525)
at gnu.trove.THashMap$EntryView.iterator(THashMap.java:534)
at gnu.trove.THashMap.putAll(THashMap.java:478)
at com.intellij.psi.ResolveState.put(ResolveState.java:38)
at org.jetbrains.plugins.scala.lang.psi.impl.toplevel.typedef.TypeDefinitionMembers$$anonfun
at org.jetbrains.plugins.scala.lang.psi.impl.toplevel.typedef.TypeDefinitionMembers$$anonfun
at scala.collection.Iterator$class.foreach(Iterator.scala:542)
at scala.collection.Iterator$$anon$20.foreach(Iterator.scala:326)
at scala.collection.IterableLike$class.foreach(IterableLike.scala:72)
at scala.collection.mutable.HashMap.foreach(HashMap.scala:21)
at org.jetbrains.plugins.scala.lang.psi.impl.toplevel.typedef.TypeDefinitionMembers$.process
at org.jetbrains.plugins.scala.lang.psi.impl.toplevel.typedef.TypeDefinitionMembers$.process
at org.jetbrains.plugins.scala.lang.psi.api.toplevel.typedef.ScTemplateDefinition$class.proc
at org.jetbrains.plugins.scala.lang.psi.impl.toplevel.typedef.ScClassImpl.processDeclaration
at org.jetbrains.plugins.scala.lang.psi.implicits.ScImplicitlyConvertible$class.treeWalkUp$1
at org.jetbrains.plugins.scala.lang.psi.implicits.ScImplicitlyConvertible$class.buildImplici
at org.jetbrains.plugins.scala.lang.psi.implicits.ScImplicitlyConvertible$class.implicitMap(
at org.jetbrains.plugins.scala.lang.psi.implicits.ScImplicitlyConvertible$class.getImplicitT
at org.jetbrains.plugins.scala.lang.psi.impl.expr.ScReferenceExpressionImpl.getImplicitTypes
at org.jetbrains.plugins.scala.lang.psi.impl.expr.ScReferenceExpressionImpl.processTypes$1(S
at org.jetbrains.plugins.scala.lang.psi.impl.expr.ScReferenceExpressionImpl.org$jetbrains$pl
at org.jetbrains.plugins.scala.lang.psi.impl.expr.ScReferenceExpressionImpl$MyResolver$.reso
at org.jetbrains.plugins.scala.lang.psi.impl.expr.ScReferenceExpressionImpl$MyResolver$.reso
at com.intellij.psi.impl.source.resolve.ResolveCache.a(ResolveCache.java:110)
at com.intellij.psi.impl.source.resolve.ResolveCache.resolveWithCaching(ResolveCache.java:39
at org.jetbrains.plugins.scala.lang.psi.impl.expr.ScReferenceExpressionImpl.multiResolve(ScR
at org.jetbrains.plugins.scala.lang.psi.api.base.ScReferenceElement$class.bind(ScReferenceEl
at org.jetbrains.plugins.scala.lang.psi.impl.expr.ScReferenceExpressionImpl.bind(ScReference
at org.jetbrains.plugins.scala.lang.psi.impl.expr.ScReferenceExpressionImpl.innerType(ScRefe
at org.jetbrains.plugins.scala.lang.psi.api.expr.ScExpression$class.typeWithUnderscore(ScExp
at org.jetbrains.plugins.scala.lang.psi.api.expr.ScExpression$class.getType(ScExpression.sca
at org.jetbrains.plugins.scala.lang.psi.impl.expr.ScReferenceExpressionImpl.getType(ScRefere
at org.jetbrains.plugins.scala.lang.psi.impl.expr.ScReferenceExpressionImpl.processTypes$1(S
at org.jetbrains.plugins.scala.lang.psi.impl.expr.ScReferenceExpressionImpl.org$jetbrains$pl
at org.jetbrains.plugins.scala.lang.psi.impl.expr.ScReferenceExpressionImpl$MyResolver$.reso
at org.jetbrains.plugins.scala.lang.psi.impl.expr.ScReferenceExpressionImpl$MyResolver$.reso
at com.intellij.psi.impl.source.resolve.ResolveCache.a(ResolveCache.java:110)
at com.intellij.psi.impl.source.resolve.ResolveCache.resolveWithCaching(ResolveCache.java:39
at org.jetbrains.plugins.scala.lang.psi.impl.expr.ScReferenceExpressionImpl.multiResolve(ScR
at org.jetbrains.plugins.scala.lang.psi.api.base.ScReferenceElement$class.bind(ScReferenceEl
at org.jetbrains.plugins.scala.lang.psi.impl.expr.ScReferenceExpressionImpl.bind(ScReference
at org.jetbrains.plugins.scala.lang.psi.impl.expr.ScCallExprImpl$class.innerType(ScCallExprI
at org.jetbrains.plugins.scala.lang.psi.impl.expr.ScInfixExprImpl.innerType(ScInfixExprImpl.
at org.jetbrains.plugins.scala.lang.psi.api.expr.ScExpression$class.typeWithUnderscore(ScExp
at org.jetbrains.plugins.scala.lang.psi.api.expr.ScExpression$class.getType(ScExpression.sca
Should I upgrade to 162 with build 108 or stick with 154?
This dump fully locked up the UI. No mouse or keyboard events are processed (see attached file). Had to kill the process.
Attachment(s):
i.txt.zip
Just locked it up again...
Attachment(s):
i.txt.zip
I'm hurting to have my "pleasure" back.... ;-)
As I see, it's not lock, it's more like infinite loop with no breaks for returning to UI. It's possible that it's also problem with performance. So if it's possible to give me an example, I'll find a way to fix this problem (you can attach file to any YouTrack issue with appropriate visibilty, if you don't want to open you sources and you can open it for us). By this thread dumps I cannot identify now, where exactly problem is.
Best regards,
Alexander Podkhalyuzin.
I have no problem opening the source -- it will be opened sourced at some point anyway. I'll try to package up something smaller though to make it easier to work with. Thanks!
Ok, I attached(ing) a maven project to scl-1590. See the comment there. Thanks again.