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

Svetoslav Neykov commented on BROOKLYN-352:
-------------------------------------------

Hit this once again:
{noformat}
Failed after 266ms: Error invoking start at DynamicClusterImpl{id=biagm3ha42}: 
Error resolving config cluster.initial.size, 
$brooklyn:entity("kubernetes-cluster").config("kubernetes.master.size"), in 
org.apache.brooklyn.util.core.task.BasicExecutionContext@1f77fbbe([Wrapped[contextEntity:DynamicClusterImpl{id=biagm3ha42}],
 LocalManagementContext[lvMtifon-xhTxtHy5]]): 
org.apache.brooklyn.util.exceptions.PropagatedRuntimeException: 
ConcurrentModificationException

org.apache.brooklyn.core.mgmt.internal.EffectorUtils$EffectorCallPropagatedRuntimeException:
 Error invoking start at DynamicClusterImpl{id=biagm3ha42}: Error resolving 
config cluster.initial.size, 
$brooklyn:entity("kubernetes-cluster").config("kubernetes.master.size"), in 
org.apache.brooklyn.util.core.task.BasicExecutionContext@1f77fbbe([Wrapped[contextEntity:DynamicClusterImpl{id=biagm3ha42}],
 LocalManagementContext[lvMtifon-xhTxtHy5]]): 
org.apache.brooklyn.util.exceptions.PropagatedRuntimeException: 
ConcurrentModificationException
        at 
org.apache.brooklyn.core.mgmt.internal.EffectorUtils$EffectorCallPropagatedRuntimeException.propagate(EffectorUtils.java:318)
        at 
org.apache.brooklyn.core.mgmt.internal.EffectorUtils$EffectorCallPropagatedRuntimeException.access$100(EffectorUtils.java:285)
        at 
org.apache.brooklyn.core.mgmt.internal.EffectorUtils.handleEffectorException(EffectorUtils.java:326)
        at 
org.apache.brooklyn.core.mgmt.internal.EffectorUtils.invokeMethodEffector(EffectorUtils.java:281)
        at 
org.apache.brooklyn.core.effector.MethodEffector.call(MethodEffector.java:148)
        at 
org.apache.brooklyn.core.entity.trait.Startable$StartEffectorBody.call(Startable.java:56)
        at 
org.apache.brooklyn.core.entity.trait.Startable$StartEffectorBody.call(Startable.java:50)
        at 
org.apache.brooklyn.core.effector.EffectorTasks$EffectorBodyTaskFactory$1.call(EffectorTasks.java:82)
        at 
org.apache.brooklyn.util.core.task.DynamicSequentialTask$DstJob.call(DynamicSequentialTask.java:359)
        at 
org.apache.brooklyn.util.core.task.BasicExecutionManager$SubmissionCallable.call(BasicExecutionManager.java:522)
        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)
Caused by: java.util.concurrent.ExecutionException: 
java.lang.IllegalArgumentException: Error resolving config 
cluster.initial.size, 
$brooklyn:entity("kubernetes-cluster").config("kubernetes.master.size"), in 
org.apache.brooklyn.util.core.task.BasicExecutionContext@1f77fbbe([Wrapped[contextEntity:DynamicClusterImpl{id=biagm3ha42}],
 LocalManagementContext[lvMtifon-xhTxtHy5]]): 
org.apache.brooklyn.util.exceptions.PropagatedRuntimeException: 
ConcurrentModificationException
        at 
org.apache.brooklyn.core.mgmt.internal.AbstractManagementContext.invokeEffectorMethodSync(AbstractManagementContext.java:343)
        at 
org.apache.brooklyn.core.mgmt.internal.EffectorUtils.invokeMethodEffector(EffectorUtils.java:276)
        ... 10 more
Caused by: java.lang.IllegalArgumentException: Error resolving config 
cluster.initial.size, 
$brooklyn:entity("kubernetes-cluster").config("kubernetes.master.size"), in 
org.apache.brooklyn.util.core.task.BasicExecutionContext@1f77fbbe([Wrapped[contextEntity:DynamicClusterImpl{id=biagm3ha42}],
 LocalManagementContext[lvMtifon-xhTxtHy5]]): 
org.apache.brooklyn.util.exceptions.PropagatedRuntimeException: 
ConcurrentModificationException
        at 
org.apache.brooklyn.util.core.task.ValueResolver.getMaybeInternal(ValueResolver.java:426)
        at 
org.apache.brooklyn.util.core.task.ValueResolver.getMaybe(ValueResolver.java:267)
        at 
org.apache.brooklyn.util.core.task.ValueResolver.get(ValueResolver.java:260)
        at org.apache.brooklyn.util.core.task.Tasks.resolveValue(Tasks.java:147)
        at 
org.apache.brooklyn.core.config.BasicConfigKey.resolveValue(BasicConfigKey.java:405)
        at 
org.apache.brooklyn.core.config.BasicConfigKey.extractValue(BasicConfigKey.java:390)
        at 
org.apache.brooklyn.core.config.internal.AbstractConfigMapImpl.resolveRawValueFromContainer(AbstractConfigMapImpl.java:308)
        at 
org.apache.brooklyn.core.config.internal.AbstractConfigMapImpl$3.apply(AbstractConfigMapImpl.java:360)
        at 
org.apache.brooklyn.core.config.internal.AbstractConfigMapImpl$3.apply(AbstractConfigMapImpl.java:357)
        at 
org.apache.brooklyn.core.config.internal.AbstractConfigMapImpl.getConfigImpl(AbstractConfigMapImpl.java:372)
        at 
org.apache.brooklyn.core.config.internal.AbstractConfigMapImpl.getConfig(AbstractConfigMapImpl.java:107)
        at 
org.apache.brooklyn.core.objs.AbstractConfigurationSupportInternal.get(AbstractConfigurationSupportInternal.java:169)
        at 
org.apache.brooklyn.core.entity.AbstractEntity.getConfig(AbstractEntity.java:1262)
        at 
org.apache.brooklyn.entity.group.DynamicClusterImpl.getInitialQuorumSize(DynamicClusterImpl.java:364)
        at 
org.apache.brooklyn.entity.group.DynamicClusterImpl.doStart(DynamicClusterImpl.java:414)
        at 
org.apache.brooklyn.entity.group.DynamicClusterImpl.start(DynamicClusterImpl.java:393)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at 
org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
        at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:324)
        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1207)
        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1016)
        at 
groovy.lang.DelegatingMetaClass.invokeMethod(DelegatingMetaClass.java:149)
        at groovy.lang.MetaObjectProtocol$invokeMethod.call(Unknown Source)
        at 
org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
        at groovy.lang.MetaObjectProtocol$invokeMethod.call(Unknown Source)
        at 
org.apache.brooklyn.util.groovy.GroovyJavaMethods.invokeMethodOnMetaClass(GroovyJavaMethods.java:191)
        at 
org.apache.brooklyn.core.mgmt.internal.AbstractManagementContext.invokeEffectorMethodLocal(AbstractManagementContext.java:315)
        at 
org.apache.brooklyn.core.mgmt.internal.AbstractManagementContext.invokeEffectorMethodSync(AbstractManagementContext.java:339)
        ... 11 more
Caused by: org.apache.brooklyn.util.exceptions.PropagatedRuntimeException: 
ConcurrentModificationException
        at 
org.apache.brooklyn.util.exceptions.Exceptions.propagate(Exceptions.java:129)
        at org.apache.brooklyn.util.time.Durations.get(Durations.java:63)
        at org.apache.brooklyn.util.time.Durations.get(Durations.java:68)
        at 
org.apache.brooklyn.util.core.task.ValueResolver.getMaybeInternal(ValueResolver.java:363)
        ... 41 more
Caused by: java.util.concurrent.ExecutionException: 
org.apache.brooklyn.util.exceptions.PropagatedRuntimeException: 
ConcurrentModificationException
        at java.util.concurrent.FutureTask.report(FutureTask.java:122)
        at java.util.concurrent.FutureTask.get(FutureTask.java:192)
        at 
com.google.common.util.concurrent.ForwardingFuture.get(ForwardingFuture.java:63)
        at org.apache.brooklyn.util.core.task.BasicTask.get(BasicTask.java:361)
        at org.apache.brooklyn.util.time.Durations.get(Durations.java:43)
        ... 43 more
Caused by: org.apache.brooklyn.util.exceptions.PropagatedRuntimeException: 
ConcurrentModificationException
        at 
org.apache.brooklyn.util.exceptions.Exceptions.propagate(Exceptions.java:129)
        at 
org.apache.brooklyn.camp.brooklyn.spi.dsl.BrooklynDslDeferredSupplier.get(BrooklynDslDeferredSupplier.java:115)
        at 
org.apache.brooklyn.util.core.task.ValueResolver$2.call(ValueResolver.java:344)
        ... 6 more
Caused by: java.util.concurrent.ExecutionException: 
org.apache.brooklyn.util.exceptions.PropagatedRuntimeException: 
ConcurrentModificationException
        at java.util.concurrent.FutureTask.report(FutureTask.java:122)
        at java.util.concurrent.FutureTask.get(FutureTask.java:192)
        at 
com.google.common.util.concurrent.ForwardingFuture.get(ForwardingFuture.java:63)
        at org.apache.brooklyn.util.core.task.BasicTask.get(BasicTask.java:361)
        at 
org.apache.brooklyn.camp.brooklyn.spi.dsl.BrooklynDslDeferredSupplier.get(BrooklynDslDeferredSupplier.java:113)
        ... 7 more
Caused by: org.apache.brooklyn.util.exceptions.PropagatedRuntimeException: 
ConcurrentModificationException
        at 
org.apache.brooklyn.util.exceptions.Exceptions.propagate(Exceptions.java:129)
        at 
org.apache.brooklyn.camp.brooklyn.spi.dsl.BrooklynDslDeferredSupplier.get(BrooklynDslDeferredSupplier.java:115)
        at 
org.apache.brooklyn.camp.brooklyn.spi.dsl.methods.DslComponent$DslConfigSupplier$1.call(DslComponent.java:315)
        ... 5 more
Caused by: java.util.concurrent.ExecutionException: 
java.util.ConcurrentModificationException
        at java.util.concurrent.FutureTask.report(FutureTask.java:122)
        at java.util.concurrent.FutureTask.get(FutureTask.java:192)
        at 
com.google.common.util.concurrent.ForwardingFuture.get(ForwardingFuture.java:63)
        at org.apache.brooklyn.util.core.task.BasicTask.get(BasicTask.java:361)
        at 
org.apache.brooklyn.camp.brooklyn.spi.dsl.BrooklynDslDeferredSupplier.get(BrooklynDslDeferredSupplier.java:113)
        ... 6 more
Caused by: java.util.ConcurrentModificationException
        at java.util.WeakHashMap$HashIterator.nextEntry(WeakHashMap.java:806)
        at java.util.WeakHashMap$ValueIterator.next(WeakHashMap.java:833)
        at com.google.common.collect.Iterators$5.next(Iterators.java:553)
        at com.google.common.collect.Iterators$7.computeNext(Iterators.java:646)
        at 
com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:143)
        at 
com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:138)
        at 
com.google.common.collect.TransformedIterator.hasNext(TransformedIterator.java:43)
        at com.google.common.collect.ImmutableSet.copyOf(ImmutableSet.java:318)
        at com.google.common.collect.ImmutableSet.copyOf(ImmutableSet.java:300)
        at 
org.apache.brooklyn.core.mgmt.internal.LocalEntityManager.getAllEntitiesInApplication(LocalEntityManager.java:218)
        at 
org.apache.brooklyn.camp.brooklyn.spi.dsl.methods.DslComponent$EntityInScopeFinder.call(DslComponent.java:131)
        at 
org.apache.brooklyn.camp.brooklyn.spi.dsl.methods.DslComponent$EntityInScopeFinder.call(DslComponent.java:100)
        at 
org.apache.brooklyn.util.core.task.DynamicSequentialTask$DstJob.call(DynamicSequentialTask.java:359)
        ... 5 more
{noformat}

> ConcurrentModificationException when using $brooklyn:entity
> -----------------------------------------------------------
>
>                 Key: BROOKLYN-352
>                 URL: https://issues.apache.org/jira/browse/BROOKLYN-352
>             Project: Brooklyn
>          Issue Type: Bug
>            Reporter: Svetoslav Neykov
>
> Got the following exception when running a fairly complex blueprint on a cpu 
> starved machine. Looking at the sources and the javadoc makes sense - we 
> should guard iterating over the entities with a synchronized block.
> From Collections.synchronizedMap:
> {noformat}
>      * It is imperative that the user manually synchronize on the returned
>      * map when iterating over any of its collection views:
> {noformat}
> {noformat}
> Failed after 13ms: Execution failed, invocation error for launching 
> VanillaSoftwareProcessImpl{id=w4ixqlmhdh}: Error resolving config 
> shell.env.KUBERNETES_URL, 
> $brooklyn:entity("kubernetes-master").attributeWhenReady("kubernetes.url"), 
> in 
> org.apache.brooklyn.util.core.task.BasicExecutionContext@1d028d95([Wrapped[contextEntity:VanillaSoftwareProcessImpl{id=w4ixqlmhdh}],
>  LocalManagementContext[i5xdJAZa-yAstcnrg]]): 
> org.apache.brooklyn.util.exceptions.PropagatedRuntimeException: 
> ConcurrentModificationException
> java.lang.IllegalStateException: Execution failed, invocation error for 
> launching VanillaSoftwareProcessImpl{id=w4ixqlmhdh}: Error resolving config 
> shell.env.KUBERNETES_URL, 
> $brooklyn:entity("kubernetes-master").attributeWhenReady("kubernetes.url"), 
> in 
> org.apache.brooklyn.util.core.task.BasicExecutionContext@1d028d95([Wrapped[contextEntity:VanillaSoftwareProcessImpl{id=w4ixqlmhdh}],
>  LocalManagementContext[i5xdJAZa-yAstcnrg]]): 
> org.apache.brooklyn.util.exceptions.PropagatedRuntimeException: 
> ConcurrentModificationException
>       at 
> org.apache.brooklyn.entity.software.base.lifecycle.ScriptHelper.logWithDetailsAndThrow(ScriptHelper.java:387)
>       at 
> org.apache.brooklyn.entity.software.base.lifecycle.ScriptHelper.executeInternal(ScriptHelper.java:370)
>       at 
> org.apache.brooklyn.entity.software.base.lifecycle.ScriptHelper$8.call(ScriptHelper.java:287)
>       at 
> org.apache.brooklyn.entity.software.base.lifecycle.ScriptHelper$8.call(ScriptHelper.java:285)
>       at 
> org.apache.brooklyn.util.core.task.DynamicSequentialTask$DstJob.call(DynamicSequentialTask.java:359)
>       at 
> org.apache.brooklyn.util.core.task.BasicExecutionManager$SubmissionCallable.call(BasicExecutionManager.java:519)
>       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)
> Caused by: java.lang.IllegalArgumentException: Error resolving config 
> shell.env.KUBERNETES_URL, 
> $brooklyn:entity("kubernetes-master").attributeWhenReady("kubernetes.url"), 
> in 
> org.apache.brooklyn.util.core.task.BasicExecutionContext@1d028d95([Wrapped[contextEntity:VanillaSoftwareProcessImpl{id=w4ixqlmhdh}],
>  LocalManagementContext[i5xdJAZa-yAstcnrg]]): 
> org.apache.brooklyn.util.exceptions.PropagatedRuntimeException: 
> ConcurrentModificationException
>       at 
> org.apache.brooklyn.util.core.task.ValueResolver.getMaybeInternal(ValueResolver.java:411)
>       at 
> org.apache.brooklyn.util.core.task.ValueResolver.getMaybe(ValueResolver.java:257)
>       at 
> org.apache.brooklyn.util.core.task.ValueResolver.get(ValueResolver.java:250)
>       at org.apache.brooklyn.util.core.task.Tasks.resolveValue(Tasks.java:147)
>       at 
> org.apache.brooklyn.core.config.BasicConfigKey.resolveValue(BasicConfigKey.java:355)
>       at 
> org.apache.brooklyn.core.config.BasicConfigKey.extractValue(BasicConfigKey.java:340)
>       at 
> org.apache.brooklyn.core.config.SubElementConfigKey.extractValue(SubElementConfigKey.java:48)
>       at 
> org.apache.brooklyn.core.config.internal.AbstractStructuredConfigKey.extractValue(AbstractStructuredConfigKey.java:111)
>       at 
> org.apache.brooklyn.core.config.internal.AbstractStructuredConfigKey.extractValue(AbstractStructuredConfigKey.java:124)
>       at 
> org.apache.brooklyn.core.entity.internal.EntityConfigMap.getConfigImpl(EntityConfigMap.java:139)
>       at 
> org.apache.brooklyn.core.entity.internal.EntityConfigMap.getConfig(EntityConfigMap.java:113)
>       at 
> org.apache.brooklyn.core.config.internal.AbstractConfigMapImpl.getConfig(AbstractConfigMapImpl.java:50)
>       at 
> org.apache.brooklyn.core.entity.AbstractEntity$BasicConfigurationSupport.get(AbstractEntity.java:1213)
>       at 
> org.apache.brooklyn.core.entity.AbstractEntity.getConfig(AbstractEntity.java:1299)
>       at 
> org.apache.brooklyn.entity.software.base.AbstractSoftwareProcessSshDriver.getShellEnvironment(AbstractSoftwareProcessSshDriver.java:348)
>       at 
> org.apache.brooklyn.entity.software.base.VanillaSoftwareProcessSshDriver.getShellEnvironment(VanillaSoftwareProcessSshDriver.java:147)
>       at 
> org.apache.brooklyn.entity.software.base.AbstractSoftwareProcessSshDriver.execute(AbstractSoftwareProcessSshDriver.java:265)
>       at 
> org.apache.brooklyn.entity.software.base.lifecycle.ScriptHelper.executeInternal(ScriptHelper.java:366)
>       ... 8 more
> Caused by: org.apache.brooklyn.util.exceptions.PropagatedRuntimeException: 
> ConcurrentModificationException
>       at 
> org.apache.brooklyn.util.exceptions.Exceptions.propagate(Exceptions.java:129)
>       at org.apache.brooklyn.util.time.Durations.get(Durations.java:63)
>       at org.apache.brooklyn.util.time.Durations.get(Durations.java:68)
>       at 
> org.apache.brooklyn.util.core.task.ValueResolver.getMaybeInternal(ValueResolver.java:348)
>       ... 25 more
> Caused by: java.util.concurrent.ExecutionException: 
> org.apache.brooklyn.util.exceptions.PropagatedRuntimeException: 
> ConcurrentModificationException
>       at java.util.concurrent.FutureTask.report(FutureTask.java:122)
>       at java.util.concurrent.FutureTask.get(FutureTask.java:188)
>       at 
> com.google.common.util.concurrent.ForwardingFuture.get(ForwardingFuture.java:63)
>       at org.apache.brooklyn.util.core.task.BasicTask.get(BasicTask.java:361)
>       at org.apache.brooklyn.util.time.Durations.get(Durations.java:43)
>       ... 27 more
> Caused by: org.apache.brooklyn.util.exceptions.PropagatedRuntimeException: 
> ConcurrentModificationException
>       at 
> org.apache.brooklyn.util.exceptions.Exceptions.propagate(Exceptions.java:129)
>       at 
> org.apache.brooklyn.camp.brooklyn.spi.dsl.BrooklynDslDeferredSupplier.get(BrooklynDslDeferredSupplier.java:136)
>       at 
> org.apache.brooklyn.camp.brooklyn.spi.dsl.methods.DslComponent$AttributeWhenReady.newTask(DslComponent.java:261)
>       at 
> org.apache.brooklyn.camp.brooklyn.spi.dsl.BrooklynDslDeferredSupplier.get(BrooklynDslDeferredSupplier.java:128)
>       at 
> org.apache.brooklyn.util.core.task.ValueResolver$2.call(ValueResolver.java:334)
>       ... 6 more
> Caused by: java.util.concurrent.ExecutionException: 
> java.util.ConcurrentModificationException
>       at java.util.concurrent.FutureTask.report(FutureTask.java:122)
>       at java.util.concurrent.FutureTask.get(FutureTask.java:188)
>       at 
> com.google.common.util.concurrent.ForwardingFuture.get(ForwardingFuture.java:63)
>       at org.apache.brooklyn.util.core.task.BasicTask.get(BasicTask.java:361)
>       at 
> org.apache.brooklyn.camp.brooklyn.spi.dsl.BrooklynDslDeferredSupplier.get(BrooklynDslDeferredSupplier.java:129)
>       ... 9 more
> Caused by: java.util.ConcurrentModificationException
>       at java.util.WeakHashMap$HashIterator.nextEntry(WeakHashMap.java:882)
>       at java.util.WeakHashMap$ValueIterator.next(WeakHashMap.java:909)
>       at com.google.common.collect.Iterators$5.next(Iterators.java:553)
>       at com.google.common.collect.Iterators$7.computeNext(Iterators.java:646)
>       at 
> com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:143)
>       at 
> com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:138)
>       at 
> com.google.common.collect.TransformedIterator.hasNext(TransformedIterator.java:43)
>       at com.google.common.collect.ImmutableSet.copyOf(ImmutableSet.java:314)
>       at com.google.common.collect.ImmutableSet.copyOf(ImmutableSet.java:300)
>       at 
> org.apache.brooklyn.core.mgmt.internal.LocalEntityManager.getAllEntitiesInApplication(LocalEntityManager.java:218)
>       at 
> org.apache.brooklyn.camp.brooklyn.spi.dsl.methods.DslComponent$EntityInScopeFinder.call(DslComponent.java:127)
>       at 
> org.apache.brooklyn.camp.brooklyn.spi.dsl.methods.DslComponent$EntityInScopeFinder.call(DslComponent.java:96)
>       ... 6 more
> {noformat}



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

Reply via email to