"Result is already complete: succeeded" while undeploying a SyncVerticle

762 views
Skip to first unread message

Ronald van Raaphorst

unread,
Nov 10, 2016, 6:34:38 AM11/10/16
to vert.x
Hi all,

I'm upgrading my application from 3.2.1 to 3.3.3 and while undeploying verticles in my tests, I get the "Result is already complete: succeeded" exception:

SEVERE: Unhandled exception
java.lang.IllegalStateException: Result is already complete: succeeded
at io.vertx.core.impl.FutureImpl.checkComplete(FutureImpl.java:164)
at io.vertx.core.impl.FutureImpl.complete(FutureImpl.java:108)
at io.vertx.core.impl.FutureImpl.handle(FutureImpl.java:135)
at io.vertx.core.impl.FutureImpl.handle(FutureImpl.java:23)
at io.vertx.core.eventbus.impl.EventBusImpl.lambda$callCompletionHandlerAsync$2(EventBusImpl.java:340)
at io.vertx.core.impl.ContextImpl.lambda$wrapTask$2(ContextImpl.java:316)
at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163)
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:418)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:440)
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:873)
at java.lang.Thread.run(Thread.java:745)


I believe this is the same exception as described (and solved?) here: https://groups.google.com/d/msg/vertx/0aR54K-_RBg/fUaLUgFa1IwJ

In my case, My verticles derive from a SyncVerticle, and the SyncVerticle's stop method is:

@Override
public void stop(Future<Void> stopFuture) throws Exception {
new Fiber<Void>(instanceScheduler, () -> {
try {
SyncVerticle.this.stop();
stopFuture.complete(); // <!-- Error occurs here
} catch (Throwable t) {
stopFuture.fail(t);
} finally {
Sync.removeContextScheduler();
}
}).start();
}


The inheritance hierarchy is normal: MyVerticle inherits from io.vertx.ext.sync.SyncVerticle inherits from io.vertx.code.AbstractVerticle
MyVerticle just overrides the stop() method, not the stop(Future<Void> stopFuture) method. MyVerticle does not touch the stopFuture future.

For now, the exception is harmless and the tests doe work, but it'be nice to have the exception removed.
Am I missing something?

Ronald

Dan O'Reilly

unread,
Nov 11, 2016, 12:21:07 PM11/11/16
to vert.x
I saw similar behavior when I upgraded. I ended tracking it down to a bug in Vert.x core, which I then found had already been fixed in the master branch. I don't have an issue number or the commit that actually fixes it, though.

--
You received this message because you are subscribed to the Google Groups "vert.x" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vertx+un...@googlegroups.com.
Visit this group at https://groups.google.com/group/vertx.
To view this discussion on the web, visit https://groups.google.com/d/msgid/vertx/dba27bff-0b60-4d59-baf9-90413e9b454b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ronald Raaphorst

unread,
Nov 11, 2016, 12:23:54 PM11/11/16
to ve...@googlegroups.com

Thanks. Good to know it should be fixed anytime soon. I'll see if I can checkout the master branch and test it.


Op 11 nov. 2016 6:21 p.m. schreef "Dan O'Reilly" <orei...@gmail.com>:
To unsubscribe from this group and stop receiving emails from it, send an email to vertx+unsubscribe@googlegroups.com.

--
You received this message because you are subscribed to a topic in the Google Groups "vert.x" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/vertx/FwgdkMoeiD0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to vertx+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages