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 41288 - Deadlock during new project construction
Summary: Deadlock during new project construction
Status: CLOSED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 4.x
Hardware: Sun SunOS
: P1 blocker (vote)
Assignee: Tomas Zezula
URL:
Keywords: RANDOM, THREAD
Depends on:
Blocks:
 
Reported: 2004-03-24 17:01 UTC by Jan Lahoda
Modified: 2007-09-26 09:14 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Full thread dumps of the deadlocks. (60.44 KB, text/plain)
2004-03-24 17:03 UTC, Jan Lahoda
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Lahoda 2004-03-24 17:01:49 UTC
[custom trunk build with new Debugger API, version
1 and 2, JDK 1.4.2_03]

I tried to create some projects with main class
(there is a checkbox in the wizard). I tried this
three times, and two times a deadlock occurred
(once with custom build version 1, once with
custom build version 2). Once the correct project
was created.

I am attaching full thread dumps of the deadlock.
There are four full thread dumps. The first three
are from version 1 and the last one is from the
deadlock from version 2.
Comment 1 Jan Lahoda 2004-03-24 17:03:48 UTC
Created attachment 14132 [details]
Full thread dumps of the deadlocks.
Comment 2 Jesse Glick 2004-03-24 17:54:49 UTC
Probably BootClassPathImplementation (and also
ProjectClassPathImplementation) should not fire their property changes
synch from within the propertiesChanged callback, since the
ProjectManager.mutex can be held here.

(If everyone used the same lock, there would be no problem of course,
but we have no general-purpose "configuration" lock for all of NB, so
we are screwed.)
Comment 3 David Konecny 2004-03-25 10:14:40 UTC
Jesse, your suggestion will solve the problem in most of the cases but
not in all. The safest would be to not fire changes in
AntProjectHelper under write lock. I know that they are fired under
read lock only and that it is ProjectOpenedHookImpl who is calling it
under write lock. 
Comment 4 Jan Lahoda 2004-04-22 09:45:28 UTC
*** Issue 42240 has been marked as a duplicate of this issue. ***
Comment 5 Jan Lahoda 2004-04-22 09:47:21 UTC
Look at issue #42240, there are more comments.
Comment 6 Jesse Glick 2004-04-22 16:31:10 UTC
Jan please check if it still happens in current builds, since I put in
some changes yesterday which I think would have the effect of avoiding
the situation that causes this deadlock (though not trying to solve it
directly).
Comment 7 Jan Lahoda 2004-04-26 09:45:22 UTC
I tried it with 200404230645 and 200404251800 builds and the deadlock
did not occur, so it seems to be fixed. Feel free to set this bug to
fixed.
Comment 8 Tomas Zezula 2004-04-26 12:57:57 UTC
Fixed.
The API ClassPath fires the events without holding monitor on it.
Comment 9 Jan Lahoda 2004-06-28 14:14:47 UTC
Marking as verified.