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 50071 - Deadlock after fix imports
Summary: Deadlock after fix imports
Status: CLOSED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 4.x
Hardware: PC Linux
: P2 blocker (vote)
Assignee: Daniel Prusa
URL:
Keywords: RANDOM, THREAD
Depends on:
Blocks:
 
Reported: 2004-10-07 09:27 UTC by ehucka
Modified: 2007-09-26 09:14 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
threadsdump (15.12 KB, text/plain)
2004-10-07 09:30 UTC, ehucka
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ehucka 2004-10-07 09:27:48 UTC
I've created a class, inserted a code from outer
application (gedit) into a method of this class
and invoked Fix import action.

Maybe it is a problem with clipboards.
Comment 1 ehucka 2004-10-07 09:30:01 UTC
Created attachment 18117 [details]
threadsdump
Comment 2 Martin Matula 2004-10-07 10:28:00 UTC
The basic problem is that FixAllImports takes MDR transaction and then
inside this transaction displays dialog for resolving ambiguities.
This dialog needs Children.MUTEX, which creates wrong lock ordering
(Children.MUTEX cannot be taken in MDR transactions). Seems that the
FixAllImports action will need to be rewritten to not hold a
transaction when displaying the dialog. Another quick workaroud could
be to acquire Children.MUTEX in FixAllImports before the MDR
transaction is started.
Reassigning to Dan for further evaluation. 
Comment 3 Daniel Prusa 2004-10-11 14:27:26 UTC
/cvs/editor/src/org/netbeans/modules/editor/java/JavaFixAllImports.java,v
 <--  JavaFixAllImports.java
new revision: 1.20; previous revision: 1.19
Comment 4 ehucka 2004-10-25 14:00:51 UTC
verified