Connection to KMS hangs

61 views
Skip to first unread message

David Robison

unread,
Jul 5, 2017, 2:51:11 PM7/5/17
to kurento
It appears that I have some threads that are hanging trying to connect to KMS. The thread stack dump is:

Thread 11186: (state = BLOCKED)
 
- java.lang.Object.wait(long) @bci=0 (Compiled frame; information may be imprecise)
 
- java.lang.Object.wait() @bci=2, line=502 (Compiled frame)
 
- io.netty.util.concurrent.DefaultPromise.await() @bci=47, line=239 (Interpreted frame)
 
- io.netty.channel.DefaultChannelPromise.await() @bci=1, line=129 (Interpreted frame)
 
- io.netty.channel.DefaultChannelPromise.await() @bci=1, line=28 (Interpreted frame)
 
- io.netty.util.concurrent.DefaultPromise.sync() @bci=1, line=340 (Interpreted frame)
 
- io.netty.channel.DefaultChannelPromise.sync() @bci=1, line=117 (Interpreted frame)
 
- io.netty.channel.DefaultChannelPromise.sync() @bci=1, line=28 (Interpreted frame)
 
- org.kurento.jsonrpc.client.JsonRpcClientNettyWebSocket.connectNativeClient() @bci=444, line=254 (Interpreted frame)
 
- org.kurento.jsonrpc.client.AbstractJsonRpcClientWebSocket.internalConnectIfNecessary() @bci=54, line=710 (Compiled frame)
 
- org.kurento.jsonrpc.client.AbstractJsonRpcClientWebSocket.connectIfNecessary() @bci=10, line=846 (Compiled frame)
 
- org.kurento.jsonrpc.client.AbstractJsonRpcClientWebSocket.connect() @bci=6, line=677 (Interpreted frame)
 
- org.kurento.client.KurentoClient.<init>(org.kurento.jsonrpc.client.JsonRpcClient) @bci=92, line=245 (Interpreted frame)
 
- org.kurento.client.KurentoClient.create(java.lang.String, org.kurento.client.Properties, org.kurento.client.Handler, org.kurento.client.Handler, org.kurento.client.Handler, org.kurento.client.Handler, org.kurento.client.ReconnectedHandler, java.lang.Long, java.lang.Long) @bci=178, line=226 (Interpreted frame)
 
- org.kurento.client.KurentoClientBuilder.connect() @bci=36, line=67 (Interpreted frame)

Specifically, in the JsonRpcClientNettyWebSocket connectNativeClient function, the function calls sync() on the handshake handler:

channel = b.connect(host, port).sync().channel();
handler
.handshakeFuture().sync();

I'm wondering if there is no reason to use await() instead of sync:

channel = b.connect(host, port).sync().channel();
if (!handler.handshakeFuture().await(this.connectionTimeout)) throw new WebSocketHandshakeException("Timeout");

Thoughts?

David Robison

unread,
Jul 6, 2017, 9:26:48 AM7/6/17
to kurento
I've submitted a pull request that fixes this issue. It is in the kurento-java project. David
Reply all
Reply to author
Forward
0 new messages