Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 50704 - Deadlock when close Freeform project customizer
Deadlock when close Freeform project customizer
Product: projects
Classification: Unclassified
Component: Ant
PC Linux
: P2 (vote)
: 4.x
Assigned To: Jesse Glick
Depends on:
  Show dependency treegraph
Reported: 2004-10-21 14:55 UTC by Jiri Rechtacek
Modified: 2004-10-25 22:11 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT

thread dump (10.97 KB, text/plain)
2004-10-21 14:56 UTC, Jiri Rechtacek
new thread dump from jrechtacek (9.59 KB, text/plain)
2004-10-25 15:57 UTC, David Konecny

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Rechtacek 2004-10-21 14:55:23 UTC
[dev 041019]
1. create freeform project (<nb_root>/monitor)
2. open customizer
3. set the 'Build and Run' property to 'netbeans'
4. close the customizer -> deadlock appears (2
times in a row, 3rd attempt passed)
Comment 1 Jiri Rechtacek 2004-10-21 14:56:15 UTC
Created attachment 18432 [details]
thread dump
Comment 2 Jesse Glick 2004-10-21 16:39:31 UTC
This bug was already fixed (by David) six days ago. Perhaps you forgot
to update your sources? The stack trace refers to lines in the old
version of

*** This issue has been marked as a duplicate of 50328 ***
Comment 3 Jiri Rechtacek 2004-10-21 16:43:33 UTC
Ok, I'm going to verify it on a new build.
Comment 4 David Konecny 2004-10-25 15:57:49 UTC
Created attachment 18493 [details]
new thread dump from jrechtacek
Comment 5 David Konecny 2004-10-25 16:03:32 UTC
Jirka was able to reproduce it with latest build and there is valid
problem. It is what I mentioned in issue 50328:

"The problem is in FreeformSources.initSources() and its
ProjectManager.mutex().postWriteRequest() call. There are two threads:
EQ and RP. The FreeformSources.initSources() is called in RP, but EQ
already is in ProjectManager.mutex().readAccess(). That means that
ProjectManager.mutex().postWriteRequest() call in
FreeformSources.initSources() is blocking."

Perhaps the solution could be to move
ProjectManager.mutex().postWriteRequest() out of the FreeformSources's
synchronized block?
Comment 6 Jesse Glick 2004-10-25 18:33:18 UTC
I would rather change FreeformSources to use PM.mutex rather than
ad-hoc synchronization. I think that should solve it.
Comment 7 Jesse Glick 2004-10-25 22:11:50 UTC
Think I fixed. Cannot reproduce a deadlock using your instructions,
anyway. Would be nice if you could verify.

committed     Up-To-Date  1.5        

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