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.
Product Version = NetBeans IDE Dev (Build 200804301203) Operating System = Windows XP version 5.1 running on x86 Java; VM; Vendor = 1.6.0_04; Java HotSpot(TM) Client VM 10.0-b19; Sun Microsystems Inc. Runtime = Java(TM) SE Runtime Environment 1.6.0_04-b12 - I started NB and got Exception - clicked button Report... - entered my issuezilla login and password - after submitting NB hangs
Created attachment 60899 [details] messages log
Created attachment 60900 [details] thread dump
Reassigning to "logger" for evaluation.
I guess the major problem is that FolderLookup fires changes in the Folder Recognizer thread. Then "foreign" code runs on that thread and can cause deadlocks.
Changes in Utilities (compatible) and one (semantically incompatible) change in Data Systems to prevent this deadlock seems to be needed.
Created attachment 63166 [details] Proposed Changes
The changes in o.o.u look fine. Is there any expected impact on testability of modules that rely on FolderLookup to find critical bits of infrastructure? I know changes are already fired in a different thread from the main application logic ("Folder recognizer"); will moving test firing to a new RequestProcessor job cause tests which were previously predictable to become unpredictable? Are there known deadlocks of this type relating to non-FolderLookup Lookup's? I guess that would only happen during dynamic module en/disabling, which is rare these days since Plugin Manager no longer supports it.
Re. unpredictability: Potentially yes, if someone is waiting for changes to be notified, then those may be delivered "later". On the other hand, for those calling allInstances, there is no difference. Changes are visible immediately. Re. other lookups: MetaInfServices lookup had few deadlocks of this style (e.g. getters firing events). However not recently. Moreover I am a bit afraid to change it. It would be switch synch -> asynch, while in case of FolderLookup it is just asynch -> more asynch.
Let's integrate.
Merged in. changeset: 85856:79bf32296a6e tag: tip parent: 85849:a38412014d14 parent: 85855:eb844a3d737f user: Jaroslav Tulach <jtulach@netbeans.org> date: Fri Jun 27 09:57:55 2008 +0200 summary: #134297: Ability to asynchronously notify listeners when lookup is being changed
Integrated into 'main-golden', available in NB_Trunk_Production #295 build Changeset: http://hg.netbeans.org/main/rev/79bf32296a6e User: Jaroslav Tulach <jtulach@netbeans.org> Log: #134297: Ability to asynchronously notify listeners when lookup is being changed
verified