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 36402 - MetaInfServicesLookup sometimes failing to return results
Summary: MetaInfServicesLookup sometimes failing to return results
Status: VERIFIED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Lookup (show other bugs)
Version: 3.x
Hardware: PC Linux
: P2 blocker (vote)
Assignee: Jaroslav Tulach
URL:
Keywords: RANDOM, THREAD
: 36161 36228 36458 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-10-02 20:57 UTC by Jesse Glick
Modified: 2008-12-22 19:40 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2003-10-02 20:57:09 UTC
Not sure exactly what to point to, because the
problem does not seem reproducible. But very
frequently over the past couple of weeks,
Lookup.default has failed to return a result for
basic queries which should be in MISL - and
printing L.d shows that it does contain a MISL
which should have the proper modules. The only
significant changes I know of were by you, re.
AbstractLookup.Pair.

Here is an example:

java.lang.NullPointerException
	at
org.netbeans.core.windows.RegistryImpl.<init>(RegistryImpl.java:64)

L.d.l(WindowManager.class) returns null.

Same has happened recently for DataLoaderPool,
InstalledFileLocator, perhaps other classes. Quite
unreproducibly - I have had it happen with IFL in
a fresh user dir, then I instrumented the class
making the query and ran again with a fresh user
dir and it did not happen again - so seems to be a
race condition.

Of course, could also be a problem in ProxyLookup
(i.e. NbTM.Lkp).
Comment 1 Jaroslav Tulach 2003-10-03 20:53:48 UTC
There is probably a hole in MetaInf that could in case of two threads
accessing it return null for the later thread. I can get rid of this
and see if that helps.
Comment 2 Jaroslav Tulach 2003-10-03 21:01:21 UTC
*** Issue 36228 has been marked as a duplicate of this issue. ***
Comment 3 _ tboudreau 2003-10-03 21:25:44 UTC
In a build today, several times the contents of the execution,
compiler and debugger property editors suddenly became empty (after
having worked earlier).  Related?
Comment 4 Jesse Glick 2003-10-04 00:03:53 UTC
Provisionally marking as a race condition.
Comment 5 Jaroslav Tulach 2003-10-05 12:26:10 UTC
I guess this is caused by the fix of issue 36035, a deadlock due to
strong locking in lookup, I can try to tight it up a bit again,
meanwhile you can try against version 1.3 of MetaInfLookup.
Comment 6 Jaroslav Tulach 2003-10-05 14:20:08 UTC
I have fixed one problem. Maybe that was the one of this issue.

AbstractLookup.java
new revision: 1.41; previous revision: 1.40

MetaInfServicesLookup.java
new revision: 1.6; previous revision: 1.5
Comment 7 Jesse Glick 2003-10-07 17:56:45 UTC
*** Issue 36458 has been marked as a duplicate of this issue. ***
Comment 8 Jaroslav Tulach 2004-01-15 09:51:21 UTC
*** Issue 36161 has been marked as a duplicate of this issue. ***
Comment 9 Lukas Hasik 2004-02-25 18:39:18 UTC
x