[
https://issues.apache.org/jira/browse/FELIX-489?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Rajini Sivaram closed FELIX-489.
--------------------------------
Thank you, Karl and Richard. The tests run fine with the latest snapshot.
> Intermittent deadlock while using declarative services in Tuscany
> --------------------------------------------------------------------
>
> Key: FELIX-489
> URL: https://issues.apache.org/jira/browse/FELIX-489
> Project: Felix
> Issue Type: Bug
> Components: Declarative Services
> Affects Versions: 1.0.0
> Reporter: Rajini Sivaram
> Assignee: Karl Pauls
>
> One of my tests using declarative services hangs intermittently. The stack
> trace from a debugger shows two threads waiting for locks owned by the other.
> I am using Felix framework 1.0.3 and SCR 1.0.0. The call from the main thread
> to getService is triggered by Tuscany - I am not sure if there are times when
> it shouldn't call bundleContext.getService. But the order of locking in the
> two threads are different leading to the deadlock - is it something that
> could be fixed? The main thread owns the ServiceRegistry lock and is waiting
> for the lock on ServiceFactoryComponentManager, while the configuration
> updater owns the ServiceFactoryComponentManager lock and is waiting for the
> ServiceRegistry lock.
>
>
> Thread [main] (Suspended)
> ServiceFactoryComponentManager.getService(Bundle, ServiceRegistration)
> line: 111
> ServiceRegistrationImpl.getFactoryUnchecked(Bundle) line: 245
> ServiceRegistrationImpl.getService(Bundle) line: 179
> ServiceRegistry.getService(Bundle, ServiceReference) line: 238
> Felix.getService(Bundle, ServiceReference) line: 2835
> BundleContextImpl.getService(ServiceReference) line: 417
> .............. (Tuscany)
>
> Thread [Configuration Updater] (Suspended)
> ServiceRegistry.unregisterService(Bundle, ServiceRegistration) line: 78
> ServiceRegistrationImpl.unregister() line: 99
>
> ServiceFactoryComponentManager(AbstractComponentManager).unregisterComponentService()
> line: 610
>
> ServiceFactoryComponentManager(AbstractComponentManager).deactivateInternal()
> line: 464
> ServiceFactoryComponentManager(AbstractComponentManager).reactivate()
> line: 142
>
> ServiceFactoryComponentManager(ImmediateComponentManager).reconfigure(Dictionary)
> line: 399
> ImmediateComponentManager$1.updated(Dictionary) line: 90
> ConfigurationManager$ManagedServiceUpdate.run() line: 863
> UpdateThread.run() line: 89
>
>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.