Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 353829 - BundleLoaderProxy.getBasicBundleLoader needs to be synchronized.
Summary: BundleLoaderProxy.getBasicBundleLoader needs to be synchronized.
Status: RESOLVED WONTFIX
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: Framework (show other bugs)
Version: 3.7   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: equinox.framework-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-03 17:38 EDT by John Ross CLA
Modified: 2012-05-14 10:43 EDT (History)
1 user (show)

See Also:


Attachments
Adds synchronization to getBasicBundleLoader method. (1.02 KB, patch)
2011-08-03 17:46 EDT, John Ross CLA
no flags Details | Diff
Alternate: Make loader variable volatile. (1.26 KB, patch)
2011-08-03 19:21 EDT, John Ross CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description John Ross CLA 2011-08-03 17:38:04 EDT
getBasicBundleLoader accesses the loader variable which is set within the synchronized getBundleLoader0 method.
Comment 1 John Ross CLA 2011-08-03 17:46:29 EDT
Created attachment 200862 [details]
Adds synchronization to getBasicBundleLoader method.
Comment 2 Thomas Watson CLA 2011-08-03 17:52:53 EDT
We need to evaluate if adding such synchronization could introduce deadlock.  If getBasicBundleLoader is called as a result of calling getBundleLoader0 then deadlock may occur if there are dependency cycles between bundles.
Comment 3 John Ross CLA 2011-08-03 19:21:05 EDT
Created attachment 200867 [details]
Alternate: Make loader variable volatile.
Comment 4 Thomas Watson CLA 2011-08-04 08:27:41 EDT
(In reply to comment #3)
> Created attachment 200867 [details]
> Alternate: Make loader variable volatile.

I prefer the first approach if we can determine that it is safe.  I had not done the analysis to determine if there is deadlock potential with the first patch.
Comment 5 John Ross CLA 2011-08-04 09:58:23 EDT
(In reply to comment #4)
> (In reply to comment #3)
> > Created attachment 200867 [details] [details]
> > Alternate: Make loader variable volatile.
> I prefer the first approach if we can determine that it is safe.  I had not
> done the analysis to determine if there is deadlock potential with the first
> patch.

I took a look for a bit yesterday and didn't see anything obvious but a second pair of eyes wouldn't hurt.
Comment 6 Thomas Watson CLA 2012-05-14 10:43:18 EDT
No plans to fix this.  A general restructuring of the code is going to happen when we prototype and implement OSGi inter-op with Java 8 Module system.