This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 164737 - IDE w/ FX plugins uses 60-90%+ CPU on dual core system all the time
Summary: IDE w/ FX plugins uses 60-90%+ CPU on dual core system all the time
Status: VERIFIED FIXED
Alias: None
Product: javafx
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: Macintosh All
: P2 blocker (vote)
Assignee: J Bachorik
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-05-07 23:23 UTC by Martin Brehovsky
Modified: 2009-11-20 04:34 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Brehovsky 2009-05-07 23:23:02 UTC
IDE w/ FX plugins uses 60-90%+ CPU on dual core system all the time. No editor open, only IDE started with 4 projects opened. Happens on marina build 
148 of FX plugins. The stacktrace shows this - looks like an issue in the tasklist interacting w/ compiler:

Full thread dump Java HotSpot(TM) Client VM (1.5.0_16-133 mixed mode):

"Inactive RequestProcessor thread [Was:Lookup Dispatch Thread/org.openide.loaders.FolderLookup$Dispatch]" daemon prio=1 tid=0x010f75f0 
nid=0x92aa00 in Object.wait() [0xb2c37000..0xb2c37d90]
	at java.lang.Object.wait(Native Method)
	- waiting on <0x0af44f40> (a java.lang.Object)
	at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:950)
	- locked <0x0af44f40> (a java.lang.Object)

"Inactive RequestProcessor thread [Was:Folder recognizer/org.openide.loaders.FolderList$ListTask]" daemon prio=1 tid=0x010f31d0 nid=0x977e00 in 
Object.wait() [0xb220e000..0xb220ed90]
	at java.lang.Object.wait(Native Method)
	- waiting on <0x0af44fb8> (a java.lang.Object)
	at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:950)
	- locked <0x0af44fb8> (a java.lang.Object)

"JavaFX Source Worker Thread" daemon prio=1 tid=0x52a01e00 nid=0xac9a00 waiting on condition [0xb4242000..0xb4242d90]
	at sun.misc.Unsafe.park(Native Method)
	at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:146)
	at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:1879)
	at java.util.concurrent.PriorityBlockingQueue.poll(PriorityBlockingQueue.java:236)
	at org.netbeans.modules.javafx.source.scheduler.CompilationJob.run(CompilationJob.java:107)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:417)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269)
	at java.util.concurrent.FutureTask.run(FutureTask.java:123)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
	at java.lang.Thread.run(Thread.java:613)

"Java Source Worker Thread" daemon prio=1 tid=0x01086de0 nid=0x9ace00 waiting on condition [0xb4c47000..0xb4c47d90]
	at sun.misc.Unsafe.park(Native Method)
	at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:146)
	at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:1879)
	at java.util.concurrent.PriorityBlockingQueue.poll(PriorityBlockingQueue.java:236)
	at org.netbeans.api.java.source.JavaSource$CompilationJob.run(JavaSource.java:1607)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:417)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269)
	at java.util.concurrent.FutureTask.run(FutureTask.java:123)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
	at java.lang.Thread.run(Thread.java:613)

"GSF Source Worker Thread" daemon prio=1 tid=0x01086ac0 nid=0x9ab400 waiting on condition [0xb4a46000..0xb4a46d90]
	at sun.misc.Unsafe.park(Native Method)
	at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:146)
	at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:1879)
	at java.util.concurrent.PriorityBlockingQueue.poll(PriorityBlockingQueue.java:236)
	at org.netbeans.napi.gsfret.source.Source$CompilationJob.run(Source.java:1337)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:417)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269)
	at java.util.concurrent.FutureTask.run(FutureTask.java:123)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
	at java.lang.Thread.run(Thread.java:613)

"org.netbeans.modules.gsfret.source.usages.RepositoryUpdater" daemon prio=1 tid=0x01076920 nid=0x964000 in Object.wait() 
[0xb2a1b000..0xb2a1bd90]
	at java.lang.Object.wait(Native Method)
	- waiting on <0x093d1e98> (a java.util.TaskQueue)
	at java.lang.Object.wait(Object.java:474)
	at java.util.TimerThread.mainLoop(Timer.java:483)
	- locked <0x093d1e98> (a java.util.TaskQueue)
	at java.util.TimerThread.run(Timer.java:462)

