Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Concurrent mod exception when starting mod-shell #19

Open
dzonekl opened this issue Mar 31, 2015 · 0 comments
Open

Concurrent mod exception when starting mod-shell #19

dzonekl opened this issue Mar 31, 2015 · 0 comments

Comments

@dzonekl
Copy link

dzonekl commented Mar 31, 2015

Hi,

I am trying to deploy mod-shell , but I get an exception [2].

It seems, the PluginLifeCycle is iterating over the PropertyDescriptor map, while it's still being populated.

We have our own module starter which looks like [1]

Any ideas?

[1] It picks the config for crashbusmod, and then deploys the module on the container.

private CompletableFuture<Void> deployModule(JsonObject modConfig) {
    final String modName = modConfig.getField("name");
    final JsonObject config = modConfig.getField("config");
    CompletableFuture<Void> future = new CompletableFuture<>();
    container.deployModule(modName, config, result -> {
        if (result.failed()) {
            LOG.error("Starting module " + modName + " failed.", result.cause());
            future.completeExceptionally(result.cause());
        } else {
            LOG.info("Module {} started successfully.", modName);
            future.complete(null);
        }
    });
    return future;
}

[2]
java.lang.RuntimeException: Could not start mod
at org.vertx.mods.CRaSHBusMod.start(CRaSHBusMod.java:46) ~[na:na]
at org.vertx.java.platform.Verticle.start(Verticle.java:82) ~[vertx-platform-2.1.5.jar:na]
at org.vertx.java.platform.impl.DefaultPlatformManager$21.run(DefaultPlatformManager.java:1758) ~[vertx-platform-2.1.5.jar:na]
at org.vertx.java.core.impl.DefaultContext$3.run(DefaultContext.java:175) [vertx-core-2.1.5.jar:na]
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:370) [netty-all-4.0.21.Final.jar:4.0.21.Final]
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:357) [netty-all-4.0.21.Final.jar:4.0.21.Final]
at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:116) [netty-all-4.0.21.Final.jar:4.0.21.Final]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_25]
Caused by: java.util.ConcurrentModificationException: null
at java.util.HashMap$HashIterator.nextNode(HashMap.java:1429) ~[na:1.8.0_25]
at java.util.HashMap$ValueIterator.next(HashMap.java:1458) ~[na:1.8.0_25]
at java.util.Collections$UnmodifiableCollection$1.next(Collections.java:1042) ~[na:1.8.0_25]
at org.crsh.plugin.PluginLifeCycle.start(PluginLifeCycle.java:84) ~[na:na]
at org.vertx.mods.VertxPluginLifeCycle.start(VertxPluginLifeCycle.java:83) ~[na:na]
at org.vertx.mods.CRaSHBusMod.start(CRaSHBusMod.java:24) ~[na:na]
... 7 common frames omitted

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant