Bug 48820 - Deadlock after recreating project
Deadlock after recreating project
Status: RESOLVED FIXED
Product: java
Classification: Unclassified
Component: Unsupported
4.x
PC Windows XP
: P3 (vote)
: 4.x
Assigned To: issues@java
issues@java
: THREAD
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2004-09-10 08:07 UTC by Tomas Zezula
Modified: 2007-09-26 09:14 UTC (History)
0 users

See Also:
Issue Type: DEFECT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tomas Zezula 2004-09-10 08:07:32 UTC
The deadlock happens on Windows when user creates
project, closes it, externally deletes it and
create new one with the same name on the same
place. The creation of new project must be quite
fast :-)

I am not use who is responsible for this deadlock.
The deadlock is casused by (File externally
modified, reload dialog and Scanning classpath
dialog).
Comment 1 Tomas Zezula 2004-09-10 08:08:08 UTC
Full thread dump Java HotSpot(TM) Client VM (1.4.2_03-b02 mixed mode):

"Suggestions Broker" daemon prio=2 tid=0x05a807d8 nid=0x538 in
Object.wait() [60
2f000..602fd8c]
        at java.lang.Object.wait(Native Method)
        at java.lang.Object.wait(Object.java:429)
        at
org.netbeans.modules.javacore.ExclusiveMutex.enter(ExclusiveMutex.jav
a:106)
        - locked <0x110eb500> (a
org.netbeans.modules.javacore.ExclusiveMutex)
        at
org.netbeans.mdr.NBMDRepositoryImpl.beginTrans(NBMDRepositoryImpl.jav
a:232)
        at org.netbeans.modules.java.Util.getDocumentText(Util.java:345)
        at org.netbeans.modules.java.Util.getContent(Util.java:365)
        at
org.netbeans.modules.tasklist.providers.JavaSuggestionContext.getCont
ent(JavaSuggestionContext.java:32)
        at
org.netbeans.modules.tasklist.providers.SuggestionContext.getCharSequ
ence(SuggestionContext.java:62)
        at
org.netbeans.modules.tasklist.docscan.SourceTaskProvider.scanAll(Sour
ceTaskProvider.java:284)
        at
org.netbeans.modules.tasklist.docscan.SourceTaskProvider.scan(SourceT
askProvider.java:137)
        at
org.netbeans.modules.tasklist.suggestions.SuggestionManagerImpl.dispa
tchScan(SuggestionManagerImpl.java:693)
        at
org.netbeans.modules.tasklist.suggestions.SuggestionsBroker$2.run(Sug
gestionsBroker.java:615)
        at org.openide.util.Task.run(Task.java:136)
        at
org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:330)

        at
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java
:686)

"Java-Folds" daemon prio=2 tid=0x0596ea30 nid=0xf90 waiting for
monitor entry [5
e6f000..5e6fd8c]
        at
org.netbeans.modules.javacore.ExclusiveMutex.enter(ExclusiveMutex.jav
a:96)
        - waiting to lock <0x110eb500> (a
org.netbeans.modules.javacore.Exclusiv
eMutex)
        at
org.netbeans.mdr.NBMDRepositoryImpl.beginTrans(NBMDRepositoryImpl.jav
a:232)
        at
org.netbeans.modules.javacore.JMManager.getResource(JMManager.java:40
9)
        at
org.netbeans.modules.javacore.JMManager.getResource(JMManager.java:40
1)
        at
org.netbeans.modules.editor.java.NbJavaFoldManager.getResource(NbJava
FoldManager.java:564)
        at
org.netbeans.modules.editor.java.NbJavaFoldManager.run(NbJavaFoldMana
ger.java:191)
        at org.openide.util.Task.run(Task.java:136)
        at
org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:330)

        at
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java
:686)

"Parsing Event Queue" daemon prio=2 tid=0x0587ec70 nid=0xf8c in
Object.wait() [5
b8f000..5b8fd8c]
        at java.lang.Object.wait(Native Method)
        at java.lang.Object.wait(Object.java:429)
        at
org.netbeans.modules.javacore.ExclusiveMutex.enter(ExclusiveMutex.jav
a:106)
        - locked <0x110eb500> (a
org.netbeans.modules.javacore.ExclusiveMutex)
        at
org.netbeans.mdr.NBMDRepositoryImpl.beginTrans(NBMDRepositoryImpl.jav
a:232)
        at
