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 236145

Summary: Deadlock while deleting XML file
Product: platform Reporter: Tomas Zezula <tzezula>
Component: ExplorerAssignee: Jan Peska <JPESKA>
Status: RESOLVED DUPLICATE    
Severity: normal CC: jtulach
Priority: P3    
Version: 7.4   
Hardware: PC   
OS: Mac OS X   
Issue Type: DEFECT Exception Reporter:
Attachments: Threads Dump

Description Tomas Zezula 2013-09-19 13:21:54 UTC
Created attachment 140249 [details]
Threads Dump

See attached threads dump.

AWT: holds ExplorerManager$Listener and tries to acquire Children mutex (shared).
Module-Actions: hods Children mutex (exclusive) calls ExplorerManager$Listener.nodeDestroyed tying to obtain lock.

Both ExplorerManager$Listener and org.openide.nodes.Node are wrong. They are calling untrusted code under lock.
Comment 1 Tomas Zezula 2013-09-19 13:28:30 UTC
Possible solutions:
1) org.openide.explorer.ExplorerManager$Listener.nodeDestroyed() - lock free or reorder locks (take CH.mutex (exclusive) before obtaining the monitor).

2) Changing the org.openide.nodes.Node.fireNodeDestroyed() not to fire under lock may be dangerous, so the ExplorerManager$Listener.nodeDestroyed can do reschedule.

1st seems safer to me.
Comment 2 Ondrej Vrabec 2013-12-19 13:55:44 UTC
already fixed in #237545 (sol. #1 chosen)

*** This bug has been marked as a duplicate of bug 237545 ***