Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 288781

Summary: [discovery][rfc119][sen] race condition in file-based discovery init
Product: [RT] ECF Reporter: Scott Lewis <slewis>
Component: ecf.discoveryAssignee: ecf.core-inbox <ecf.core-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: bugs.eclipse.org, jeffmcaffer, philipp.konradi, thomas.kiesslich
Version: unspecifiedKeywords: helpwanted
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Scott Lewis CLA 2009-09-07 18:42:57 EDT
In the initialization of the file-based discovery there is a race condition in org.eclipse.ecf.osgi.services.discovery.local.FileBasedDiscoveryImpl.init().  Since the BundleTracker is created and opened *before* the discoTrackerCustomizer, it's possible for other bundles being started/activated to result in notifications to the BundleTracker, resulting in accesses to the discoTrackerCustomizer before it's actually created/set and opened.

The solution is to move the BundleTracker creation and opening to after the discoTrackerCustomizer creation (and with reciprocal behavior in destroy).

A patch with this restructuring will be put on this bug, and with the approval from SEN, can/will be applied to the OSU OSL codebase (prior to the resolution of CQ http://dev.eclipse.org/ipzilla/show_bug.cgi?id=3232).
Comment 1 Thomas Kiesslich CLA 2009-09-08 15:27:03 EDT
I agree, that would solve the issue. 
+1 from my side.
Comment 2 Philipp Konradi CLA 2009-09-09 12:01:07 EDT
+1 from my side as well
Comment 3 Scott Lewis CLA 2009-09-16 01:30:20 EDT
Described fix committed to HEAD.