Community
Participate
Working Groups
getBasicBundleLoader accesses the loader variable which is set within the synchronized getBundleLoader0 method.
Created attachment 200862 [details] Adds synchronization to getBasicBundleLoader method.
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.
Created attachment 200867 [details] Alternate: Make loader variable volatile.
(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.
(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.
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.