org.netbeans.mdr.handlers.BaseObjectHandler._lock(BaseObjectHandler.j
ava:200)
        at
org.netbeans.mdr.handlers.FeaturedHandler._preGet(FeaturedHandler.jav
a:55)
        at org.netbeans.jmi.javamodel.Resource$Impl.getName(Unknown
Source)
        at
org.netbeans.modules.java.JavaNode$PropL.resourceParsed(JavaNode.java
:246)
        at
org.netbeans.modules.java.JavaEditor$WParsingListener.resourceParsed(
JavaEditor.java:2762)
        at
org.netbeans.modules.javacore.JMManager$6.run(JMManager.java:1189)
        at org.openide.util.Task.run(Task.java:136)
        at
org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:330)

        at
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java
:686)

"Text-Layout" prio=2 tid=0x05ab0008 nid=0xe6c in Object.wait()
[62bf000..62bfd8c
]
        at java.lang.Object.wait(Native Method)
        - waiting on <0x11970298> (a
org.netbeans.editor.view.spi.ViewLayoutQueu
e)
        at java.lang.Object.wait(Object.java:429)
        at
org.netbeans.editor.view.spi.ViewLayoutQueue.waitForTask(ViewLayoutQu
eue.java:128)
        - locked <0x11970298> (a
org.netbeans.editor.view.spi.ViewLayoutQueue)
        at
org.netbeans.editor.view.spi.ViewLayoutQueue$LayoutThread.run(ViewLay
outQueue.java:182)

"Navigation View Queue" daemon prio=2 tid=0x059f4558 nid=0xe0c in
Object.wait()
[61ef000..61efd8c]
        at java.lang.Object.wait(Native Method)
        at java.lang.Object.wait(Object.java:429)
        at
org.netbeans.modules.javacore.ExclusiveMutex.enter(ExclusiveMutex.jav
a:106)
        - locked <0x110eb500> (a
org.netbeans.modules.javacore.ExclusiveMutex)
        at
org.netbeans.mdr.NBMDRepositoryImpl.beginTrans(NBMDRepositoryImpl.jav
a:232)
        at
org.netbeans.modules.java.ui.NavigationView.selectNodeImpl(Navigation
View.java:323)
        at
org.netbeans.modules.java.ui.NavigationView.access$100(NavigationView
.java:64)
        at
org.netbeans.modules.java.ui.NavigationView$2.run(NavigationView.java
:310)
        at org.openide.util.Task.run(Task.java:136)
        at
org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:330)

        at
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java
:686)

"Scanning Queue" daemon prio=2 tid=0x059ea460 nid=0xe04 in
Object.wait() [616f00
0..616fd8c]
        at java.lang.Object.wait(Native Method)
        - waiting on <0x130b9260> (a
org.netbeans.modules.editor.NbEditorDocumen
t)
        at java.lang.Object.wait(Object.java:429)
        at
javax.swing.text.AbstractDocument.writeLock(AbstractDocument.java:134
2)
        - locked <0x130b9260> (a
org.netbeans.modules.editor.NbEditorDocument)
        at
org.netbeans.editor.BaseDocument.extWriteLock(BaseDocument.java:1109)

        - locked <0x130b9260> (a
org.netbeans.modules.editor.NbEditorDocument)
        at
org.netbeans.editor.BaseDocument.atomicLock(BaseDocument.java:1131)
        - locked <0x130b9260> (a
org.netbeans.modules.editor.NbEditorDocument)
        at
org.netbeans.editor.BaseDocument.runAtomicAsUser(BaseDocument.java:96
4)
        at
org.netbeans.editor.GuardedDocument.runAtomic(GuardedDocument.java:21
7)
        at org.openide.text.NbDocument.runAtomic(NbDocument.java:341)
        at
org.netbeans.modules.javacore.jmiimpl.javamodel.ResourceImpl.commitCh
anges(ResourceImpl.java:642)
        at
org.netbeans.modules.javacore.ExclusiveMutex.notifyElements(Exclusive
Mutex.java:423)
        at
org.netbeans.modules.javacore.ExclusiveMutex.leave(ExclusiveMutex.jav
a:299)
        - locked <0x110eb500> (a
org.netbeans.modules.javacore.ExclusiveMutex)
        at
org.netbeans.mdr.NBMDRepositoryImpl.endTrans(NBMDRepositoryImpl.java:
253)
        at
org.netbeans.modules.javacore.JMManager.resolveCodebases(JMManager.ja
va:818)
        at
org.netbeans.modules.javacore.JMManager$2.run(JMManager.java:778)
        at org.openide.util.Task.run(Task.java:136)
        at
org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:330)

        at
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java
:686)

"MDR event dispatcher" daemon prio=7 tid=0x02e84900 nid=0xde0 in
Object.wait() [
2f7f000..2f7fd8c]
        at java.lang.Object.wait(Native Method)
        - waiting on <0x110e5590> (a java.util.LinkedList)
        at java.lang.Object.wait(Object.java:429)
        at
org.netbeans.mdr.util.EventNotifier$EventsDelivery.run(EventNotifier.
java:257)
        - locked <0x110e5590> (a java.util.LinkedList)
        at java.lang.Thread.run(Thread.java:534)

"DestroyJavaVM" prio=5 tid=0x00035890 nid=0x458 waiting on condition
[0..7fad8]

"TimerQueue" daemon prio=5 tid=0x02e8c110 nid=0xdb4 in Object.wait()
[5f9f000..5
f9fd8c]
        at java.lang.Object.wait(Native Method)
        - waiting on <0x10f9e550> (a javax.swing.TimerQueue)
        at javax.swing.TimerQueue.run(TimerQueue.java:231)
        - locked <0x10f9e550> (a javax.swing.TimerQueue)
        at java.lang.Thread.run(Thread.java:534)

"AWT-EventQueue-1" prio=7 tid=0x02ed2438 nid=0xdb8 in Object.wait()
[5bcf000..5b
cfd8c]
        at java.lang.Object.wait(Native Method)
        at java.lang.Object.wait(Object.java:429)
        at
org.netbeans.modules.javacore.ExclusiveMutex.enter(ExclusiveMutex.jav
a:106)
        - locked <0x110eb500> (a
org.netbeans.modules.javacore.ExclusiveMutex)
        at
org.netbeans.mdr.NBMDRepositoryImpl.beginTrans(NBMDRepositoryImpl.jav
a:232)
        at
org.netbeans.modules.java.JavaDataObject.getCookie(JavaDataObject.jav
a:814)
        at org.netbeans.modules.java.JavaEditor.open(JavaEditor.java:335)
        at
org.openide.actions.OpenAction.performAction(OpenAction.java:54)
        at org.openide.util.actions.NodeAction$3.run(NodeAction.java:440)
        at
org.openide.util.actions.CallableSystemAction.doPerformAction(Callabl
eSystemAction.java:116)
        at
org.openide.util.actions.NodeAction$DelegateAction.actionPerformed(No
deAction.java:438)
        at
org.netbeans.modules.project.ui.ProjectUtilities$1.run(ProjectUtiliti
es.java:136)
        at org.openide.util.Mutex.doEvent(Mutex.java:903)
        at org.openide.util.Mutex.writeAccess(Mutex.java:318)
        at
org.netbeans.modules.project.ui.ProjectUtilities.openAndSelectNewObje
ct(ProjectUtilities.java:128)
        at
org.netbeans.modules.project.ui.actions.NewProject$1.run(NewProject.j
ava:145)
        at
java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:454)
        at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchTh
read.java:201)
        at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
ad.java:151)
        at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
ad.java:141)
        at java.awt.Dialog$1.run(Dialog.java:540)
        at java.awt.Dialog.show(Dialog.java:561)
        at
org.netbeans.core.windows.services.NbPresenter.superShow(NbPresenter.
java:780)
        at
org.netbeans.core.windows.services.NbPresenter.doShow(NbPresenter.jav
a:823)
        at
org.netbeans.core.windows.services.NbPresenter.run(NbPresenter.java:8
11)
        at org.openide.util.Mutex.doEventAccess(Mutex.java:923)
        at org.openide.util.Mutex.readAccess(Mutex.java:158)
        at
org.netbeans.core.windows.services.NbPresenter.show(NbPresenter.java:
796)
        at java.awt.Component.show(Component.java:1133)
        at java.awt.Component.setVisible(Component.java:1088)
        at
org.netbeans.core.windows.services.DialogDisplayerImpl$1AWTQuery.show
Dialog(DialogDisplayerImpl.java:146)
        at
org.netbeans.core.windows.services.DialogDisplayerImpl.notify(DialogD
isplayerImpl.java:161)
        at
