Hi, I get the following exception when doing a connect. What could be cause of this?
java.lang.IllegalStateException: await*() in I/O thread causes a dead lock or sudden performance drop. Use addListener() instead or call await*() from a different thread.Hi, I get the following exception when doing a connect. What could be cause of this?
--
-- --
You received this message because you are subscribed to the C&P "Stardog" group.
To post to this group, send email to sta...@clarkparsia.com
To unsubscribe from this group, send email to
stardog+u...@clarkparsia.com
For more options, visit this group at
http://groups.google.com/a/clarkparsia.com/group/stardog?hl=en
I actually think I know what this is. I ran into this in my own system while connection to Stardog. The issue is a check performed by the Netty pipeline. In my case I had:HTTP Request -> Netty (my pipeline) -> my code -> Stardog client -> Netty (Stardog pipeline) -> SNARL protocolThe issue is that Netty thinks you are calling the await() method to wait for more data, however, this will cause deadlock since you are blocking the I/O thread while waiting. However, in my case, this isn't what I was doing since the two Netty pipelines are distinct and separate. The way I resolved it is by essentially introducing a "request handler" that would handle the request on a separate thread pool, making sure Netty saw two distinct threads accessing the pipelines instead of one.
No. In fact, I don't think it would happen with the embedded server. Personally, I have switched away from using Stardog in embedded mode.This issue here is that the client connection code uses Netty. If the code calling the Stardog client libs additionally uses Netty to receive requests then you have a double Netty pipeline.
I have a deeper stack trace here that could explain what is going on, as you can see there are calls to netty from Stardog and from Vert-x on the same stack:
Ok, clear. So this means that the Stardog client can not be used in the same thread when the calling thread is responding to a netty event itself right?