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 55324 - Deadlock when creating CMP from database
Summary: Deadlock when creating CMP from database
Status: CLOSED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: EJB (show other bugs)
Version: 4.x
Hardware: PC Windows ME/2000
: P2 blocker (vote)
Assignee: Martin Matula
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-02-21 21:40 UTC by _ pcw
Modified: 2006-03-24 13:07 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
thread dump after deadlock. (16.09 KB, text/plain)
2005-02-21 21:42 UTC, _ pcw
Details
another deadlock thread dump, this on at IDE exit (17.18 KB, text/plain)
2005-02-21 21:53 UTC, _ pcw
Details

Note You need to log in before you can comment on or make changes to this bug.
Description _ pcw 2005-02-21 21:40:37 UTC
I attempted to create some entity beans from the
sample database in pointbase.  I picked either the
first 2 or first 3 tables in the list for
[sample], hit Finish and when the popup window w/
progress bar was up while creating the beans, it
got to about 30% and then deadlocked.  This is on
a 2-CPU Pentium III/600 and having 2 CPU's may be
required to get this.  I haven't reproduced it,
but I haven't tried to.  See attached thread dump.
Comment 1 _ pcw 2005-02-21 21:42:35 UTC
Created attachment 20444 [details]
thread dump after deadlock.
Comment 2 _ pcw 2005-02-21 21:44:31 UTC
Ok, just had it happen a second time just now.  Had to kill the IDE
same as before as it locks up on shutdown while trying to save MDR. 
You can save any unsave files though, as far as I can tell, because
the CMP generation progress box is a modeless dialog.
Comment 3 _ pcw 2005-02-21 21:53:03 UTC
Created attachment 20445 [details]
another deadlock thread dump, this on at IDE exit
Comment 4 _ pcw 2005-02-21 21:56:27 UTC
Refined steps:

1. Start IDE.
2. Create empty EJB module project
3. Start pointbase
4. Invoke entity beans from database wizard
5. Choose pointbase\sample
6. Pick the first table only (though this happens with 2-3 and
probably more tables selected as well)
7. Hit <ok, finish, whatever> to complete the wizard.

When the "Generating CMP's" progress dialog appears, the deadlock
happens when it's at about 30%.  If it gets to 50%, the deadlock will
probably not occur in that attempt.
Comment 5 Martin Adamek 2005-02-24 09:40:30 UTC
I worked with this wizard really a lot, but I am not able to reproduce
this behaviour. Is QE able to reproduce? 
Comment 6 Petr Blaha 2005-03-10 09:22:20 UTC
I was trying to reproduce the issue for a hour but without success. I performed
above mentioned steps several times. CMP beans were generated everytime.
I tested on the configuration:
machine: 2-CPU P II
jdk: 1.5.0_01
NB build: 20050309
Comment 7 Martin Adamek 2005-03-11 07:12:44 UTC
Peter, can you try to reproduce. I expect this bug to be fixed, lots of changes
were done in this wizard (including switch from org.openide.src to JMI)
Comment 8 _ rkubacki 2005-03-14 16:50:42 UTC
I also did not encountered this problem - the code that instantiate beans in
wizards and holds locks is rewriten now as Martin pointed. This is very likely
not a problem now.
Comment 9 _ pcw 2005-03-14 18:11:45 UTC
I will find some cycles to retest this.  My guess is that if the creation code
has been overhauled, the bug most likely no longer exists (I hope it didn't just
move).
Comment 10 _ ludo 2005-03-16 05:32:01 UTC
*** Issue 56413 has been marked as a duplicate of this issue. ***
Comment 11 _ ludo 2005-03-16 05:32:53 UTC
http://www.netbeans.org/issues/show_bug.cgi?id=56413
has the same symptoms...
We need JMI gurus to take a look at the 2 thread dumps.
Comment 12 _ ludo 2005-03-16 05:37:11 UTC
and http://www.netbeans.org/issues/show_bug.cgi?id=55439
seems to be related as well, another p2
Maybe not, but worth taking a look...
Comment 13 Martin Matula 2005-03-16 10:21:31 UTC
The first deadlock was caused by a bug in javacore that was fixed by the
following commit to the ResourceImpl class:

/cvs/java/javacore/src/org/netbeans/modules/javacore/jmiimpl/javamodel/ResourceImpl.java,v
revision 1.68
date: 2005/02/24 17:52:21;  author: mmatula;  state: Exp;  lines: +21 -9
Added transaction to prevent deadlocks

I am going to investigate other threaddumps.
Comment 14 Martin Matula 2005-03-16 10:36:43 UTC
The second thread dump shows the same bug, so this issue is fixed.
The other two issues that Ludo mentioned are unfortunatelly not related to this one.
Comment 15 Jan Horvath 2005-04-06 12:45:25 UTC
v.