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 184449 - Deadlock when exiting the IDE.
Summary: Deadlock when exiting the IDE.
Status: RESOLVED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: Parsing & Indexing (show other bugs)
Version: 6.x
Hardware: PC Mac OS X
: P2 normal (vote)
Assignee: Vitezslav Stejskal
URL:
Keywords: RANDOM, THREAD
Depends on:
Blocks:
 
Reported: 2010-04-19 13:17 UTC by Tomasz Slota
Modified: 2010-05-12 04:13 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Full IDE log (48.98 KB, text/plain)
2010-04-19 13:53 UTC, Tomasz Slota
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tomasz Slota 2010-04-19 13:17:13 UTC
Reproducible with Friday trunk sources and the following steps (modified steps from issue 172896):

Create new Web application, without any changes in wizard
Create new tag library
Create new class in "test" package
Create new method in the class:
-------------
    public static String doSomething(String s) {
        return "something is done";
    }
-------------
register this method in the taglibrary:
-----------------
  <function>
    <name>funkcicka</name>
    <function-class>test.NewClass</function-class>
    <function-signature>java.lang.String
doSomething(java.lang.String)</function-signature>
  </function>
------------------
declare taglib usage in index.jsp
----------
<%@taglib prefix="a" uri="/WEB-INF/tlds/newtag_library.tld" %>

-  try to exit t the IDE (it locks instead)
Comment 1 Tomasz Slota 2010-04-19 13:49:46 UTC
Full thread dump Java HotSpot(TM) 64-Bit Server VM (14.3-b01-101 mixed mode):

"Thread-14" prio=5 tid=0x0000000101d46000 nid=0x152201000 waiting on condition
[0x0000000152200000]
   java.lang.Thread.State: WAITING (parking)
    at sun.misc.Unsafe.park(Native Method)
    - parking to wait for  <0x000000010c0773e8> (a
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
    at java.util.concurrent.locks.LockSupport.park(LockSupport.java:158)
    at
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1925)
    at
java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:358)
    at
java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:947)
    at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
    at java.lang.Thread.run(Thread.java:637)

"Inactive RequestProcessor thread
[Was:TimedSoftReference/org.openide.util.TimedSoftReference]" daemon prio=1
tid=0x00000001370b3000 nid=0x139b04000 in Object.wait() [0x0000000139b03000]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    - waiting on <0x000000010b27b170> (a java.lang.Object)
    at
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1908)
    - locked <0x000000010b27b170> (a java.lang.Object)

"Parsing & Indexing Loop (100414-d8972b8cd9c3)" daemon prio=1
tid=0x00000001377f6000 nid=0x154640000 in Object.wait() [0x000000015463f000]
   java.lang.Thread.State: WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    - waiting on <0x000000010a37b0e0> (a
org.netbeans.modules.parsing.impl.TaskProcessor$CurrentRequestReference$CRRLock)
    at java.lang.Object.wait(Object.java:485)
    at
org.netbeans.modules.parsing.impl.TaskProcessor$CurrentRequestReference.setCurrentTask(TaskProcessor.java:883)
    - locked <0x000000010a37b0e0> (a
org.netbeans.modules.parsing.impl.TaskProcessor$CurrentRequestReference$CRRLock)
    at
org.netbeans.modules.parsing.impl.TaskProcessor$CompilationJob.run(TaskProcessor.java:563)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:637)

"DestroyJavaVM" prio=5 tid=0x0000000101801800 nid=0x100601000 waiting on
condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"AWT-EventQueue-1" prio=6 tid=0x000000013761d000 nid=0x151287000 in
Object.wait() [0x0000000151286000]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    - waiting on <0x000000010b7af030> (a java.util.LinkedList)
    at
org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Task.cancelAll(RepositoryUpdater.java:3373)
    - locked <0x000000010b7af030> (a java.util.LinkedList)
    at
org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater.stop(RepositoryUpdater.java:202)
    at org.netbeans.modules.parsing.impl.Installer.closing(Installer.java:37)
    at org.netbeans.core.startup.NbInstaller.closing(NbInstaller.java:664)
    at org.netbeans.ModuleManager.shutDown(ModuleManager.java:1585)
    at org.netbeans.core.startup.ModuleSystem.shutDown(ModuleSystem.java:305)
    at org.netbeans.core.NbLifecycleManager.doExit(NbLifecycleManager.java:164)
    at
org.netbeans.core.NbLifecycleManager.access$000(NbLifecycleManager.java:72)
    at
org.netbeans.core.NbLifecycleManager$ExitActions.run(NbLifecycleManager.java:120)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:633)
    at
org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:133)
    at
java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
    at
java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
    at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

"TimerQueue" daemon prio=5 tid=0x0000000137783800 nid=0x14d837000 in
Object.wait() [0x000000014d836000]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    - waiting on <0x0000000109242980> (a javax.swing.TimerQueue)
    at javax.swing.TimerQueue.run(TimerQueue.java:232)
    - locked <0x0000000109242980> (a javax.swing.TimerQueue)
    at java.lang.Thread.run(Thread.java:637)

"Thread-3" daemon prio=5 tid=0x0000000137782000 nid=0x14ef26000 in
Object.wait() [0x000000014ef25000]
   java.lang.Thread.State: WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    - waiting on <0x0000000109077110> (a java.util.LinkedList)
    at java.lang.Object.wait(Object.java:485)
    at
java.util.prefs.AbstractPreferences$EventDispatchThread.run(AbstractPreferences.java:1461)
    - locked <0x0000000109077110> (a java.util.LinkedList)

"Java2D Disposer" daemon prio=10 tid=0x0000000137227000 nid=0x14d5d3000 in
Object.wait() [0x000000014d5d2000]
   java.lang.Thread.State: WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    - waiting on <0x00000001081741d0> (a java.lang.ref.ReferenceQueue$Lock)
    at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:118)
    - locked <0x00000001081741d0> (a java.lang.ref.ReferenceQueue$Lock)
    at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:134)
    at sun.java2d.Disposer.run(Disposer.java:125)
    at java.lang.Thread.run(Thread.java:637)

"AWT-Shutdown" prio=5 tid=0x0000000101ace800 nid=0x14a897000 in Object.wait()
[0x000000014a896000]
   java.lang.Thread.State: WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    - waiting on <0x0000000108174200> (a java.lang.Object)
    at java.lang.Object.wait(Object.java:485)
    at sun.awt.AWTAutoShutdown.run(AWTAutoShutdown.java:259)
    - locked <0x0000000108174200> (a java.lang.Object)
    at java.lang.Thread.run(Thread.java:637)

"AWT-AppKit" daemon prio=5 tid=0x00000001019dc800 nid=0x7fff705aabe0 runnable
[0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"CLI Requests Server" daemon prio=5 tid=0x00000001018fd800 nid=0x13a00c000
runnable [0x000000013a00b000]
   java.lang.Thread.State: RUNNABLE
    at java.net.PlainSocketImpl.socketAccept(Native Method)
    at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:390)
    - locked <0x00000001080a3548> (a java.net.SocksSocketImpl)
    at java.net.ServerSocket.implAccept(ServerSocket.java:453)
    at java.net.ServerSocket.accept(ServerSocket.java:421)
    at org.netbeans.CLIHandler$Server.run(CLIHandler.java:996)

"Active Reference Queue Daemon" daemon prio=1 tid=0x0000000101ad9000
nid=0x138613000 in Object.wait() [0x0000000138612000]
   java.lang.Thread.State: WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    - waiting on <0x000000010826ba60> (a java.lang.ref.ReferenceQueue$Lock)
    at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:118)
    - locked <0x000000010826ba60> (a java.lang.ref.ReferenceQueue$Lock)
    at
org.openide.util.lookup.implspi.ActiveQueue$Impl.run(ActiveQueue.java:62)
    at java.lang.Thread.run(Thread.java:637)

