brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (BROOKLYN-284) Deadlock in entity creation, when toString() calls getConfig
Date Fri, 27 May 2016 20:30:13 GMT

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

ASF GitHub Bot commented on BROOKLYN-284:
-----------------------------------------

GitHub user aledsage opened a pull request:

    https://github.com/apache/brooklyn-server/pull/161

    BROOKLYN-284: fix deadlock in entity initialisation

    

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/aledsage/brooklyn-server fix/BROOKLYN-284

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/brooklyn-server/pull/161.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #161
    
----
commit 2b3d548c4d0169453d35d4212831df07bef3b6c4
Author: Aled Sage <aled.sage@gmail.com>
Date:   2016-05-27T20:29:13Z

    BROOKLYN-284: fix deadlock in entity initialisation

----


> Deadlock in entity creation, when toString() calls getConfig
> ------------------------------------------------------------
>
>                 Key: BROOKLYN-284
>                 URL: https://issues.apache.org/jira/browse/BROOKLYN-284
>             Project: Brooklyn
>          Issue Type: Bug
>    Affects Versions: 0.9.0
>            Reporter: Aled Sage
>
> If an entity's toString calls getConfig() to retrieve a config value that is set on the
entity, it deadlocks during the initial creation of the entity.
> {noformat}
> Java stack information for the threads listed above:
> ===================================================
> "brooklyn-execmanager-o0dJOc0a-1":
>         at org.apache.brooklyn.core.mgmt.internal.EntityManagementSupport.getExecutionContext(EntityManagementSupport.java:354)
>         - waiting to lock <0x00000007fa6ff568> (a org.apache.brooklyn.core.mgmt.internal.EntityManagementSupport)
>         at org.apache.brooklyn.core.entity.AbstractEntity.getExecutionContext(AbstractEntity.java:1566)
>         - locked <0x00000007fa6fef90> (a org.apache.brooklyn.core.entity.EntityTypeTest$EntityWithToStringAccessingConfig)
>         at org.apache.brooklyn.core.objs.AdjunctConfigMap.getConfig(AdjunctConfigMap.java:84)
>         at org.apache.brooklyn.core.config.internal.AbstractConfigMapImpl.getConfig(AbstractConfigMapImpl.java:50)
>         at org.apache.brooklyn.core.objs.AbstractEntityAdjunct$BasicConfigurationSupport.get(AbstractEntityAdjunct.java:291)
>         at org.apache.brooklyn.enricher.stock.Transformer.getTransformation(Transformer.java:65)
>         at org.apache.brooklyn.enricher.stock.AbstractTransformer.compute(AbstractTransformer.java:139)
>         at org.apache.brooklyn.enricher.stock.AbstractTransformer.onEvent(AbstractTransformer.java:133)
>         at org.apache.brooklyn.core.mgmt.internal.LocalSubscriptionManager$1.run(LocalSubscriptionManager.java:149)
>         at org.apache.brooklyn.util.concurrent.CallableFromRunnable.call(CallableFromRunnable.java:43)
>         at org.apache.brooklyn.util.core.task.BasicExecutionManager$SubmissionCallable.call(BasicExecutionManager.java:519)
>         at org.apache.brooklyn.util.core.task.SingleThreadedScheduler$1.call(SingleThreadedScheduler.java:116)
>         at java.util.concurrent.FutureTask.run(FutureTask.java:262)
>         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>         at java.lang.Thread.run(Thread.java:745)
> "main":
>         at org.apache.brooklyn.core.entity.AbstractEntity.getExecutionContext(AbstractEntity.java:1566)
>         - waiting to lock <0x00000007fa6fef90> (a org.apache.brooklyn.core.entity.EntityTypeTest$EntityWithToStringAccessingConfig)
>         at org.apache.brooklyn.core.entity.internal.EntityConfigMap.getConfig(EntityConfigMap.java:117)
>         at org.apache.brooklyn.core.config.internal.AbstractConfigMapImpl.getConfig(AbstractConfigMapImpl.java:50)
>         at org.apache.brooklyn.core.entity.AbstractEntity$BasicConfigurationSupport.get(AbstractEntity.java:1180)
>         at org.apache.brooklyn.core.entity.AbstractEntity.getConfig(AbstractEntity.java:1266)
>         at org.apache.brooklyn.core.entity.EntityTypeTest$EntityWithToStringAccessingConfig.toString(EntityTypeTest.java:300)
>         at org.slf4j.helpers.MessageFormatter.safeObjectAppend(MessageFormatter.java:304)
>         at org.slf4j.helpers.MessageFormatter.deeplyAppendParameter(MessageFormatter.java:276)
>         at org.slf4j.helpers.MessageFormatter.arrayFormat(MessageFormatter.java:230)
>         at ch.qos.logback.classic.spi.LoggingEvent.<init>(LoggingEvent.java:114)
>         at ch.qos.logback.classic.Logger.buildLoggingEventAndAppend(Logger.java:447)
>         at ch.qos.logback.classic.Logger.filterAndLog_0_Or3Plus(Logger.java:403)
>         at ch.qos.logback.classic.Logger.debug(Logger.java:522)
>         at org.apache.brooklyn.core.mgmt.internal.LocalSubscriptionManager.subscribe(LocalSubscriptionManager.java:114)
>         - locked <0x00000007f955e438> (a org.apache.brooklyn.core.mgmt.internal.LocalSubscriptionManager)
>         at org.apache.brooklyn.core.mgmt.internal.QueueingSubscriptionManager.startDelegatingForSubscribing(QueueingSubscriptionManager.java:81)
>         - locked <0x00000007fa6ff618> (a org.apache.brooklyn.core.mgmt.internal.QueueingSubscriptionManager)
>         at org.apache.brooklyn.core.mgmt.internal.EntityManagementSupport.onManagementStarting(EntityManagementSupport.java:186)
>         - locked <0x00000007fa6ff568> (a org.apache.brooklyn.core.mgmt.internal.EntityManagementSupport)
>         at org.apache.brooklyn.core.mgmt.internal.LocalEntityManager$2.apply(LocalEntityManager.java:360)
>         at org.apache.brooklyn.core.mgmt.internal.LocalEntityManager$2.apply(LocalEntityManager.java:1)
>         at org.apache.brooklyn.core.mgmt.internal.LocalEntityManager.recursively(LocalEntityManager.java:586)
>         at org.apache.brooklyn.core.mgmt.internal.LocalEntityManager.manageRecursive(LocalEntityManager.java:381)
>         at org.apache.brooklyn.core.mgmt.internal.LocalEntityManager.manage(LocalEntityManager.java:275)
>         at org.apache.brooklyn.core.mgmt.internal.LocalEntityManager.createEntity(LocalEntityManager.java:149)
>         at org.apache.brooklyn.core.entity.AbstractEntity.addChild(AbstractEntity.java:693)
>         at org.apache.brooklyn.core.test.entity.TestApplicationImpl.createAndManageChild(TestApplicationImpl.java:60)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>         at java.lang.reflect.Method.invoke(Method.java:606)
>         at org.apache.brooklyn.core.objs.proxy.EntityProxyImpl.invoke(EntityProxyImpl.java:213)
>         at com.sun.proxy.$Proxy12.createAndManageChild(Unknown Source)
>         at org.apache.brooklyn.core.entity.EntityTypeTest.testEntityDynamicTypeDoesNotCallToStringDuringConstruction(EntityTypeTest.java:272)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>         at java.lang.reflect.Method.invoke(Method.java:606)
>         at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:84)
>         at org.testng.internal.Invoker.invokeMethod(Invoker.java:714)
>         at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
>         at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231)
>         at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
>         at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
>         at org.testng.TestRunner.privateRun(TestRunner.java:767)
>         at org.testng.TestRunner.run(TestRunner.java:617)
>         at org.testng.SuiteRunner.runTest(SuiteRunner.java:348)
>         at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:343)
>         at org.testng.SuiteRunner.privateRun(SuiteRunner.java:305)
>         at org.testng.SuiteRunner.run(SuiteRunner.java:254)
>         at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
>         at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
>         at org.testng.TestNG.runSuitesSequentially(TestNG.java:1224)
>         at org.testng.TestNG.runSuitesLocally(TestNG.java:1149)
>         at org.testng.TestNG.run(TestNG.java:1057)
>         at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:115)
>         at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:207)
>         at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:178)
> Found 1 deadlock.
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message