Closed sjsf closed 7 years ago
Oh well, on a second look it's actually rather Felix SCR which gets lured into the deadlock. Sorry for the noise...
Thanks for the report and the analysis. Do you think it is a Felix SCR problem or does it run fine on Felix and deadlocks on Concierge (in which case it still could be a bug on our side)?
Honestly, I have no idea yet whether it's the concrete Felix SCR version which is prone to this error or if it is the way how Concierge is calling it. In any case, I have never seen this in neither with Equinox nor on Karaf (which is using Equinox under the hood too, if I'm not mistaken). Both are OSGi R6 and therefore are using Felix SCR 2.0.x while in Concierge I was using the R5 compatible 1.8.x.
I will let you know once I find out more.
Thanks, I appreciate it.
One observation: with Concierge R6 (commit f997291f) it works nicely with either of the Felix SCR versions (1.8.4 & 2.0.12) .
Karaf (which is using Equinox under the hood too, if I'm not mistaken).
Karaf supports different OSGi frameworks e.g. Apache Felix and Eclipse Equinox. Default is Apache Felix, AFAIK openHAB changed it to Equinox.
I try to find a test case which can reproduce that behavior using the mentioned versions of Felix SCR. Then we can more easily understand where the root problem is. From the initial stack trace, I see that the whole call chain was started by SCR, starting an ESH bundle with that "strange" way to start bundles from a bundle tracker. The started bundle is using SCR components too, so it feels more than an issue in SCR. But a test case should help to clarify that.
Resolving bundles within a bundle tracker apparently leads to a deadlock on the main thread:
For details, see https://github.com/eclipse/smarthome-packaging-sample/issues/13#issuecomment-335803723.