Hi,

On 17.03.11 08:19, "Olivier Bigard" <[email protected]> wrote:

>
>Hi Clément,
>
>Any news about it?
>Did you succeed to reproduce it?

I've reproduced it, so it's definitely a synchronization issue. I didn't
find the time to fix it so far, I hope to find to time this weekend.


Regards,

Clement



>
>Thanks,
>Olivier
>
>
>clement escoffier wrote:
>> 
>> Hi,
>> 
>> 
>> On 01.03.11 11:15, "Bigard Olivier" <[email protected]> wrote:
>> 
>>>Hi all,
>>>
>>>We faced a deadlock issue with iPojo 1.6.4 (and also reproduced with
>>>iPojo 1.8.0).
>>>Here are the details of the context:
>>>
>>>
>>>1)      We have a first iPojo Component that we will call "PDP".
>>>This Component is declared with the 3 iPojo annotations "Component",
>>>"Instantiate" and "Provides".
>>>
>>>2)      We have a second iPojo Component that we will call "PEP".
>>>This Component is declared with the 3 iPojo annotations "Component",
>>>"Instantiate" and "Provides".
>>>This Component requires the "PDP" Component with a "@Requires(policy =
>>>"dynamic-priority")" annotation.
>>>In a public method of the "PEP" Component we try to access to a method
>>>of
>>>the "PDP" reference.
>> 
>> 
>> Thanks, I will try to reproduce it and check
>> 
>>>
>>>During some tests, we are facing the following deadlock problem:
>>>
>>>2011-02-28 16:38:12,379 - [Thread Monitor] WARN
>>>(WatcherActivator.deadlockDetected:70) - Thread Deadlock detected...
>>>2011-02-28 16:38:12,379 - [Thread Monitor] WARN
>>>(WatcherActivator.deadlockDetected:71) - Deadlocked Thread:
>>>"AsyncRequest-1" Id=87 BLOCKED on
>>>org.apache.felix.ipojo.handlers.providedservice.ProvidedService@1664cb5
>>>owned by "Thread-7" Id=29
>>>                at
>>>org.apache.felix.ipojo.handlers.providedservice.ProvidedService.update(P
>>>ro
>>>videdService.java:446)
>>>                -  blocked on
>>>org.apache.felix.ipojo.handlers.providedservice.ProvidedService@1664cb5
>>>                at
>>>org.apache.felix.ipojo.handlers.providedservice.ProvidedServiceHandler._
>>>_o
>>>nSet(ProvidedServiceHandler.java:432)
>>>                at
>>>org.apache.felix.ipojo.handlers.providedservice.ProvidedServiceHandler.o
>>>nS
>>>et(ProvidedServiceHandler.java)
>>>                at
>>>org.apache.felix.ipojo.InstanceManager.onSet(InstanceManager.java:1102)
>>>                at
>>>com.axway.drw.core.defimpl.policy.DefaultPolicyDecisionPoint.__setrankin
>>>g(
>>>DefaultPolicyDecisionPoint.java)
>>>                at
>>>com.axway.drw.core.defimpl.policy.DefaultPolicyDecisionPoint.<init>(Defa
>>>ul
>>>tPolicyDecisionPoint.java:32)
>>>                at
>>>sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>>>                at
>>>sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorA
>>>cc
>>>essorImpl.java:39)
>>>                
>>>sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingCons
>>>tr
>>>uctorAccessorImpl.java:27)
>>>                
>>>java.lang.reflect.Constructor.newInstance(Constructor.java:513)
>>>                
>>>org.apache.felix.ipojo.InstanceManager.createObject(InstanceManager.java
>>>:6
>>>01)
>>>                
>>>org.apache.felix.ipojo.InstanceManager.getPojoObject(InstanceManager.jav
>>>a:
>>>777)
>>>                
>>>org.apache.felix.ipojo.handlers.providedservice.ProvidedService$Singleto
>>>nS
>>>trategy.getService(ProvidedService.java:691)
>>>                
>>>org.apache.felix.ipojo.handlers.providedservice.ProvidedService.getServi
>>>ce
>>>(ProvidedService.java:306)
>>>                
>>>org.apache.felix.framework.ServiceRegistrationImpl.getFactoryUnchecked(S
>>>er
>>>viceRegistrationImpl.java:307)
>>>                
>>>org.apache.felix.framework.ServiceRegistrationImpl.getService(ServiceReg
>>>is
>>>trationImpl.java:221)
>>>                
>>>org.apache.felix.framework.ServiceRegistry.getService(ServiceRegistry.ja
>>>va
>>>:295)
>>>                
>>>org.apache.felix.framework.Felix.getService(Felix.java:3007)
>>>                
>>>org.apache.felix.framework.BundleContextImpl.getService(BundleContextImp
>>>l.
>>>java:329)
>>>                
>>>org.apache.felix.ipojo.IPojoContext.getService(IPojoContext.java:260)
>>>                
>>>org.apache.felix.ipojo.util.Tracker.getService(Tracker.java:441)
>>>                
>>>org.apache.felix.ipojo.util.DependencyModel.getService(DependencyModel.j
>>>av
>>>a:911)
>>>                
>>>org.apache.felix.ipojo.handlers.dependency.Dependency.createServiceObjec
>>>t(
>>>Dependency.java:631)
>>>                
>>>org.apache.felix.ipojo.handlers.dependency.Dependency.onGet(Dependency.j
>>>av
>>>a:602)
>>>                
>>>org.apache.felix.ipojo.InstanceManager.onGet(InstanceManager.java:945)
>>>                
>>>com.axway.darwin.server.core.rest.impl.rest.policy.RestPolicyEnforcement
>>>Po
>>>int.__getpdp(RestPolicyEnforcementPoint.java)
>>>                
>>>com.axway.darwin.server.core.rest.impl.rest.policy.RestPolicyEnforcement
>>>Po
>>>int.__preFilter(RestPolicyEnforcementPoint.java:170)
>>>                
>>>com.axway.darwin.server.core.rest.impl.rest.policy.RestPolicyEnforcement
>>>Po
>>>int.preFilter(RestPolicyEnforcementPoint.java)
>>>                
>>>com.axway.darwin.server.core.rest.impl.rest.InterceptorFilterManager.pre
>>>Fi
>>>lter(InterceptorFilterManager.java:86)
>>>                
>>>com.axway.darwin.server.core.rest.impl.rest.InterceptorFilterManager.acc
>>>es
>>>s$200(InterceptorFilterManager.java:32)
>>>                
>>>com.axway.darwin.server.core.rest.impl.rest.InterceptorFilterManager$Res
>>>ou
>>>rceFilterAdapter.filter(InterceptorFilterManager.java:132)
>>>                
>>>com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRul
>>>e.
>>>java:270)
>>>                
>>>com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandP
>>>at
>>>hRule.java:136)
>>>                
>>>com.sun.jersey.server.impl.uri.rules.ResourceObjectRule.accept(ResourceO
>>>bj
>>>ectRule.java:84)
>>>                
>>>com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandP
>>>at
>>>hRule.java:136)
>>>                
>>>com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(Root
>>>Re
>>>sourceClassesRule.java:74)
>>>                
>>>com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest
>>>(W
>>>ebApplicationImpl.java:1347)
>>>                
>>>com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest
>>>(W
>>>ebApplicationImpl.java:1279)
>>>                
>>>com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(
>>>We
>>>bApplicationImpl.java:1229)
>>>                
>>>com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(
>>>We
>>>bApplicationImpl.java:1219)
>>>                
>>>com.sun.jersey.server.impl.container.grizzly.GrizzlyContainer._service(G
>>>ri
>>>zzlyContainer.java:180)
>>>                
>>>com.sun.jersey.server.impl.container.grizzly.GrizzlyContainer.service(Gr
>>>iz
>>>zlyContainer.java:145)
>>>                
>>>com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:16
>>>8)
>>>                
>>>com.axway.darwin.server.core.rest.impl.rest.JerseyAdapter.service(Jersey
>>>Ad
>>>apter.java:124)
>>>                
>>>com.axway.darwin.server.core.http.impl.auth.GrizzlyAuthenticationFilter.
>>>se
>>>rveProtectedAdapter(GrizzlyAuthenticationFilter.java:374)
>>>                
>>>com.axway.darwin.server.core.http.impl.auth.GrizzlyAuthenticationFilter.
>>>se
>>>rvice(GrizzlyAuthenticationFilter.java:96)
>>>                
>>>com.axway.darwin.server.core.http.async.AsyncRequest.run(AsyncRequest.ja
>>>va
>>>:63)
>>>                
>>>java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecuto
>>>r.
>>>java:886)
>>>                
>>>java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.ja
>>>va
>>>:908)
>>>                java.lang.Thread.run(Thread.java:662)
>>>
>>>2011-02-28 16:38:12,379 - [Thread Monitor] WARN
>>>(WatcherActivator.deadlockDetected:70) - Thread Deadlock detected...
>>>2011-02-28 16:38:12,379 - [Thread Monitor] WARN
>>>(WatcherActivator.deadlockDetected:71) - Deadlocked Thread:
>>>"Thread-7" Id=29 BLOCKED on
>>>org.apache.felix.ipojo.util.Tracker$Tracked@a28708 owned by
>>>"AsyncRequest-1" Id=87
>>>                at
>>>org.apache.felix.ipojo.util.Tracker$Tracked.track(Tracker.java:666)
>>>                -  blocked on
>>>org.apache.felix.ipojo.util.Tracker$Tracked@a28708
>>>                at
>>>org.apache.felix.ipojo.util.Tracker$Tracked.serviceChanged(Tracker.java:
>>>64
>>>7)
>>>                at
>>>org.apache.felix.framework.util.EventDispatcher.invokeServiceListenerCal
>>>lb
>>>ack(EventDispatcher.java:864)
>>>                at
>>>org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(Eve
>>>nt
>>>Dispatcher.java:732)
>>>                at
>>>org.apache.felix.framework.util.EventDispatcher.fireServiceEvent(EventDi
>>>sp
>>>atcher.java:662)
>>>                at
>>>org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:3726)
>>>                at
>>>org.apache.felix.framework.Felix.access$000(Felix.java:80)
>>>                at
>>>org.apache.felix.framework.Felix$2.serviceChanged(Felix.java:717)
>>>                
>>>org.apache.felix.framework.ServiceRegistry.servicePropertiesModified(Ser
>>>vi
>>>ceRegistry.java:478)
>>>                
>>>org.apache.felix.framework.ServiceRegistrationImpl.setProperties(Service
>>>Re
>>>gistrationImpl.java:116)
>>>                
>>>org.apache.felix.ipojo.handlers.providedservice.ProvidedService.register
>>>Se
>>>rvice(ProvidedService.java:348)
>>>                
>>>org.apache.felix.ipojo.handlers.providedservice.ProvidedServiceHandler._
>>>_s
>>>tateChanged(ProvidedServiceHandler.java:494)
>>>                
>>>org.apache.felix.ipojo.handlers.providedservice.ProvidedServiceHandler.s
>>>ta
>>>teChanged(ProvidedServiceHandler.java)
>>>                
>>>org.apache.felix.ipojo.InstanceManager.setState(InstanceManager.java:441
>>>)
>>>                
>>>org.apache.felix.ipojo.InstanceManager.start(InstanceManager.java:322)
>>>                
>>>org.apache.felix.ipojo.ComponentFactory.createInstance(ComponentFactory.
>>>ja
>>>va:155)
>>>                
>>>org.apache.felix.ipojo.IPojoFactory.createComponentInstance(IPojoFactory
>>>.j
>>>ava:301)
>>>                
>>>org.apache.felix.ipojo.IPojoFactory.createComponentInstance(IPojoFactory
>>>.j
>>>ava:238)
>>>                
>>>org.apache.felix.ipojo.InstanceCreator$ManagedInstance.create(InstanceCr
>>>ea
>>>tor.java:343)
>>>                
>>>org.apache.felix.ipojo.InstanceCreator.addInstance(InstanceCreator.java:
>>>89
>>>)
>>>                org.apache.felix.ipojo.Extender.parse(Extender.java:269)
>>>                
>>>org.apache.felix.ipojo.Extender.startManagementFor(Extender.java:208)
>>>                
>>>org.apache.felix.ipojo.Extender.access$600(Extender.java:52)
>>>                
>>>org.apache.felix.ipojo.Extender$CreatorThread.run(Extender.java:682)
>>>                java.lang.Thread.run(Thread.java:662)
>>>
>>>It seems that the 2 threads are trying to modify the same
>>>"ProvidedService" instance: the first one to update the value of the
>>>"ServiceRanking" property and the second one to change its state.
>>>
>>>One very important information: we tried to change the way to
>>>instantiate
>>>the second Component ("PDP") by using the XML instead of the annotation
>>>and the deadlock disappeared!
>> 
>> This just change the order of the declaration that make the difference.
>> Indeed, both XML and annotations are mixed in the bundle manifest.
>> 
>> Regards,
>> 
>> Clement
>> 
>>>
>>>Thank you for your help
>>>Olivier
>> 
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>> 
>> 
>> 
>
>-- 
>View this message in context:
>http://old.nabble.com/iPojo-deadlock-problem-tp31039503p31170374.html
>Sent from the Apache Felix - Users mailing list archive at Nabble.com.
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [email protected]
>For additional commands, e-mail: [email protected]
>



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to