"DestroyJavaVM" prio=5 tid=0x01001680 nid=0xb0801000 waiting on condition [0x00000000..0xb0800060]

"AWT-EventQueue-1" prio=6 tid=0x01049880 nid=0x92ca00 in Object.wait() [0xb323a000..0xb323ad90]
	at java.lang.Object.wait(Native Method)
	- waiting on <0x08446410> (a org.netbeans.core.TimableEventQueue)
	at java.lang.Object.wait(Object.java:474)
	at java.awt.EventQueue.getNextEvent(EventQueue.java:345)
	- locked <0x08446410> (a org.netbeans.core.TimableEventQueue)
	at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:216)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:184)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:176)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)

"TimerQueue" daemon prio=5 tid=0x01018220 nid=0x932200 runnable [0xb3039000..0xb3039d90]
	at java.lang.Object.wait(Native Method)
	- waiting on <0x084464d0> (a javax.swing.TimerQueue)
	at javax.swing.TimerQueue.run(TimerQueue.java:236)
	- locked <0x084464d0> (a javax.swing.TimerQueue)
	at java.lang.Thread.run(Thread.java:613)

"Default RequestProcessor" daemon prio=1 tid=0x010448d0 nid=0x929c00 in Object.wait() [0xb2e38000..0xb2e38d90]
	at java.lang.Object.wait(Native Method)
	- waiting on <0x09559588> (a java.lang.Object)
	at java.lang.Object.wait(Object.java:474)
	at org.netbeans.modules.tasklist.impl.FileScanningWorker.run(FileScanningWorker.java:205)
	- locked <0x09559588> (a java.lang.Object)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:572)
	at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:997)

"*** JFluid Separate Command Execution Thread" daemon prio=5 tid=0x01045050 nid=0x8c0400 in Object.wait() [0xb1c0b000..0xb1c0bd90]
	at java.lang.Object.wait(Native Method)
	- waiting on <0x0841b348> (a java.lang.Object)
	at java.lang.Object.wait(Object.java:474)
	at org.netbeans.lib.profiler.ProfilerClient$SeparateCmdExecutionThread.run(ProfilerClient.java:101)
	- locked <0x0841b348> (a java.lang.Object)

"Thread-9" daemon prio=5 tid=0x01042200 nid=0x92e600 in Object.wait() [0xb383d000..0xb383dd90]
	at java.lang.Object.wait(Native Method)
	- waiting on <0x082ea508> (a java.util.LinkedList)
	at java.lang.Object.wait(Object.java:474)
	at java.util.prefs.AbstractPreferences$EventDispatchThread.run(AbstractPreferences.java:1456)
	- locked <0x082ea508> (a java.util.LinkedList)

"Java2D Disposer" daemon prio=10 tid=0x010133f0 nid=0x8f8c00 in Object.wait() [0xb281a000..0xb281ad90]
	at java.lang.Object.wait(Native Method)
	- waiting on <0x07d20078> (a java.lang.ref.ReferenceQueue$Lock)
	at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:120)
	- locked <0x07d20078> (a java.lang.ref.ReferenceQueue$Lock)
	at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:136)
	at sun.java2d.Disposer.run(Disposer.java:125)
	at java.lang.Thread.run(Thread.java:613)

"AWT-Shutdown" prio=5 tid=0x01012590 nid=0x8c6c00 in Object.wait() [0xb2610000..0xb2610d90]
	at java.lang.Object.wait(Native Method)
	- waiting on <0x07d20108> (a java.lang.Object)
	at java.lang.Object.wait(Object.java:474)
	at sun.awt.AWTAutoShutdown.run(AWTAutoShutdown.java:259)
	- locked <0x07d20108> (a java.lang.Object)
	at java.lang.Thread.run(Thread.java:613)

"AWT-AppKit" daemon prio=5 tid=0x01012150 nid=0xa009c720 runnable [0x00000000..0xbfffd768]

"Active Reference Queue Daemon" daemon prio=1 tid=0x01011520 nid=0x8c3e00 in Object.wait() [0xb240f000..0xb240fd90]
	at java.lang.Object.wait(Native Method)
	- waiting on <0x07d00c50> (a java.lang.ref.ReferenceQueue$Lock)
	at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:120)
	- locked <0x07d00c50> (a java.lang.ref.ReferenceQueue$Lock)
	at org.openide.util.Utilities$ActiveQueue.run(Utilities.java:3088)
	at java.lang.Thread.run(Thread.java:613)

"ErrorAnnotator worker" daemon prio=1 tid=0x0100fc90 nid=0x8c2200 runnable [0xb200c000..0xb200dd90]
	at com.sun.tools.javac.code.Scope.enter(Scope.java:197)
	at com.sun.tools.javafx.comp.JavafxMemberEnter.importNamed(JavafxMemberEnter.java:381)
	at com.sun.tools.javafx.comp.JavafxMemberEnter.visitImport(JavafxMemberEnter.java:539)
	at com.sun.tools.javafx.tree.JFXImport.accept(JFXImport.java:43)
	at com.sun.tools.javafx.comp.JavafxMemberEnter.memberEnter(JavafxMemberEnter.java:419)
	at com.sun.tools.javafx.comp.JavafxMemberEnter.memberEnter(JavafxMemberEnter.java:431)
	at com.sun.tools.javafx.comp.JavafxMemberEnter.visitScript(JavafxMemberEnter.java:473)
	at com.sun.tools.javafx.tree.JFXScript.accept(JFXScript.java:89)
	at com.sun.tools.javafx.comp.JavafxMemberEnter.memberEnter(JavafxMemberEnter.java:419)
	at com.sun.tools.javafx.comp.JavafxMemberEnter.complete(JavafxMemberEnter.java:763)
	at com.sun.tools.javac.code.Symbol.complete(Symbol.java:400)
	at com.sun.tools.javac.code.Symbol$ClassSymbol.complete(Symbol.java:777)
	at com.sun.tools.javafx.comp.JavafxEnter.complete(JavafxEnter.java:417)
	at com.sun.tools.javafx.main.JavafxCompiler.complete(JavafxCompiler.java:608)
	at com.sun.tools.javafx.comp.JavafxClassReader.complete(JavafxClassReader.java:485)
	at com.sun.tools.javac.code.Symbol.complete(Symbol.java:400)
	at com.sun.tools.javac.code.Symbol$ClassSymbol.complete(Symbol.java:777)
	at com.sun.tools.javac.jvm.ClassReader.loadClass(ClassReader.java:1981)
	at com.sun.tools.javafx.comp.JavafxResolve.loadClass(JavafxResolve.java:1043)
	at com.sun.tools.javafx.comp.JavafxResolve.findGlobalType(JavafxResolve.java:1122)
	at com.sun.tools.javafx.comp.JavafxResolve.findType(JavafxResolve.java:1210)
	at com.sun.tools.javafx.comp.JavafxResolve.findIdent(JavafxResolve.java:1234)
	at com.sun.tools.javafx.comp.JavafxResolve.resolveIdent(JavafxResolve.java:1423)
	at com.sun.tools.javafx.comp.JavafxAttr.visitIdent(JavafxAttr.java:506)
	at com.sun.tools.javafx.tree.JFXIdent.accept(JFXIdent.java:52)
	at com.sun.tools.javafx.comp.JavafxAttr.attribTree(JavafxAttr.java:280)
	at com.sun.tools.javafx.comp.JavafxAttr.attribTree(JavafxAttr.java:265)
	at com.sun.tools.javafx.comp.JavafxAttr.attribType(JavafxAttr.java:327)
	at com.sun.tools.javafx.comp.JavafxAttr.visitInstanciate(JavafxAttr.java:1409)
	at com.sun.tools.javafx.tree.JFXInstanciate.accept(JFXInstanciate.java:60)
	at com.sun.tools.javafx.comp.JavafxAttr.attribTree(JavafxAttr.java:280)
	at com.sun.tools.javafx.comp.JavafxAttr.attribTree(JavafxAttr.java:261)
	at com.sun.tools.javafx.comp.JavafxAttr.visitFunctionInvocation(JavafxAttr.java:2211)
	at com.sun.tools.javafx.tree.JFXFunctionInvocation.accept(JFXFunctionInvocation.java:53)
	at com.sun.tools.javafx.comp.JavafxAttr.attribTree(JavafxAttr.java:280)
	at com.sun.tools.javafx.comp.JavafxAttr.attribTree(JavafxAttr.java:265)
	at com.sun.tools.javafx.comp.JavafxAttr.attribExpr(JavafxAttr.java:321)
	at com.sun.tools.javafx.comp.JavafxAttr.visitBlockExpression(JavafxAttr.java:1347)
	at com.sun.tools.javafx.tree.JFXBlock.accept(JFXBlock.java:83)
	at com.sun.tools.javafx.comp.JavafxAttr.attribTree(JavafxAttr.java:280)
	at com.sun.tools.javafx.comp.JavafxAttr.attribTree(JavafxAttr.java:265)
	at com.sun.tools.javafx.comp.JavafxAttr.attribExpr(JavafxAttr.java:321)
	at com.sun.tools.javafx.comp.JavafxAttr.visitPostInitDefinition(JavafxAttr.java:2979)
	at com.sun.tools.javafx.tree.JFXPostInitDefinition.accept(JFXPostInitDefinition.java:51)
	at com.sun.tools.javafx.comp.JavafxAttr.attribTree(JavafxAttr.java:280)
	at com.sun.tools.javafx.comp.JavafxAttr.attribTree(JavafxAttr.java:265)
	at com.sun.tools.javafx.comp.JavafxAttr.attribDecl(JavafxAttr.java:334)
	at com.sun.tools.javafx.comp.JavafxAttr.attribClassBody(JavafxAttr.java:3682)
	at com.sun.tools.javafx.comp.JavafxAttr.attribClass(JavafxAttr.java:2794)
	at com.sun.tools.javafx.comp.JavafxAttr.attribClass(JavafxAttr.java:2749)
	at com.sun.tools.javafx.main.JavafxCompiler.attribute(JavafxCompiler.java:936)
	at com.sun.tools.javafx.main.JavafxCompiler.attribute(JavafxCompiler.java:912)
	at com.sun.tools.javafx.main.JavafxCompiler.attribute(JavafxCompiler.java:899)
	at com.sun.tools.javafx.api.JavafxcTaskImpl.analyze(JavafxcTaskImpl.java:250)
	at org.netbeans.api.javafx.source.JavaFXSource.moveToPhase(JavaFXSource.java:280)
	at org.netbeans.api.javafx.source.CompilationInfoImpl.toPhase(CompilationInfoImpl.java:131)
	at org.netbeans.api.javafx.source.CompilationController.toPhase(CompilationController.java:72)
	at org.netbeans.modules.javafx.source.tasklist.FXErrorAnnotator$1.run(FXErrorAnnotator.java:285)
	at org.netbeans.modules.javafx.source.tasklist.FXErrorAnnotator$1.run(FXErrorAnnotator.java:282)
	at org.netbeans.api.javafx.source.JavaFXSource.runUserActionTask(JavaFXSource.java:503)
	at org.netbeans.modules.javafx.source.tasklist.FXErrorAnnotator.haveError(FXErrorAnnotator.java:278)
	at org.netbeans.modules.javafx.source.tasklist.FXErrorAnnotator.haveError(FXErrorAnnotator.java:301)
	at org.netbeans.modules.javafx.source.tasklist.FXErrorAnnotator.haveError(FXErrorAnnotator.java:301)
	at org.netbeans.modules.javafx.source.tasklist.FXErrorAnnotator.haveError(FXErrorAnnotator.java:301)
	at org.netbeans.modules.javafx.source.tasklist.FXErrorAnnotator.haveError(FXErrorAnnotator.java:301)
	at org.netbeans.modules.javafx.source.tasklist.FXErrorAnnotator.haveError(FXErrorAnnotator.java:301)
	at org.netbeans.modules.javafx.source.tasklist.FXErrorAnnotator.haveError(FXErrorAnnotator.java:301)
	at org.netbeans.modules.javafx.source.tasklist.FXErrorAnnotator.haveError(FXErrorAnnotator.java:301)
	at org.netbeans.modules.javafx.source.tasklist.FXErrorAnnotator.haveError(FXErrorAnnotator.java:301)
	at org.netbeans.modules.javafx.source.tasklist.FXErrorAnnotator$2.run(FXErrorAnnotator.java:355)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:572)
	at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:997)

"Timer-0" daemon prio=5 tid=0x0100f720 nid=0x8c1200 runnable [0xb1e0c000..0xb1e0cd90]
	at java.util.TimerThread.mainLoop(Timer.java:480)
	- waiting to lock <0x07d20308> (a java.util.TaskQueue)
	at java.util.TimerThread.run(Timer.java:462)

"CLI Requests Server" daemon prio=5 tid=0x0100f3a0 nid=0x8a0c00 runnable [0xb1a0a000..0xb1a0ad90]
	at java.net.PlainSocketImpl.socketAccept(Native Method)
	at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:384)
	- locked <0x07d203a0> (a java.net.SocksSocketImpl)
	at java.net.ServerSocket.implAccept(ServerSocket.java:450)
	at java.net.ServerSocket.accept(ServerSocket.java:421)
	at org.netbeans.CLIHandler$Server.run(CLIHandler.java:1010)

"Low Memory Detector" daemon prio=5 tid=0x01009030 nid=0x806200 runnable [0x00000000..0x00000000]

"CompilerThread0" daemon prio=9 tid=0x010086c0 nid=0x81a800 waiting on condition [0x00000000..0xb14077d8]

"Signal Dispatcher" daemon prio=9 tid=0x010082f0 nid=0x81c200 waiting on condition [0x00000000..0x00000000]