"Timer-0" daemon prio=5 tid=0x00000001371a7800 nid=0x138410000 in Object.wait()
[0x000000013840f000]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    - waiting on <0x0000000108269a70> (a java.util.TaskQueue)
    at java.util.TimerThread.mainLoop(Timer.java:509)
    - locked <0x0000000108269a70> (a java.util.TaskQueue)
    at java.util.TimerThread.run(Timer.java:462)

"Low Memory Detector" daemon prio=5 tid=0x00000001018b7000 nid=0x13800a000
runnable [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"CompilerThread1" daemon prio=9 tid=0x00000001018b6800 nid=0x137e07000 waiting
on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"CompilerThread0" daemon prio=9 tid=0x00000001018b5800 nid=0x137c04000 waiting
on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"JDWP Event Helper Thread" daemon prio=5 tid=0x0000000137004000 nid=0x137a01000
runnable [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"JDWP Transport Listener: dt_socket" daemon prio=5 tid=0x0000000137003000
nid=0x136e07000 runnable [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"Signal Dispatcher" daemon prio=9 tid=0x0000000137000000 nid=0x136c04000
waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"Surrogate Locker Thread (CMS)" daemon prio=5 tid=0x00000001018b5000
nid=0x136a01000 waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"Finalizer" daemon prio=8 tid=0x000000010189f000 nid=0x135c60000 in
Object.wait() [0x0000000135c5f000]
   java.lang.Thread.State: WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    - waiting on <0x000000010826bb80> (a java.lang.ref.ReferenceQueue$Lock)
    at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:118)
    - locked <0x000000010826bb80> (a java.lang.ref.ReferenceQueue$Lock)
    at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:134)
    at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:159)

"Reference Handler" daemon prio=10 tid=0x000000010189e800 nid=0x135a5d000 in
Object.wait() [0x0000000135a5c000]
   java.lang.Thread.State: WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    - waiting on <0x0000000108174218> (a java.lang.ref.Reference$Lock)
    at java.lang.Object.wait(Object.java:485)
    at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:116)
    - locked <0x0000000108174218> (a java.lang.ref.Reference$Lock)

"VM Thread" prio=9 tid=0x0000000101897000 nid=0x13585a000 runnable 

"Gang worker#0 (Parallel GC Threads)" prio=9 tid=0x0000000101802800
nid=0x105405000 runnable 

"Gang worker#1 (Parallel GC Threads)" prio=9 tid=0x0000000101803800
nid=0x105608000 runnable 

"Concurrent Mark-Sweep GC Thread" prio=9 tid=0x0000000101843000 nid=0x1354fc000
runnable 
"VM Periodic Task Thread" prio=10 tid=0x0000000137002800 nid=0x13820d000
waiting on condition 

"Exception Catcher Thread" prio=10 tid=0x0000000101802000 nid=0x102201000
runnable 
JNI global references: 20094
Comment 2 Tomasz Slota 2010-04-19 13:53:24 UTC
Created attachment 97627 [details]
Full IDE log
Comment 3 Vitezslav Stejskal 2010-05-04 10:54:47 UTC
I just followed the steps and the IDE exited without a problem. I'm going to try to add some diagnostics to RepositoryUpdater, which could reveal what jobs were still running. Normally, when the IDE is exiting the job currently being carried on is interrupted and all the others in the queue are thrown away. The threaddump doesn't indicate any job being stuck though and so I'm really not sure what happened.

Product Version: NetBeans IDE Dev (Build 100503-85791bd2fdfb)
Java: 1.6.0_17; Java HotSpot(TM) 64-Bit Server VM 14.3-b01-101
System: Mac OS X version 10.5.8 running on x86_64; MacRoman; en_US (nb)
Userdir: /work/netbeans/jet-main/nbbuild/testuserdir
Comment 4 Vitezslav Stejskal 2010-05-04 11:24:45 UTC
local changeset: 63c8d4da7528

I added the diagnostics that should show what jobs are in the queue and/or being processed when RepositoryUpdater is requested to stop. I also added timeout for the stop request, which should let the IDE exit without waiting for the jobs for too long.
Comment 5 Quality Engineering 2010-05-12 04:13:56 UTC
Integrated into 'main-golden', will be available in build *201005112200* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/
User: 
Log: