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 122685 - Autocomplete locks up when enter is pressed.
Summary: Autocomplete locks up when enter is pressed.
Status: RESOLVED WONTFIX
Alias: None
Product: editor
Classification: Unclassified
Component: Completion & Templates (show other bugs)
Version: 6.x
Hardware: All All
: P1 blocker (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-11-24 21:08 UTC by i30817
Modified: 2007-11-27 09:38 UTC (History)
1 user (show)

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 i30817 2007-11-24 21:08:52 UTC
Some auto complete commands have the quality of completely deadlocking the ide when the enter key is pressed.
I think this is showstopper for you.

For example in one of my projects:
Calling String.copyVal (auto complete enter)
is enough to deadlock the JVM in 99% cpu used, most times.
In netbeans beta 2 

Microsoft Windows XP [Version 5.1.2600] (service pack 2)
(C) Copyright 1985-2001 Microsoft Corp.

java version "1.6.0_02"
Java(TM) SE Runtime Environment (build 1.6.0_02-b06)
Java HotSpot(TM) Client VM (build 1.6.0_02-b06, mixed mode)

Genuine Intel(R) CPU
2160 @ 1.80GHz
1.79GHz, 0,99 GB of RAM

the java console says:

Dump thread list ...
Group main,ac=9,agc=1,pri=10
    main,5,alive
    AWT-Windows,6,alive,daemon
    traceMsgQueueThread,5,alive,daemon
    CacheCleanUpThread,5,alive,daemon
    Thread-10,5,alive
    AWT-Shutdown,5,alive
Group Plugin Thread Group,ac=3,agc=0,pri=10
    ConsoleWriterThread,6,alive,daemon
    TimerQueue,5,alive,daemon
    AWT-EventQueue-1,6,alive
Done.
Dump thread stack ...
----------------------------------------------------
2007-11-24 21:03:25
Full thread dump Java HotSpot(TM) Client VM (1.6.0_02-b06 mixed mode):

"AWT-EventQueue-1" prio=6 tid=0x05804000 nid=0xa44 waiting on condition [0x0445f000..0x0445fb14]
   java.lang.Thread.State: RUNNABLE
	at com.sun.deploy.util.ConsoleHelper.dumpAllStacksImpl(Native Method)
	at com.sun.deploy.util.ConsoleHelper.dumpAllStacks(Unknown Source)
	at sun.plugin.util.PluginConsoleController.dumpAllStacks(Unknown Source)
	at com.sun.deploy.util.ConsoleWindow$2.actionPerformed(Unknown Source)
	at javax.swing.JComponent$ActionStandin.actionPerformed(Unknown Source)
	at javax.swing.SwingUtilities.notifyAction(Unknown Source)
	at javax.swing.JComponent.processKeyBinding(Unknown Source)
	at javax.swing.KeyboardManager.fireBinding(Unknown Source)
	at javax.swing.KeyboardManager.fireKeyboardAction(Unknown Source)
	at javax.swing.JComponent.processKeyBindingsForAllComponents(Unknown Source)
	at javax.swing.JComponent.processKeyBindings(Unknown Source)
	at javax.swing.JComponent.processKeyEvent(Unknown Source)
	at java.awt.Component.processEvent(Unknown Source)
	at java.awt.Container.processEvent(Unknown Source)
	at java.awt.Component.dispatchEventImpl(Unknown Source)
	at java.awt.Container.dispatchEventImpl(Unknown Source)
	at java.awt.Component.dispatchEvent(Unknown Source)
	at java.awt.KeyboardFocusManager.redispatchEvent(Unknown Source)
	at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(Unknown Source)
	at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(Unknown Source)
	at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(Unknown Source)
	at java.awt.DefaultKeyboardFocusManager.dispatchEvent(Unknown Source)
	at java.awt.Component.dispatchEventImpl(Unknown Source)
	at java.awt.Container.dispatchEventImpl(Unknown Source)
	at java.awt.Window.dispatchEventImpl(Unknown Source)
	at java.awt.Component.dispatchEvent(Unknown Source)
	at java.awt.EventQueue.dispatchEvent(Unknown Source)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.run(Unknown Source)

"AWT-Shutdown" prio=6 tid=0x057dd400 nid=0xb0c in Object.wait() [0x01f3f000..0x01f3fb94]
   java.lang.Thread.State: WAITING (on object monitor)
	at java.lang.Object.wait(Native Method)
	- waiting on <0x107c27b8> (a java.lang.Object)
	at java.lang.Object.wait(Object.java:485)
	at sun.awt.AWTAutoShutdown.run(Unknown Source)
	- locked <0x107c27b8> (a java.lang.Object)
	at java.lang.Thread.run(Unknown Source)

"TimerQueue" daemon prio=6 tid=0x057d9400 nid=0x888 in Object.wait() [0x05bcf000..0x05bcfc94]
   java.lang.Thread.State: WAITING (on object monitor)
	at java.lang.Object.wait(Native Method)
	- waiting on <0x100f04b0> (a javax.swing.TimerQueue)
	at javax.swing.TimerQueue.run(Unknown Source)
	- locked <0x100f04b0> (a javax.swing.TimerQueue)
	at java.lang.Thread.run(Unknown Source)

"ConsoleWriterThread" daemon prio=6 tid=0x0491f800 nid=0x648 in Object.wait() [0x04bdf000..0x04bdfd14]
   java.lang.Thread.State: WAITING (on object monitor)
	at java.lang.Object.wait(Native Method)
	- waiting on <0x10804a98> (a java.lang.Object)
	at java.lang.Object.wait(Object.java:485)
	at com.sun.deploy.util.ConsoleTraceListener$ConsoleWriterThread.run(Unknown Source)
	- locked <0x10804a98> (a java.lang.Object)

"Thread-10" prio=6 tid=0x05862c00 nid=0xdec runnable [0x00000000..0x0a26f714]
   java.lang.Thread.State: RUNNABLE

"CacheCleanUpThread" daemon prio=6 tid=0x05825c00 nid=0xde8 in Object.wait() [0x0a16f000..0x0a16fb94]
   java.lang.Thread.State: WAITING (on object monitor)
	at java.lang.Object.wait(Native Method)
	- waiting on <0x107f8748> (a com.sun.deploy.cache.CleanupThread)
	at java.lang.Object.wait(Object.java:485)
	at com.sun.deploy.cache.CleanupThread.run(Unknown Source)
	- locked <0x107f8748> (a com.sun.deploy.cache.CleanupThread)

"traceMsgQueueThread" daemon prio=6 tid=0x05807c00 nid=0xde4 in Object.wait() [0x0a06f000..0x0a06fc14]
   java.lang.Thread.State: WAITING (on object monitor)
	at java.lang.Object.wait(Native Method)
	- waiting on <0x107c4b58> (a java.util.ArrayList)
	at java.lang.Object.wait(Object.java:485)
	at com.sun.deploy.util.Trace$TraceMsgQueueChecker.run(Unknown Source)
	- locked <0x107c4b58> (a java.util.ArrayList)
	at java.lang.Thread.run(Unknown Source)

"AWT-Windows" daemon prio=6 tid=0x05804c00 nid=0xde0 runnable [0x09f6f000..0x09f6fc94]
   java.lang.Thread.State: RUNNABLE
	at sun.awt.windows.WToolkit.eventLoop(Native Method)
	at sun.awt.windows.WToolkit.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)