"Finalizer" daemon prio=8 tid=0x010079a0 nid=0x819600 in Object.wait() [0xb1005000..0xb1005d90]
	at java.lang.Object.wait(Native Method)
	- waiting on <0x07d00ea0> (a java.lang.ref.ReferenceQueue$Lock)
	at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:120)
	- locked <0x07d00ea0> (a java.lang.ref.ReferenceQueue$Lock)
	at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:136)
	at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:159)

"Reference Handler" daemon prio=10 tid=0x010075c0 nid=0x818800 runnable [0xb0e04000..0xb0e04d90]
	at java.lang.Object.wait(Native Method)
	- waiting on <0x07d00d00> (a java.lang.ref.Reference$Lock)
	at java.lang.Object.wait(Object.java:474)
	at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:116)
	- locked <0x07d00d00> (a java.lang.ref.Reference$Lock)

"VM Thread" prio=9 tid=0x01006d10 nid=0x817a00 runnable 

"VM Periodic Task Thread" prio=9 tid=0x01009b70 nid=0x807000 waiting on condition 

"Exception Catcher Thread" prio=10 tid=0x010018d0 nid=0x80bc00 runnable
Comment 1 Martin Brehovsky 2009-05-07 23:26:44 UTC
Disabling tasklist module didn't help
Comment 2 Lukas Hasik 2009-09-18 12:28:48 UTC
fixing typo in TM. 5.5 -> 6.8
Comment 3 Petr Nejedly 2009-10-16 10:20:50 UTC
This (continuous scan initiated by the tasklist module) used to be a problem on all platforms, but I haven't experienced
it for a while. Does this still happen? At least randomly?
Comment 4 J Bachorik 2009-10-16 11:57:24 UTC
This is caused by the FXErrorAnnotator which does huge amounts of repetitive work just to badge the files correctly.
A more lightweight, optimized approach is needed. I have some patches ready but will apply them after 68_Beta not to
cause any last moment regressions. 
Comment 5 J Bachorik 2009-10-30 17:17:50 UTC
ErrorAnnotator now does significantly less work - http://hg.netbeans.org/javafx/rev/595a0ccc3f90
Comment 6 Alexandr Scherbatiy 2009-11-20 04:34:31 UTC
unable to reproduce in build 200911200201