Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
scr-1.8.0
-
None
Description
when two threads send events announcing services, the following can happen:
- thread1 sees the state as "Unsatisfied" so tries to activate the component, changing the state to "Active" while we try to complete activation. This thread gets to the point of determining that there is another missing dependency but does not yet change the state back to "Unsatisified"
- thread 2 (with the missing service) sees the state as Active so it goes on to consider whether it should rebind the "new" service. If the dependency is static and reluctant, it won't. In other cases, since the instance is not actually created, we'd get other problems.
- thread 1 changes the state back to "Unsatisfied" and exits.
This is hard to demonstrate with just DS services since they tend to run on one thread. With blueprint services that are dependencies to a DS service, it is easier to see since each blueprint bundle has its services started asynchronously on a separate thread.