Bug 288781 - [discovery][rfc119][sen] race condition in file-based discovery init
Summary: [discovery][rfc119][sen] race condition in file-based discovery init
Status: RESOLVED FIXED
Alias: None
Product: ECF
Classification: RT
Component: ecf.discovery (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: ecf.core-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: helpwanted
Depends on:
Blocks:
 
Reported: 2009-09-07 18:42 EDT by Scott Lewis CLA
Modified: 2009-09-16 01:30 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.