"Java2D Disposer" daemon prio=10 tid=0x05801800 nid=0xd3c in Object.wait() [0x09d6f000..0x09d6fd94]
   java.lang.Thread.State: WAITING (on object monitor)
	at java.lang.Object.wait(Native Method)
	- waiting on <0x107c2850> (a java.lang.ref.ReferenceQueue$Lock)
	at java.lang.ref.ReferenceQueue.remove(Unknown Source)
	- locked <0x107c2850> (a java.lang.ref.ReferenceQueue$Lock)
	at java.lang.ref.ReferenceQueue.remove(Unknown Source)
	at sun.java2d.Disposer.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)

"Low Memory Detector" daemon prio=6 tid=0x048ef000 nid=0x798 runnable [0x00000000..0x00000000]
   java.lang.Thread.State: RUNNABLE

"CompilerThread0" daemon prio=10 tid=0x048ea400 nid=0xdd0 waiting on condition [0x00000000..0x051df71c]
   java.lang.Thread.State: RUNNABLE

"Attach Listener" daemon prio=10 tid=0x048e9000 nid=0xdcc runnable [0x00000000..0x00000000]
   java.lang.Thread.State: RUNNABLE

"Signal Dispatcher" daemon prio=10 tid=0x048e8400 nid=0x438 runnable [0x00000000..0x00000000]
   java.lang.Thread.State: RUNNABLE

"Finalizer" daemon prio=8 tid=0x048da800 nid=0xbc4 in Object.wait() [0x04edf000..0x04edfc94]
   java.lang.Thread.State: WAITING (on object monitor)
	at java.lang.Object.wait(Native Method)
	- waiting on <0x107c2aa8> (a java.lang.ref.ReferenceQueue$Lock)
	at java.lang.ref.ReferenceQueue.remove(Unknown Source)
	- locked <0x107c2aa8> (a java.lang.ref.ReferenceQueue$Lock)
	at java.lang.ref.ReferenceQueue.remove(Unknown Source)
	at java.lang.ref.Finalizer$FinalizerThread.run(Unknown Source)

"Reference Handler" daemon prio=10 tid=0x048d6000 nid=0xb6c in Object.wait() [0x04ddf000..0x04ddfd14]
   java.lang.Thread.State: WAITING (on object monitor)
	at java.lang.Object.wait(Native Method)
	- waiting on <0x107c2658> (a java.lang.ref.Reference$Lock)
	at java.lang.Object.wait(Object.java:485)
	at java.lang.ref.Reference$ReferenceHandler.run(Unknown Source)
	- locked <0x107c2658> (a java.lang.ref.Reference$Lock)

"main" prio=6 tid=0x02ba9c00 nid=0xa64 runnable [0x00000000..0x0012f084]
   java.lang.Thread.State: RUNNABLE

"VM Thread" prio=10 tid=0x048d1800 nid=0x6f8 runnable 

"VM Periodic Task Thread" prio=10 tid=0x048f0800 nid=0x80 waiting on condition 

hread" prio=10 tid=0x048d1800 nid=0x6f8 runnable 

"VM Periodic Task Thread" prio=10 tid=0x048f0800 nid=0x80 waiting on condition 

----------------------------------------------------
Done.
Comment 1 i30817 2007-11-24 22:07:50 UTC
Sorry i believe i dumped a applet instead of netbeans. I've since connected netbeans to jconsole and in the MXBeans ->
Threading -> Operations -> findMonitorDeadlockedThreads() it returns null. However it is most definitly live-locked at
least.

I also see that the version reported by jconsole is Java Client VM 1.5.0_04-b05 even if the java version in the console
shows jre 1.6.0_02. Probably netbeans is using the installed sdk (java 1.5) for running and compiling instead of running
on 1.6 and compiling on 1.5 and some older bug is surfacing.
Comment 2 Jiri Prox 2007-11-26 13:58:53 UTC
Please attach the correct thereadump. You can also capture it in console where are NB launched.
The JDK used for running IDE can be set in netbeans.conf or as commandline options. I needn't to be the lastest JDK in
system.  JDK version for running projects is set in project properties
Comment 3 i30817 2007-11-26 15:35:47 UTC
Here it is. At the moment i only have the 1.5 jdk installed here





Full thread dump Java HotSpot(TM) Client VM (1.5.0_04-b05 mixed mode):

"Inactive RequestProcessor thread [Was:TimedSoftReference/org.openide.util.TimedSoftReference]" daemon prio=2
tid=0x256b63a8 nid=0xe10 in Object.wait() [0x268cf000..0x268cfd68]
	at java.lang.Object.wait(Native Method)
	- waiting on <0x042f9b18> (a java.lang.Object)
	at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:939)
	- locked <0x042f9b18> (a java.lang.Object)

"Keep-Alive-Timer" daemon prio=9 tid=0x256baac0 nid=0xa94 runnable [0x2635f000..0x2635f9e8]
	at java.lang.String.<init>(String.java:208)
	at java.lang.StringBuilder.toString(StringBuilder.java:431)
	at sun.net.www.http.KeepAliveKey.hashCode(KeepAliveCache.java:309)
	at java.util.Hashtable.remove(Hashtable.java:438)
	- locked <0x04256fc0> (a sun.net.www.http.KeepAliveCache)
	at sun.net.www.http.KeepAliveCache.removeVector(KeepAliveCache.java:125)
	- locked <0x04256fc0> (a sun.net.www.http.KeepAliveCache)
	at sun.net.www.http.KeepAliveCache.run(KeepAliveCache.java:191)
	- locked <0x04256fc0> (a sun.net.www.http.KeepAliveCache)
	at java.lang.Thread.run(Thread.java:595)

"DestroyJavaVM" prio=5 tid=0x000388c8 nid=0x260 waiting on condition [0x00000000..0x0007fae8]

"AWT-EventQueue-1" prio=7 tid=0x1ab873d0 nid=0x408 runnable [0x1c1ef000..0x1c1efce8]
	at java.util.concurrent.locks.AbstractQueuedSynchronizer.fullGetFirstQueuedThread(AbstractQueuedSynchronizer.java:1280)
	at java.util.concurrent.locks.AbstractQueuedSynchronizer.getFirstQueuedThread(AbstractQueuedSynchronizer.java:1233)
	at java.util.concurrent.locks.ReentrantLock$FairSync.tryAcquire(ReentrantLock.java:208)
	at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:1041)
	at java.util.concurrent.locks.ReentrantLock$FairSync.lock(ReentrantLock.java:197)
	at java.util.concurrent.locks.ReentrantLock.lock(ReentrantLock.java:256)
	at org.netbeans.api.java.source.JavaSource$JavaSourceAccessorImpl.lockJavaCompiler(JavaSource.java:1913)
	at org.netbeans.modules.java.source.save.Reformatter$Lock.lock(Reformatter.java:152)
	at org.netbeans.modules.editor.indent.TaskHandler$MimeItem.lock(TaskHandler.java:441)
	at org.netbeans.modules.editor.indent.TaskHandler.lock(TaskHandler.java:190)
	at org.netbeans.modules.editor.indent.IndentImpl.reformatLock(IndentImpl.java:159)
	- locked <0x04a20170> (a org.netbeans.modules.editor.indent.IndentImpl)
	at org.netbeans.modules.editor.indent.FormatterImpl.reformatLock(FormatterImpl.java:92)
	at org.netbeans.lib.editor.codetemplates.CodeTemplateInsertHandler.insertTemplate(CodeTemplateInsertHandler.java:305)
	at org.netbeans.lib.editor.codetemplates.CodeTemplateInsertHandler.processTemplate(CodeTemplateInsertHandler.java:263)
	at org.netbeans.lib.editor.codetemplates.CodeTemplateManagerOperation.insert(CodeTemplateManagerOperation.java:244)
	at org.netbeans.lib.editor.codetemplates.api.CodeTemplate.insert(CodeTemplate.java:100)
	at org.netbeans.modules.editor.java.JavaCompletionItem$MethodItem.substituteText(JavaCompletionItem.java:1369)
	at org.netbeans.modules.editor.java.JavaCompletionItem.defaultAction(JavaCompletionItem.java:235)
	at org.netbeans.modules.editor.completion.CompletionImpl.dispatchKeyEvent(CompletionImpl.java:543)
	at org.netbeans.modules.editor.completion.CompletionImpl.keyPressed(CompletionImpl.java:347)
	at java.awt.AWTEventMulticaster.keyPressed(AWTEventMulticaster.java:192)
	at java.awt.AWTEventMulticaster.keyPressed(AWTEventMulticaster.java:191)
	at java.awt.Component.processKeyEvent(Component.java:5446)
	at javax.swing.JComponent.processKeyEvent(JComponent.java:2713)
	at java.awt.Component.processEvent(Component.java:5265)
	at java.awt.Container.processEvent(Container.java:1966)
	at java.awt.Component.dispatchEventImpl(Component.java:3955)
	at java.awt.Container.dispatchEventImpl(Container.java:2024)
	at java.awt.Component.dispatchEvent(Component.java:3803)
	at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1810)
	at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:672)
	at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:920)
	at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:798)
	at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:636)
	at java.awt.Component.dispatchEventImpl(Component.java:3841)
	at java.awt.Container.dispatchEventImpl(Container.java:2024)
	at java.awt.Window.dispatchEventImpl(Window.java:1774)
	at java.awt.Component.dispatchEvent(Component.java:3803)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
	at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)

"Thread-8" daemon prio=5 tid=0x1aaf5000 nid=0xa14 in Object.wait() [0x25b5f000..0x25b5fd68]
	at java.lang.Object.wait(Native Method)
	- waiting on <0x03be1f50> (a java.util.LinkedList)
	at java.lang.Object.wait(Object.java:474)
	at java.util.prefs.AbstractPreferences$EventDispatchThread.run(AbstractPreferences.java:1456)
	- locked <0x03be1f50> (a java.util.LinkedList)

"*** JFluid Separate Command Execution Thread" daemon prio=5 tid=0x1aada998 nid=0x8c4 in Object.wait()
[0x2514f000..0x2514fae8]
	at java.lang.Object.wait(Native Method)
	- waiting on <0x03ccd700> (a java.lang.Object)
	at java.lang.Object.wait(Object.java:474)
	at org.netbeans.lib.profiler.ProfilerClient$SeparateCmdExecutionThread.run(ProfilerClient.java:104)
	- locked <0x03ccd700> (a java.lang.Object)

"Default RequestProcessor" daemon prio=2 tid=0x1aaefbc0 nid=0xca4 waiting on condition [0x24f4f000..0x24f4fb68]
	at java.util.HashMap.addEntry(HashMap.java:743)
	at java.util.HashMap.put(HashMap.java:395)
	at java.util.HashSet.add(HashSet.java:194)
	at org.openide.modules.Dependency.create(Dependency.java:387)
	at org.netbeans.modules.autoupdate.updateprovider.DummyModuleInfo.parseDeps(DummyModuleInfo.java:174)
	at org.netbeans.modules.autoupdate.updateprovider.DummyModuleInfo.<init>(DummyModuleInfo.java:111)
	at org.netbeans.modules.autoupdate.updateprovider.ModuleItem.getModuleInfo(ModuleItem.java:154)
	at org.netbeans.modules.autoupdate.services.UpdateUnitFactory.appendUpdateItems(UpdateUnitFactory.java:211)
	at org.netbeans.modules.autoupdate.services.UpdateUnitFactory.getUpdateUnits(UpdateUnitFactory.java:142)
	at org.netbeans.modules.autoupdate.services.UpdateManagerImpl$Cache.<init>(UpdateManagerImpl.java:186)
	at org.netbeans.modules.autoupdate.services.UpdateManagerImpl.getCache(UpdateManagerImpl.java:162)
	at org.netbeans.modules.autoupdate.services.UpdateManagerImpl.getUpdateUnits(UpdateManagerImpl.java:91)
	at org.netbeans.api.autoupdate.UpdateManager.getUpdateUnits(UpdateManager.java:100)
	at
org.netbeans.modules.autoupdate.ui.actions.AutoupdateCheckScheduler.checkUpdateElements(AutoupdateCheckScheduler.java:149)
	at org.netbeans.modules.autoupdate.ui.actions.AutoupdateCheckScheduler.access$200(AutoupdateCheckScheduler.java:76)
	at org.netbeans.modules.autoupdate.ui.actions.AutoupdateCheckScheduler$3.run(AutoupdateCheckScheduler.java:129)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:561)
	at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:986)

"Default RequestProcessor" daemon prio=2 tid=0x1aaeab70 nid=0x854 runnable [0x24d4f000..0x24d4fbe8]
	at java.util.concurrent.locks.AbstractQueuedSynchronizer.fullGetFirstQueuedThread(AbstractQueuedSynchronizer.java:1280)
	at java.util.concurrent.locks.AbstractQueuedSynchronizer.getFirstQueuedThread(AbstractQueuedSynchronizer.java:1233)
	at java.util.concurrent.locks.ReentrantLock$FairSync.tryAcquire(ReentrantLock.java:208)
	at java.util.concurrent.locks.AbstractQueuedSynchronizer.tryAcquireNanos(AbstractQueuedSynchronizer.java:1087)
	at java.util.concurrent.locks.ReentrantLock.tryLock(ReentrantLock.java:416)
	at org.netbeans.api.java.source.JavaSource.runWhenScanFinished(JavaSource.java:742)
	at org.netbeans.modules.editor.java.JavaCompletionProvider$JavaCompletionQuery.query(JavaCompletionProvider.java:266)
	at org.netbeans.spi.editor.completion.support.AsyncCompletionTask.run(AsyncCompletionTask.java:218)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:561)
	at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:986)

"TimerQueue" daemon prio=5 tid=0x1aa83e90 nid=0x860 in Object.wait() [0x24b4f000..0x24b4fc68]
	at java.lang.Object.wait(Native Method)
	- waiting on <0x03c83038> (a javax.swing.TimerQueue)
	at javax.swing.TimerQueue.run(TimerQueue.java:233)
	- locked <0x03c83038> (a javax.swing.TimerQueue)
	at java.lang.Thread.run(Thread.java:595)

"pool-1-thread-1" prio=5 tid=0x1aa69548 nid=0xf84 waiting on condition [0x2494f000..0x2494fce8]
	at sun.misc.Unsafe.park(Native Method)
	at java.util.concurrent.locks.LockSupport.park(LockSupport.java:118)
	at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1772)
	at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:359)
	at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:470)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:674)
	at java.lang.Thread.run(Thread.java:595)

"Java Source Worker Thread" prio=5 tid=0x1a3b6e40 nid=0xda0 runnable [0x2474f000..0x2474fd68]
	at java.util.concurrent.locks.AbstractQueuedSynchronizer.fullGetFirstQueuedThread(AbstractQueuedSynchronizer.java:1280)
	at java.util.concurrent.locks.AbstractQueuedSynchronizer.getFirstQueuedThread(AbstractQueuedSynchronizer.java:1233)
	at java.util.concurrent.locks.ReentrantLock$FairSync.tryAcquire(ReentrantLock.java:208)
	at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireQueued(AbstractQueuedSynchronizer.java:706)
	at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:1041)
	at java.util.concurrent.locks.ReentrantLock$FairSync.lock(ReentrantLock.java:197)
	at java.util.concurrent.locks.ReentrantLock.lock(ReentrantLock.java:256)
	at org.netbeans.api.java.source.JavaSource$CompilationJob.run(JavaSource.java:1507)
	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:595)

"Default RequestProcessor" daemon prio=2 tid=0x00ac2eb0 nid=0x1a0 runnable [0x2453f000..0x2453f9e8]
	at java.util.concurrent.locks.AbstractQueuedSynchronizer.fullGetFirstQueuedThread(AbstractQueuedSynchronizer.java:1280)
	at java.util.concurrent.locks.AbstractQueuedSynchronizer.getFirstQueuedThread(AbstractQueuedSynchronizer.java:1233)
	at java.util.concurrent.locks.ReentrantLock$FairSync.tryAcquire(ReentrantLock.java:208)
	at java.util.concurrent.locks.AbstractQueuedSynchronizer.tryAcquireNanos(AbstractQueuedSynchronizer.java:1087)
	at java.util.concurrent.locks.ReentrantLock.tryLock(ReentrantLock.java:416)
	at org.netbeans.api.java.source.JavaSource.runWhenScanFinished(JavaSource.java:742)
	at org.netbeans.modules.editor.java.JavaCompletionProvider$JavaCompletionQuery.query(JavaCompletionProvider.java:266)
	at org.netbeans.spi.editor.completion.support.AsyncCompletionTask.run(AsyncCompletionTask.java:218)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:561)
	at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:986)

"AWT-Windows" daemon prio=7 tid=0x1ab5f720 nid=0xaec runnable [0x1bf9f000..0x1bf9fae8]
	at sun.awt.PostEventQueue.postEvent(SunToolkit.java:1139)
	at sun.awt.SunToolkit.postEvent(SunToolkit.java:497)
	at sun.awt.windows.WComponentPeer.postEvent(WComponentPeer.java:614)
	at sun.awt.windows.WToolkit.eventLoop(Native Method)
	at sun.awt.windows.WToolkit.run(WToolkit.java:269)
	at java.lang.Thread.run(Thread.java:595)

"AWT-Shutdown" prio=5 tid=0x1ab59c98 nid=0xfa8 in Object.wait() [0x1bd9f000..0x1bd9fb68]
	at java.lang.Object.wait(Native Method)
	- waiting on <0x037aafa0> (a java.lang.Object)
	at java.lang.Object.wait(Object.java:474)
	at sun.awt.AWTAutoShutdown.run(AWTAutoShutdown.java:259)
	- locked <0x037aafa0> (a java.lang.Object)
	at java.lang.Thread.run(Thread.java:595)

"Java2D Disposer" daemon prio=10 tid=0x1ab407f0 nid=0x55c in Object.wait() [0x1ba9f000..0x1ba9fbe8]
	at java.lang.Object.wait(Native Method)
	- waiting on <0x037ab028> (a java.lang.ref.ReferenceQueue$Lock)
	at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:116)
	- locked <0x037ab028> (a java.lang.ref.ReferenceQueue$Lock)
	at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:132)
	at sun.java2d.Disposer.run(Disposer.java:107)
	at java.lang.Thread.run(Thread.java:595)

"Active Reference Queue Daemon" daemon prio=2 tid=0x1ab145b8 nid=0xfdc in Object.wait() [0x1b02f000..0x1b02fc68]
	at java.lang.Object.wait(Native Method)
	- waiting on <0x0375c2e0> (a java.lang.ref.ReferenceQueue$Lock)
	at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:116)
	- locked <0x0375c2e0> (a java.lang.ref.ReferenceQueue$Lock)
	at org.openide.util.Utilities$ActiveQueue.run(Utilities.java:3056)
	at java.lang.Thread.run(Thread.java:595)

"Inactive RequestProcessor thread [Was:CaretAwareJavaSourceTaskFactory
worker/org.netbeans.api.java.source.support.CaretAwareJavaSourceTaskFactory$ComponentListener$1]" daemon prio=2
tid=0x1aa939f8 nid=0x4e8 in Object.wait() [0x1b62f000..0x1b62fd68]
	at java.lang.Object.wait(Native Method)
	- waiting on <0x0375c3e8> (a java.lang.Object)
	at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:939)
	- locked <0x0375c3e8> (a java.lang.Object)

"Timer-1" daemon prio=5 tid=0x1aa929b0 nid=0x8f4 in Object.wait() [0x1b42f000..0x1b42f9e8]
	at java.lang.Object.wait(Native Method)
	- waiting on <0x0375c458> (a java.util.TaskQueue)
	at java.util.TimerThread.mainLoop(Timer.java:509)
	- locked <0x0375c458> (a java.util.TaskQueue)
	at java.util.TimerThread.run(Timer.java:462)

