[rabbitmq-discuss] Java client blocked when opening channel

Jiri Krutil jiri at krutil.com
Wed Feb 23 09:56:38 GMT 2011


We have experienced a strange problem that we did not see before.

One of our threads got stuck inside AMQConnection.createChannel() and  
would not return. The thread dump shows this:

at java/lang/Object.wait(Native Method) at  
java/lang/Object.wait(Object.java:199(Compiled Code)) at  
com/rabbitmq/utility/BlockingCell.get(BlockingCell.java:64) at  
com/rabbitmq/utility/BlockingCell.uninterruptibleGet(BlockingCell.java:103) at  
com/rabbitmq/utility/BlockingValueOrException.uninterruptibleGetValue(BlockingValueOrException.java:47) at com/rabbitmq/client/impl/AMQChannel$BlockingRpcContinuation.getReply(AMQChannel.java:342) at com/rabbitmq/client/impl/AMQChannel.rpc(AMQChannel.java:215) at com/rabbitmq/client/impl/AMQChannel.exnWrappingRpc(AMQChannel.java:139) at com/rabbitmq/client/impl/ChannelN.open(ChannelN.java:125) at com/rabbitmq/client/impl/ChannelManager.createChannelInternal(ChannelManager.java:121) at com/rabbitmq/client/impl/ChannelManager.createChannel(ChannelManager.java:100) at  
com/rabbitmq/client/impl/AMQConnection.createChannel(AMQConnection.java:382)
... our code here ...

This blocked all the other threads that tried to open a channel. Some  
of these threads got stuck in AMQConnection.createChannel(), others in  
ChannelManager.createChannel(). All of them seemed to be waiting for  
the same ChannelManager lock.

The same scenario occurs in three consecutive thread dumps we have  
taken with 2 minute delays. The application would not recover for a  
long time, so we had to restart it.

We are running RabbitMQ 2.1.0 (both server and Java client).

Any ideas?



More information about the rabbitmq-discuss mailing list