Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
0.22
-
None
Description
I have run the java systests with the JCarder agent attached. JCarder detected a potential deadlock when the following are done concurrently:
- Application thread closes a connection
- A MessageListener creates a new session on that connection inside onMessage().
Here is a sketch of the wrongly-ordered locking:
Thread "main" AMQConnection.close() AMQConnection.doClose() lock AMQConnection._sessionCreationLock lock AMQSession.getMessageDeliveryLock() Thread "Dispatcher-1-Conn-780" AMQSession$Dispatcher.dispatchMessage() lock AMQSession.this._messageDeliveryLock myMessageListener.onMessage() AMQConnection.createSession() lock AMQConnection._sessionCreationLock
I've attached JCarder's GraphViz-format .dot file which represents this slightly more comprehensively.