You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Felix Meschberger (JIRA)" <ji...@apache.org> on 2012/10/31 20:00:16 UTC

[jira] [Updated] (FELIX-3637) DS bind concurrency problem

     [ https://issues.apache.org/jira/browse/FELIX-3637?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Felix Meschberger updated FELIX-3637:
-------------------------------------

    Fix Version/s:     (was: scr-1.8.0)
                   scr-1.6.2
    
> DS bind concurrency problem
> ---------------------------
>
>                 Key: FELIX-3637
>                 URL: https://issues.apache.org/jira/browse/FELIX-3637
>             Project: Felix
>          Issue Type: Bug
>          Components: Declarative Services (SCR)
>    Affects Versions: scr-1.8.0
>            Reporter: David Jencks
>            Assignee: David Jencks
>             Fix For: scr-1.6.2
>
>
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira