brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alex Heneveld (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (BROOKLYN-498) Deadlock in MembershipTrackingPolicyTest when updating sensors vs group members
Date Fri, 05 May 2017 12:18:04 GMT

    [ https://issues.apache.org/jira/browse/BROOKLYN-498?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15998245#comment-15998245
] 

Alex Heneveld commented on BROOKLYN-498:
----------------------------------------

{noformat}
Found one Java-level deadlock:
=============================
"brooklyn-execmanager-FxWzkzWW-2":
  waiting to lock monitor 0x00007fa164b42bd8 (object 0x00000007b864e618, a java.util.Collections$SynchronizedMap),
  which is held by "brooklyn-execmanager-FxWzkzWW-1"
"brooklyn-execmanager-FxWzkzWW-1":
  waiting to lock monitor 0x00007fa164b441d8 (object 0x00000007b8661c60, a java.util.LinkedHashSet),
  which is held by "main"
"main":
  waiting to lock monitor 0x00007fa164b42bd8 (object 0x00000007b864e618, a java.util.Collections$SynchronizedMap),
  which is held by "brooklyn-execmanager-FxWzkzWW-1"

Java stack information for the threads listed above:
===================================================
"brooklyn-execmanager-FxWzkzWW-2":
	at java.util.Collections$SynchronizedMap.get(Collections.java:2584)
	- waiting to lock <0x00000007b864e618> (a java.util.Collections$SynchronizedMap)
	at org.apache.brooklyn.core.sensor.AttributeMap.getValue(AttributeMap.java:200)
	at org.apache.brooklyn.core.sensor.AttributeMap.getValue(AttributeMap.java:206)
	at org.apache.brooklyn.core.entity.AbstractEntity$BasicSensorSupport.get(AbstractEntity.java:1086)
	at org.apache.brooklyn.core.entity.AbstractEntity.getAttribute(AbstractEntity.java:993)
	at sun.reflect.GeneratedMethodAccessor14.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.apache.brooklyn.core.objs.proxy.EntityProxyImpl.invoke(EntityProxyImpl.java:189)
	at com.sun.proxy.$Proxy196.getAttribute(Unknown Source)
	at org.apache.brooklyn.core.entity.lifecycle.ServiceStateLogic$ComputeServiceIndicatorsFromChildrenAndMembers.computeServiceNotUp(ServiceStateLogic.java:563)
	at org.apache.brooklyn.core.entity.lifecycle.ServiceStateLogic$ComputeServiceIndicatorsFromChildrenAndMembers.onUpdated(ServiceStateLogic.java:548)
	at org.apache.brooklyn.enricher.stock.AbstractMultipleSensorAggregator.onEvent(AbstractMultipleSensorAggregator.java:137)
	at org.apache.brooklyn.core.mgmt.internal.LocalSubscriptionManager$1.run(LocalSubscriptionManager.java:276)
	at org.apache.brooklyn.util.concurrent.CallableFromRunnable.call(CallableFromRunnable.java:44)
	at org.apache.brooklyn.util.core.task.BasicExecutionManager$SubmissionCallable.call(BasicExecutionManager.java:529)
	at org.apache.brooklyn.util.core.task.SingleThreadedScheduler$1.call(SingleThreadedScheduler.java:116)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
"brooklyn-execmanager-FxWzkzWW-1":
	at org.apache.brooklyn.entity.group.AbstractGroupImpl.getMembers(AbstractGroupImpl.java:269)
	- waiting to lock <0x00000007b8661c60> (a java.util.LinkedHashSet)
	at sun.reflect.GeneratedMethodAccessor17.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.apache.brooklyn.core.objs.proxy.EntityProxyImpl.invoke(EntityProxyImpl.java:189)
	at com.sun.proxy.$Proxy196.getMembers(Unknown Source)
	at org.apache.brooklyn.core.mgmt.internal.AbstractSubscriptionManager$2.apply(AbstractSubscriptionManager.java:139)
	at org.apache.brooklyn.core.mgmt.internal.AbstractSubscriptionManager$2.apply(AbstractSubscriptionManager.java:1)
	at org.apache.brooklyn.core.mgmt.internal.LocalSubscriptionManager.submitPublishEvent(LocalSubscriptionManager.java:225)
	at org.apache.brooklyn.core.mgmt.internal.LocalSubscriptionManager.publish(LocalSubscriptionManager.java:216)
	at org.apache.brooklyn.core.mgmt.internal.BasicSubscriptionContext.publish(BasicSubscriptionContext.java:176)
	at org.apache.brooklyn.core.entity.AbstractEntity$BasicSensorSupport.emitInternal(AbstractEntity.java:1213)
	at org.apache.brooklyn.core.entity.AbstractEntity.emitInternal(AbstractEntity.java:1993)
	at org.apache.brooklyn.core.sensor.AttributeMap.update(AttributeMap.java:133)
	at org.apache.brooklyn.core.sensor.AttributeMap.modify(AttributeMap.java:162)
	- locked <0x00000007b864e618> (a java.util.Collections$SynchronizedMap)
	at org.apache.brooklyn.core.entity.AbstractEntity$BasicSensorSupport.modify(AbstractEntity.java:1154)
	at org.apache.brooklyn.core.enricher.AbstractEnricher.emit(AbstractEnricher.java:135)
	at org.apache.brooklyn.enricher.stock.AbstractTransformer.onEvent(AbstractTransformer.java:148)
	at org.apache.brooklyn.core.mgmt.internal.LocalSubscriptionManager$1.run(LocalSubscriptionManager.java:276)
	at org.apache.brooklyn.util.concurrent.CallableFromRunnable.call(CallableFromRunnable.java:44)
	at org.apache.brooklyn.util.core.task.BasicExecutionManager$SubmissionCallable.call(BasicExecutionManager.java:529)
	at org.apache.brooklyn.util.core.task.SingleThreadedScheduler$1.call(SingleThreadedScheduler.java:116)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
"main":
	at java.util.Collections$SynchronizedMap.put(Collections.java:2588)
	- waiting to lock <0x00000007b864e618> (a java.util.Collections$SynchronizedMap)
	at org.apache.brooklyn.core.sensor.AttributeMap.update(AttributeMap.java:122)
	at org.apache.brooklyn.core.sensor.AttributeMap.updateWithoutPublishing(AttributeMap.java:147)
	at org.apache.brooklyn.core.sensor.AttributeMap.update(AttributeMap.java:132)
	at org.apache.brooklyn.core.entity.AbstractEntity$BasicSensorSupport.set(AbstractEntity.java:1111)
	at org.apache.brooklyn.entity.group.AbstractGroupImpl.addMember(AbstractGroupImpl.java:150)
	- locked <0x00000007b8661c60> (a java.util.LinkedHashSet)
	at org.apache.brooklyn.entity.group.BasicGroupImpl.addChild(BasicGroupImpl.java:33)
	at sun.reflect.GeneratedMethodAccessor27.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.apache.brooklyn.core.objs.proxy.EntityProxyImpl.invoke(EntityProxyImpl.java:201)
	at com.sun.proxy.$Proxy196.addChild(Unknown Source)
	at org.apache.brooklyn.core.entity.AbstractEntity.setParent(AbstractEntity.java:636)
	at org.apache.brooklyn.core.entity.AbstractEntity.setParent(AbstractEntity.java:1)
	at org.apache.brooklyn.core.objs.proxy.InternalEntityFactory.loadUnitializedEntity(InternalEntityFactory.java:265)
	at org.apache.brooklyn.core.objs.proxy.InternalEntityFactory.createEntityAndDescendantsUninitialized(InternalEntityFactory.java:207)
	at org.apache.brooklyn.core.objs.proxy.InternalEntityFactory.createEntity(InternalEntityFactory.java:189)
	at org.apache.brooklyn.core.mgmt.internal.LocalEntityManager.createEntity(LocalEntityManager.java:149)
	at org.apache.brooklyn.entity.group.MembershipTrackingPolicyTest.createAndManageChildOf(MembershipTrackingPolicyTest.java:76)
	at org.apache.brooklyn.entity.group.MembershipTrackingPolicyTest.testDeprecatedSetGroupWorks(MembershipTrackingPolicyTest.java:156)
	at sun.reflect.GeneratedMethodAccessor38.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:104)
	at org.testng.internal.Invoker.invokeMethod(Invoker.java:645)
	at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:851)
	at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1177)
	at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:129)
	at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:112)
	at org.testng.TestRunner.privateRun(TestRunner.java:756)
	at org.testng.TestRunner.run(TestRunner.java:610)
	at org.testng.SuiteRunner.runTest(SuiteRunner.java:387)
	at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:382)
	at org.testng.SuiteRunner.privateRun(SuiteRunner.java:340)
	at org.testng.SuiteRunner.run(SuiteRunner.java:289)
	at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
	at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
	at org.testng.TestNG.runSuitesSequentially(TestNG.java:1293)
	at org.testng.TestNG.runSuitesLocally(TestNG.java:1218)
	at org.testng.TestNG.runSuites(TestNG.java:1133)
	at org.testng.TestNG.run(TestNG.java:1104)
	at org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:132)
	at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:236)
	at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:81)

Found 1 deadlock.
{noformat}


> Deadlock in MembershipTrackingPolicyTest when updating sensors vs group members
> -------------------------------------------------------------------------------
>
>                 Key: BROOKLYN-498
>                 URL: https://issues.apache.org/jira/browse/BROOKLYN-498
>             Project: Brooklyn
>          Issue Type: Bug
>            Reporter: Alex Heneveld
>
> Core tests can hang due to this.  Set high invocation count eg on {{testDeprecatedSetGroupWorks}}
to expose.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message