[rabbitmq-discuss] Rabbitmq 2.5-2.6.1 java hanging on close of connection

Simon MacMullen simon at rabbitmq.com
Mon Nov 14 18:32:02 GMT 2011


On 14/11/11 16:15, Benjamin Bennett wrote:
> Here is report from  rabbitmqctrl report
> http://pastebin.com/MSwv82C3

Ah, thank you. After some poking, that genuinely looks like a server 
bug. Damn.

In order for it to happen you need the last channel close / close_ok to 
overlap with the connection close / close_ok. With the Java client you 
have to invoke Channel.close() and Connection.close() from different 
threads to get this to happen, and still be unlucky.

You should be allowed to do this, but right now it's racy.

 > I was going to attempt to put a timeout on the connection close method
 > but that really would be a hack.

Indeed! Other slightly less hacky workarounds until we get this fixed:

* Invoke Channel.close() and Connection.close() from the same thread, or 
otherwise ensure they don't overlap.

* Don't invoke Channel.close() if you know you're going to invoke 
Connection.close() anyway.

Cheers, Simon

-- 
Simon MacMullen
RabbitMQ, VMware


More information about the rabbitmq-discuss mailing list