org.openide.text.CloneableEditorSupport.checkReload(CloneableEditorSu
pport.java:1629)
        at
org.openide.text.CloneableEditorSupport.access$1500(CloneableEditorSu
pport.java:79)
        at
org.openide.text.CloneableEditorSupport$10.run(CloneableEditorSupport
.java:2003)
        at
org.netbeans.editor.BaseDocument.runAtomicAsUser(BaseDocument.java:96
6)
        at
org.netbeans.editor.GuardedDocument.runAtomic(GuardedDocument.java:21
7)
        at org.openide.text.NbDocument.runAtomic(NbDocument.java:341)
        at
org.openide.text.CloneableEditorSupport$10.run(CloneableEditorSupport
.java:2000)
        at
java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:454)
        at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchTh
read.java:201)
        at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
ad.java:151)
        at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
ad.java:141)
        at java.awt.Dialog$1.run(Dialog.java:540)
        at java.awt.Dialog.show(Dialog.java:561)
        at java.awt.Component.show(Component.java:1133)
        at java.awt.Component.setVisible(Component.java:1088)
        at
org.netbeans.modules.javacore.ProgressPanel.setVisible(ProgressPanel.
java:106)
        at
org.netbeans.modules.javacore.ProgressPanel.openProgressDialog(Progre
ssPanel.java:239)
        at
org.netbeans.modules.javacore.JMManager$5.run(JMManager.java:1110)
        at
java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:454)
        at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchTh
read.java:201)
        at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
ad.java:151)
        at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)

        at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)

        at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)

"Error Annotation Queue" daemon prio=2 tid=0x05830a48 nid=0xc58
waiting for moni
tor entry [5eaf000..5eafd8c]
        at
org.netbeans.modules.javacore.ExclusiveMutex.enter(ExclusiveMutex.jav
a:96)
        - waiting to lock <0x110eb500> (a
org.netbeans.modules.javacore.Exclusiv
eMutex)
        at
org.netbeans.mdr.NBMDRepositoryImpl.beginTrans(NBMDRepositoryImpl.jav
a:232)
        at
org.netbeans.modules.javacore.JMManager.getResource(JMManager.java:40
9)
        at
org.netbeans.modules.javacore.JMManager.getResource(JMManager.java:40
1)
        at
org.netbeans.modules.java.JavaEditor.getResource(JavaEditor.java:403)

        at
org.netbeans.modules.java.JavaEditor.refreshAnnotations(JavaEditor.ja
va:375)
        at
org.netbeans.modules.java.JavaEditor.access$200(JavaEditor.java:70)
        at
org.netbeans.modules.java.JavaEditor$16.run(JavaEditor.java:1385)
        at org.openide.util.Task.run(Task.java:136)
        at
org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:330)

        at
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java
:686)

"Java2D Disposer" daemon prio=10 tid=0x02dcc7d8 nid=0xcb8 in
Object.wait() [570f
000..570fd8c]
        at java.lang.Object.wait(Native Method)
        at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:111)
        - locked <0x10a8d998> (a java.lang.ref.ReferenceQueue$Lock)
        at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:127)
        at sun.java2d.Disposer.run(Disposer.java:100)
        at java.lang.Thread.run(Thread.java:534)

"AWT-Windows" daemon prio=7 tid=0x02d664c8 nid=0xcb4 runnable
[527f000..527fd8c]

        at sun.awt.windows.WToolkit.eventLoop(Native Method)
        at sun.awt.windows.WToolkit.run(WToolkit.java:262)
        at java.lang.Thread.run(Thread.java:534)

"AWT-Shutdown" prio=5 tid=0x02d661f8 nid=0xda0 in Object.wait()
[523f000..523fd8
c]
        at java.lang.Object.wait(Native Method)
        - waiting on <0x10a30688> (a java.lang.Object)
        at java.lang.Object.wait(Object.java:429)
        at sun.awt.AWTAutoShutdown.run(AWTAutoShutdown.java:259)
        - locked <0x10a30688> (a java.lang.Object)
        at java.lang.Thread.run(Thread.java:534)

"Active Reference Queue Daemon" daemon prio=2 tid=0x00a667e0 nid=0xd9c
in Object
.wait() [2fff000..2fffd8c]
        at java.lang.Object.wait(Native Method)
        at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:111)
        - locked <0x109f1580> (a java.lang.ref.ReferenceQueue$Lock)
        at org.openide.util.Utilities$ActiveQueue.run(Utilities.java:2353)
        at java.lang.Thread.run(Thread.java:534)

