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 210567 - Test failures involving Felix bundle cache lock
Summary: Test failures involving Felix bundle cache lock
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Netigso (show other bugs)
Version: 7.2
Hardware: PC Linux
: P2 normal (vote)
Assignee: Jaroslav Tulach
URL:
Keywords: RANDOM, TEST
Depends on:
Blocks:
 
Reported: 2012-04-02 18:43 UTC by Jesse Glick
Modified: 2012-04-27 09:59 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Failure log (19.28 KB, text/plain)
2012-04-02 18:43 UTC, Jesse Glick
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2012-04-02 18:43:44 UTC
Created attachment 117682 [details]
Failure log

Saw a test failure in NB-Core-Build #8080 apparently caused by

java.lang.Exception: Unable to lock bundle cache: java.nio.channels.OverlappingFileLockException
	at org.apache.felix.framework.cache.BundleCache.<init>(BundleCache.java:176)
	at org.apache.felix.framework.Felix.init(Felix.java:629)
	at org.netbeans.core.netigso.Netigso.prepare(Netigso.java:149)

leading to an NPE in NetigsoServices.<init>.

I filed https://issues.apache.org/jira/browse/FELIX-3420 for better diagnostics.

If I recall correctly there are pretty frequent failures in this module with the same root cause. Needs to be fixed to avoid blocking propagation of core-main (and perhaps also main and ergonomics).
Comment 1 Jesse Glick 2012-04-17 14:46:25 UTC
Causing pretty routine problems, e.g. #8166. If the race condition (or whatever it is) cannot really be solved, would be better to remove the affected modules from nbbuild/hudson/core-main, or mark all test cases known to trigger the problem as @RandomlyFails.
Comment 2 Jaroslav Tulach 2012-04-24 12:35:54 UTC
I guess I know what it is. The NetigsoFramework is a singleton found in lookup. While ModuleManager can be instantiated many times (especially in tests). This may lead to situation when the same OSGi framework is reused by multiple tests and thus we can get the bundle problem.

Solution should be to have 1:1 mapping between ModuleInstaller and NetigsoFramework.
Comment 3 Jaroslav Tulach 2012-04-25 09:40:16 UTC
ergonomics#a94e58515731
Comment 4 Quality Engineering 2012-04-27 09:59:32 UTC
Integrated into 'main-golden', will be available in build *201204270400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/a94e58515731
User: Jaroslav Tulach <jtulach@netbeans.org>
Log: #210567: Making sure each instance of ModuleManager has its own instance of NetigsoFramework