You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Robert Greig (JIRA)" <qp...@incubator.apache.org> on 2007/01/29 12:25:49 UTC
[jira] Resolved: (QPID-313) [Race Condition] Call to attainState in
makeBrokerConnection can miss the notification of state change.
[ https://issues.apache.org/jira/browse/QPID-313?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Robert Greig resolved QPID-313.
-------------------------------
Resolution: Fixed
Fix Version/s: M2
Patch applied svn revision 501011
> [Race Condition] Call to attainState in makeBrokerConnection can miss the notification of state change.
> -------------------------------------------------------------------------------------------------------
>
> Key: QPID-313
> URL: https://issues.apache.org/jira/browse/QPID-313
> Project: Qpid
> Issue Type: Bug
> Components: Java Client
> Reporter: Martin Ritchie
> Priority: Blocker
> Fix For: M2
>
> Attachments: QPID-313.patch
>
>
> in AMQConnection()
> TransportConnection.getInstance(brokerDetail).connect(_protocolHandler, brokerDetail);
> // this blocks until the connection has been set up or when an error
> // has prevented the connection being set up
> _protocolHandler.attainState(AMQState.CONNECTION_OPEN);
> _failoverPolicy.attainedConnection();
> This is the only use of attainState in the code. Problem is that the connect can occur and proceed without locking on the state to attain.
> Possible issue in AMQStateManager... attainState() [again only call to this is the above code]
> The _currentState is checked inside synchronized (_stateListener) block. However _currentState is modifed in the changeState method OUTSIDE of the synchronized (_stateListener) block. Doing the change in side the block should ensure that the attainState waiter is setup correctly.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.