"CLI Requests Server" daemon prio=5 tid=0x1aa924b8 nid=0xbc runnable [0x1b22f000..0x1b22fa68]
	at java.net.PlainSocketImpl.socketAccept(Native Method)
	at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:384)
	- locked <0x0375c528> (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:1003)

"RMI TCP Accept-0" daemon prio=5 tid=0x1a258830 nid=0x3bc runnable [0x1a82f000..0x1a82fbe8]
	at java.net.PlainSocketImpl.socketAccept(Native Method)
	at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:384)
	- locked <0x0375c6f0> (a java.net.SocksSocketImpl)
	at java.net.ServerSocket.implAccept(ServerSocket.java:450)
	at java.net.ServerSocket.accept(ServerSocket.java:421)
	at sun.rmi.transport.tcp.TCPTransport.run(TCPTransport.java:334)
	at java.lang.Thread.run(Thread.java:595)

"Timer-0" daemon prio=5 tid=0x1a221d20 nid=0x748 in Object.wait() [0x1a62f000..0x1a62fc68]
	at java.lang.Object.wait(Native Method)
	- waiting on <0x0375c8a0> (a java.util.TaskQueue)
	at java.lang.Object.wait(Object.java:474)
	at java.util.TimerThread.mainLoop(Timer.java:483)
	- locked <0x0375c8a0> (a java.util.TaskQueue)
	at java.util.TimerThread.run(Timer.java:462)

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

"CompilerThread0" daemon prio=10 tid=0x00a92e00 nid=0xd44 waiting on condition [0x00000000..0x19fffa4c]

"Signal Dispatcher" daemon prio=10 tid=0x00a920f8 nid=0x5dc waiting on condition [0x00000000..0x00000000]

"Finalizer" daemon prio=9 tid=0x00a89350 nid=0xf34 in Object.wait() [0x19bff000..0x19bffa68]
	at java.lang.Object.wait(Native Method)
	- waiting on <0x0375ca30> (a java.lang.ref.ReferenceQueue$Lock)
	at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:116)
	- locked <0x0375ca30> (a java.lang.ref.ReferenceQueue$Lock)
	at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:132)
	at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:159)

"Reference Handler" daemon prio=10 tid=0x00a87ec0 nid=0x424 in Object.wait() [0x199ff000..0x199ffae8]
	at java.lang.Object.wait(Native Method)
	- waiting on <0x0375c308> (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 <0x0375c308> (a java.lang.ref.Reference$Lock)

"VM Thread" prio=10 tid=0x00034bb8 nid=0x684 runnable 

"VM Periodic Task Thread" prio=10 tid=0x1a2e1548 nid=0x5d0 waiting on condition 

Comment 4 Dusan Balek 2007-11-26 17:58:58 UTC
Tome, could you please look at the last thread dump?
Comment 5 Tomas Zezula 2007-11-27 09:01:56 UTC
Looking on the stack trace the problem is in j.u.concurrent.AbstractQueueSynchronizer the utility class for
j.u.concurrent.ReentrantLock. It seems to be a live lock in the AbstractQueueSynchronizer.fullGetFirstQueuedThread().
It iterates over the list of nodes back to front trying to find the first thread in the queue but it seems that in your
case the iteration never finished, there are two possible cases: 1) Something adds new nodes to the head as fast as the
queue iterates - not probable. 2) The internal structure of the queue get cycled. The
AbstractQueueSynchronizer.fullGetFirstQueuedThread was rewritten in the JDK 1.6 can you try it on it?
Is it reproduceable for you on the JDK 1.5 (your current JDK)?
Comment 6 Tomas Zezula 2007-11-27 09:38:01 UTC
JDK bug 6241823, see: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6241823. Already fixed in JDK 1.6 (b31) and
also in JDK 5.0u6(b02). Please update the JDK.