[ 
https://issues.apache.org/jira/browse/QPID-3042?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Rajith Attapattu resolved QPID-3042.
------------------------------------

       Resolution: Fixed
    Fix Version/s:     (was: Future)
                   0.10

Tested as part of QPID-2994
There is a test harness under the testkit module to test transactions during 
failover which should adequately cover this issue.

> Session.attach could be sent before the connection is open.
> -----------------------------------------------------------
>
>                 Key: QPID-3042
>                 URL: https://issues.apache.org/jira/browse/QPID-3042
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Client
>    Affects Versions: 0.6, 0.7, 0.8
>            Reporter: Rajith Attapattu
>            Assignee: Rajith Attapattu
>             Fix For: 0.10
>
>
> This bug was discovered while investigating QPID-2994
> This bug also caused QPID-3033
> There exist a race condition where an application could create a new session 
> (recreating due to an exception or a completely new session in the midst of 
> failover) before the connection is open.
> This results in session attach being sent before the connection negotiation 
> is completed. All though the connect method and the createSession method in 
> Connection.java contends for the same lock, the connect method which acquires 
> it early, will releases the lock when it waits (until the connection achieves 
> OPEN state) and the createSession method waiting on the lock will get it and 
> continue.
> Usually this only becomes an issue during failover, as during the initial 
> connection creation, the application thread that creates the connection will 
> wait until the connect method returns before it creates a session.
> However If an application tries to create a connection in one thread and 
> several other threads try to create sessions from that connection, and if 
> those threads don't coordinate properly to check if the connection is opened, 
> then this same race condition is present.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:[email protected]

Reply via email to