Bug 134297 - Do not notify Lookup Listeners in Folder recognizer thread
Do not notify Lookup Listeners in Folder recognizer thread
Status: VERIFIED FIXED
Product: platform
Classification: Unclassified
Component: Data Systems
6.x
All All
: P2 (vote)
: 6.x
Assigned To: Jaroslav Tulach
issues@platform
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-04-30 22:25 UTC by Ivan Sidorkin
Modified: 2008-12-22 14:52 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
:


Attachments
messages log (45.88 KB, text/plain)
2008-04-30 22:26 UTC, Ivan Sidorkin
Details
thread dump (29.48 KB, text/plain)
2008-04-30 22:27 UTC, Ivan Sidorkin
Details
Proposed Changes (35.01 KB, patch)
2008-06-20 14:29 UTC, Jaroslav Tulach
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ivan Sidorkin 2008-04-30 22:25:13 UTC
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
Comment 1 Ivan Sidorkin 2008-04-30 22:26:13 UTC
Created attachment 60899 [details]
messages log
Comment 2 Ivan Sidorkin 2008-04-30 22:27:14 UTC
Created attachment 60900 [details]
thread dump
Comment 3 Peter Pis 2008-05-01 21:08:22 UTC
Reassigning to "logger" for evaluation.
Comment 4 Jaroslav Tulach 2008-05-03 17:01:01 UTC
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.
Comment 5 Jaroslav Tulach 2008-06-20 14:29:16 UTC
Changes in Utilities (compatible) and one (semantically incompatible) change in Data Systems to prevent this deadlock 
seems to be needed.
Comment 6 Jaroslav Tulach 2008-06-20 14:29:52 UTC
Created attachment 63166 [details]
Proposed Changes
Comment 7 Jesse Glick 2008-06-20 14:47:26 UTC
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.
Comment 8 Jaroslav Tulach 2008-06-20 16:29:53 UTC
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.
Comment 9 Jaroslav Tulach 2008-06-27 08:49:00 UTC
Let's integrate.
Comment 10 Jaroslav Tulach 2008-06-27 08:59:16 UTC
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
Comment 11 Quality Engineering 2008-07-02 15:39:56 UTC
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
Comment 12 Ivan Sidorkin 2008-07-08 15:12:16 UTC
verified


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