On 10/23/2009 02:27 AM, Rajith Attapattu wrote:
Running org.apache.qpid.test.unit.xa.FaultTest.testPrepare()  seems to
cause the C++ broker to send SessionKnownCompletedBody after
SessionDetachBody in some cases.

I think this is an unintended consequence of http://svn.apache.org/viewvc?view=revision&revision=828108, specifically http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/amqp_0_10/SessionHandler.cpp?r1=828108&r2=828107&pathrev=828108

The sending of known-completed is triggered by receiving a session-completed from the client. All session controls are now always invoked where previously they were ignored (apart from session-detached) after a detach was issued.


When the broker sends SessionDetachBody to the java client it removes
the session from it's map.
(Line 361 in Connection.java)

The broker then sends SessionKnownCompletedBody which results in a
NullPointer on the java client side as it tries to dispatch this
method on the session it has just removed.
(Line 318 in Connection.java)

This test seems to pass in some servers, all though it fails for me.
This could be due to a race condition on the broker side inside DtxManager.cpp.
I haven't had time to debug this yet, will do so tomorrow unless
somebody gets to it first.

===================================
BROKER: 2009-10-22 19:14:50 error Execution exception: not-found:
Unrecognised xid \x06\x04\x07
IoReceiver - localhost/127.0.0.1:15672 2009-10-22 19:14:50,537 DEBUG
[apache.qpid.transport.Connection] RECV: [conn:122292a] ch=1
ExecutionException(errorCode=NOT_FOUND, commandId=12, classCode=6,
commandCode=7, fieldIndex=0, description=not-found: Unrecognised xid
^F^D^G, errorInfo={})
BROKER: 2009-10-22 19:14:50 trace SENT [127.0.0.1:44311]: Frame[BEbe;
channel=1; {ExecutionExceptionBody: error-code=404; command-id=12;
class-code=6; command-code=7; field-index=0; description=not-found:
Unrecognised xid \x06\x04\x07; error-info={}; }]
BROKER: 2009-10-22 19:14:50 trace SENT [127.0.0.1:44311]: Frame[BEbe;
channel=1; {SessionDetachBody:
name=66ff0525-3f79-4a81-a231-3454bfd28404; }]
IoReceiver - localhost/127.0.0.1:15672 2009-10-22 19:14:50,537 DEBUG
[apache.qpid.transport.Session] ID: [1] 0
IoReceiver - localhost/127.0.0.1:15672 2009-10-22 19:14:50,537 DEBUG
[apache.qpid.transport.Connection] SEND: [conn:122292a] ch=1
SessionCompleted(commands={}, timelyReply=true)
main 2009-10-22 19:14:50,537 DEBUG [apache.qpid.transport.Session]
ssn:"66ff0525-3f79-4a81-a231-3454bfd28404" waiting for result:
Future(class org.apache.qpid.transport.XaResult)
IoReceiver - localhost/127.0.0.1:15672 2009-10-22 19:14:50,538 DEBUG
[apache.qpid.transport.Connection] FLUSH: [conn:122292a]
IoReceiver - localhost/127.0.0.1:15672 2009-10-22 19:14:50,538 DEBUG
[apache.qpid.transport.Session]
ssn:"66ff0525-3f79-4a81-a231-3454bfd28404" processed([0, 0]) -1 -1
BROKER: 2009-10-22 19:14:50 trace RECV [127.0.0.1:44311]: Frame[BEbe;
channel=1; {SessionCompletedBody: commands={ }; timely-reply=1; }]
IoReceiver - localhost/127.0.0.1:15672 2009-10-22 19:14:50,539 DEBUG
[apache.qpid.transport.Session] {}
BROKER: 2009-10-22 19:14:50 trace SENT [127.0.0.1:44311]: Frame[BEbe;
channel=1; {SessionKnownCompletedBody: commands={ }; }]
IoReceiver - localhost/127.0.0.1:15672 2009-10-22 19:14:50,539 DEBUG
[apache.qpid.transport.Connection] RECV: [conn:122292a] ch=1
SessionDetach(name...@479662)

====================================


Regards,

Rajith Attapattu
Red Hat
http://rajith.2rlabs.com/

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



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

Reply via email to