"Thread-0" daemon prio=5 tid=0x00a68838 nid=0xd98 in Object.wait()
[2fbf000..2fb
fd8c]
        at java.lang.Object.wait(Native Method)
        - waiting on <0x109f15f8> (a java.util.TaskQueue)
        at java.lang.Object.wait(Object.java:429)
        at java.util.TimerThread.mainLoop(Timer.java:403)
        - locked <0x109f15f8> (a java.util.TaskQueue)
        at java.util.TimerThread.run(Timer.java:382)

"CLI Requests Server" daemon prio=5 tid=0x00a57f28 nid=0xd90 runnable
[2f3f000..
2f3fd8c]
        at java.net.PlainSocketImpl.socketAccept(Native Method)
        at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:353)
        - locked <0x109f16f0> (a java.net.PlainSocketImpl)
        at java.net.ServerSocket.implAccept(ServerSocket.java:448)
        at java.net.ServerSocket.accept(ServerSocket.java:419)
        at org.netbeans.CLIHandler$Server.run(CLIHandler.java:744)

"Signal Dispatcher" daemon prio=10 tid=0x0003df98 nid=0xd84 waiting on
condition
 [0..0]

"Finalizer" daemon prio=9 tid=0x009df1a0 nid=0xd7c in Object.wait()
[2bef000..2b
efd8c]
        at java.lang.Object.wait(Native Method)
        at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:111)
        - locked <0x109f1898> (a java.lang.ref.ReferenceQueue$Lock)
        at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:127)
        at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:159)

"Reference Handler" daemon prio=10 tid=0x009ddd70 nid=0xd78 in
Object.wait() [2b
af000..2bafd8c]
        at java.lang.Object.wait(Native Method)
        at java.lang.Object.wait(Object.java:429)
        at
java.lang.ref.Reference$ReferenceHandler.run(Reference.java:115)
        - locked <0x109f1608> (a java.lang.ref.Reference$Lock)

"VM Thread" prio=5 tid=0x00a1b6f8 nid=0x490 runnable

"VM Periodic Task Thread" prio=10 tid=0x00a1c7b8 nid=0xd8c waiting on
condition

"Suspend Checker Thread" prio=10 tid=0x0003d650 nid=0xd80 runnable
Comment 2 Pavel Flaska 2004-09-10 08:28:50 UTC
Are our customers developers or maniacs? ;-)
Comment 3 Milan Kubec 2004-09-10 12:56:38 UTC
I'm no a maniac and I managed to reproduce the problem (and I wasn't
that fast as tomas :)
Comment 4 Jesse Glick 2004-09-10 16:50:15 UTC
BTW Tomas please use attachments rather than pasting text inline...
formatting gets screwed up.
Comment 5 Martin Matula 2004-09-24 11:16:39 UTC
Another deadlock related to the fact that we need to touch MDR in
createCookie - this one caused by our hack to fix the issue - the
overriden getCookie method starts a transaction in document lock. This
one and issue 49369 should be fixed together by implementing Yarda's
suggestion.
Comment 6 Martin Matula 2004-09-29 16:54:40 UTC
Fixed.

Checking in src/org/netbeans/modules/java/JavaDataObject.java;
/cvs/java/src/org/netbeans/modules/java/JavaDataObject.java,v  <-- 
JavaDataObject.java
new revision: 1.195; previous revision: 1.194
done
Checking in src/org/netbeans/modules/java/JavaNode.java;
/cvs/java/src/org/netbeans/modules/java/JavaNode.java,v  <-- 
JavaNode.java
new revision: 1.121; previous revision: 1.120
done
Checking in src/org/netbeans/modules/java/JavaParserGlue.java;
/cvs/java/src/org/netbeans/modules/java/JavaParserGlue.java,v  <-- 
JavaParserGlue.java
new revision: 1.52; previous revision: 1.51
done
Processing log script arguments...
More commits to come...
Checking in
src/org/netbeans/modules/java/codesync/SourceConnectionSupport.java;
/cvs/java/src/org/netbeans/modules/java/codesync/SourceConnectionSupport.java,v
 <--  SourceConnectionSupport.java
new revision: 1.25; previous revision: 1.24
done
Comment 7 Quality Engineering 2007-09-20 09:56:29 UTC
Reorganization of java component


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo