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.
Deadlock occurred when I was closing a web project in FCS build of NetBeans 6.0. Thread dump attached. Problematic threads are: "AWT-EventQueue-1": waiting for ownable synchronizer 0x730a9b18, (a java.util.concurrent.locks.ReentrantLock$FairSync), which is held by "PersistentObjectManager" "PersistentObjectManager": waiting to lock monitor 0x080847e0 (object 0x72e52a08, a org.netbeans.modules.project.ui.OpenProjectList), which is held by "AWT-EventQueue-1" System info: Product Version: NetBeans IDE 6.0 (Build 200711261600) Java: 1.6.0_03; Java HotSpot(TM) Client VM 1.6.0_03-b05 System: Linux version 2.6.22-14-generic running on i386; UTF-8; en_US (nb)
Created attachment 53754 [details] Thread dump
The main culprit is websvc/rest, which modifies the project in a metadata model action without any good reason. It should call the RestUtil methods in WebRestSupportLookupProvider$RestServicesChangeListener.updateRestServices() outside the action. Actually, when I look at WebRestSupportLookupProvider, there is another problem with it. In a project with no REST web services it will likely modify and save the project whenever the classpath changes (which will make the model send a change event). It would be good if you tested if the project has (or does not have) the REST libraries on the classpath before modifying it.
Fixed in trunk. 1. only model read need to happen in runReadAction. 2. checking if rest support is on/off to avoid unecessary project save /cvs/websvc/rest/src/org/netbeans/modules/websvc/rest/RestUtils.java,v <-- RestUtils.java new revision: 1.21; previous revision: 1.20 /cvs/websvc/rest/src/org/netbeans/modules/websvc/rest/RestUtils.java,v <-- RestUtils.java new revision: 1.22; previous revision: 1.21 /cvs/websvc/rest/src/org/netbeans/modules/websvc/rest/projects/WebRestSupportLookupProvider.java,v <-- WebRestSupportLookupProvider.java new revision: 1.18; previous revision: 1.17
Roman, can you verify this, please? Thanks.
v.