In testing a simple network consisting of two brokers with JDBC persistence stores, each broker with an ssl broker to broker transport and a half-duplex network connector to the other node, we found that if we force both brokers to lose their lock while under a load (for example by shutting down the RDBMS feeding both broker nodes), we can get a deadlock on the transport with both sides trying to write to the other and the SSLSocketImpl holding one lock and trying to get a lock to write a close_notify. This deadlock persists until the brokers are forcibly shut down with warnings in the log on one side like:
07:44:06,477 | INFO | erService[amq01] | TransportConnection | 162 - org.apache.activemq.activemq-osgi - 5.11.0.redhat-630310-03 | The connection to 'tcp://xx.xxx.xxx.165:46870' is taking a long time to shutdown.
and on the other side, like:
10:18:06,877 | ERROR | [amq04] Task-772 | TransportConnector | 162 - org.apache.activemq.activemq-osgi - 5.11.0.redhat-630310-03 | Could not accept connection from tcp://xx.xxx.xxx.228:40754: org.apache.activemq.broker.BrokerStoppedException: Broker BrokerService[amq04] is being stopped