Since the removal of Mina from the transport layer, we've been seeing sporadic failures from the java-mms-spawn.0-9-1 profile on an old slow CI server.
Tests are failing with the following exception whilst the client is attempting to negotiate downwards from 0-10 to 0-9-1 protocol during connection:
main 2011-09-21 14:27:09,139 INFO [apache.qpid.client.AMQConnection] Unable to connect to broker at tcp:org.apache.qpid.AMQException: Cannot connect to broker: connect() aborted [error code 200: reply success]
Analysis has shown that when the problem occurs, the broker tries to write the highest supported protocol version number to the wire, but these bytes never make it to the wire (see MultiVersionProtocolEngine#received() lines 409-414). The reason for this is a race condition: there is an unlucky timing where the broker may begin responding to incoming frames before it has started the IoSender thread.