vert-x3 / vertx-mqtt

Vert.x MQTT
Apache License 2.0
186 stars 89 forks source link

"Uh oh! Event loop context executing with wrong thread!" #67

Open ctron opened 7 years ago

ctron commented 7 years ago

Under some conditions (connections breaking up with multiple clients) I do receive the following log messages:

10:21:41.572 [globalEventExecutor-1-7] WARN  i.n.util.concurrent.DefaultPromise - An exception was thrown by io.vertx.core.net.impl.ChannelProvider$$Lambda$152/1354547765.operationComplete()
java.lang.IllegalStateException: Uh oh! Event loop context executing with wrong thread! Expected null got Thread[globalEventExecutor-1-7,5,main]
    at io.vertx.core.impl.ContextImpl.lambda$wrapTask$2(ContextImpl.java:323)
    at io.vertx.core.impl.ContextImpl.executeFromIO(ContextImpl.java:200)
    at io.vertx.core.net.impl.NetClientImpl.failed(NetClientImpl.java:269)
    at io.vertx.core.net.impl.NetClientImpl.lambda$doConnect$7(NetClientImpl.java:230)
    at io.vertx.core.net.impl.ChannelProvider.lambda$connect$0(ChannelProvider.java:43)
    at io.netty.util.concurrent.DefaultPromise.notifyListener0(DefaultPromise.java:507)
    at io.netty.util.concurrent.DefaultPromise.notifyListenersNow(DefaultPromise.java:481)
    at io.netty.util.concurrent.DefaultPromise.access$000(DefaultPromise.java:34)
    at io.netty.util.concurrent.DefaultPromise$1.run(DefaultPromise.java:431)
    at io.netty.util.concurrent.GlobalEventExecutor$TaskRunner.run(GlobalEventExecutor.java:233)
    at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:138)
    at java.lang.Thread.run(Thread.java:748)
Sammers21 commented 7 years ago

Hi @ctron , do you have a reproducer? It would helps

vietj commented 7 years ago

@ctron are you sharing a client or an mqtt connection between verticles ?

vietj commented 7 years ago

a reproducer would be welcome indeed

ctron commented 7 years ago

Sorry, I don't have a real reproducer. I do use around 100 MqttClient instances towards an MQTT server.

I will try to create one. The issue manifested when I started to connect with 100 instances towards an MQTT server which couldn't handle the load and rejected connection attempts.

vietj commented 6 years ago

any news about this ?

ctron commented 6 years ago

No from my side. I didn't find any time to create a usable reproducer focusing on this error. But it still happens to me when the MQTT server of my demo is gone.

vietj commented 6 years ago

can you share this demo ?

ppatierno commented 6 years ago

even if the complete demo, is it possible to extract and isolate the main part and making it runnable against an MQTT server ?

vietj commented 6 years ago

lol, no

ctron commented 6 years ago

@ppatierno I will need to make a new test publisher this week anyway, I will try to make this a reproducer for this issue as well.

ppatierno commented 6 years ago

@ctron it would be really helpful ! Thanks !

vietj commented 6 years ago

@ctron can you share your client configuration that might help to figure out

vietj commented 6 years ago

@ctron I haven't heard back from you and I would really like to investigate this issue