Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Duplicate
-
framework-3.2.2
-
None
-
None
-
ServiceMix 4.5.3
Description
When a bundle is undeployed when ServiceMix is stopped, on the next restart the FelixStartLevel thread enters an infinite loop.
"FelixStartLevel" daemon prio=6 tid=0x0000000007ae9800 nid=0x2da4 runnable [0x00000000091cf000] java.lang.Thread.State: RUNNABLE at java.lang.IllegalStateException.<init>(IllegalStateException.java:55) at org.apache.felix.framework.Felix.acquireBundleLock(Felix.java:4955) - locked <0x00000000c11bbc88> (a [Ljava.lang.Object;) at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1156) at org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:266) at java.lang.Thread.run(Thread.java:744)
This is a side-effect of change FELIX-2942, in which the "for" loop has been replaced by a "while" loop on a boolean "bundlesRemaining". The "bundlesRemaining" is not recomputed in every iteration the loop. For instance, when a IllegalStateException is caught, it skips to the next iteration of the loop ("continue"). It therefore loops infinitely.
Suggestion solution : recompute the boolean "bundlesRemaining" at each iteration of the loop (perhaps in a "finally" block ?).
This regression has been introduced in Felix 3.2.x : version 3.0.x did not have this problem.
The impact on ServiceMix users is that "cold undeploy" is broken, but fortunately, "warm undeploy" is not.
Attachments
Attachments
Issue Links
- duplicates
-
FELIX-3743 Potential endless loop setting the active framework startlevel
- Closed