+++ This bug was initially created as a clone of Bug #1093019 +++ Description of problem: The session detach is not detected by the client application. An exception shall be thrown when the session is detached by peer. The application is naturally not able to send/receive messages after the session was detached. Version-Release number of selected component (if applicable): qpid-cpp-*-0.22-38 How reproducible: 100% Steps to Reproduce: 1. drain -f amq.direct 2. detach the session used by the drain (ie. using qpid-tool) qpid-tool> call <session_id> detach 3. the drain program does not exit, but it's unable to receive messages anymore Actual results: The session detach is not detected. Expected results: The drain program exits with an exception ie: 'not-attached/Session ended by peer' Additional info: # ./drain -f amq.direct # ./spout amq.direct Message(properties={u'spout-id': u'0e97cb4e-8230-446c-a5c5-b48790e98fab:0'}, content_type=u'text/plain') <OK - message received by the drain application> # qpid-tool Management Tool for QPID qpid: list session Object Summary: ID Created Destroyed Index ========================================================================= 134 12:24:08 - 145.97aa9eaf-14dc-4f13-97e5-74d8f571765d:0 135 12:25:57 - 145.dhcp-lab-110.englab.brq.redhat.com.3780.1 qpid: call 134 detach qpid: OK (0) - {} qpid: quit Exiting... <the drain program is still running> # ./spout amq.direct <Message not received by the drain application> --- C++ 0-10 client: # drain -f amq.direct Error: not-attached: Session anonymous.3c8acd3b-9f55-4fa0-b89c-862df621361a isn't attached (/builddir/build/BUILD/qpid-0.22/cpp/src/qpid/client/SessionImpl.cpp:673) terminate called after throwing an instance of 'qpid::messaging::MessagingException' C++ 1.0 client: # ./drain -f --connection-options "{protocol:'amqp1.0'}" amq.direct Error: Session ended by peer
For Qpid C++ amqp0-10 client: There was a MessagingException thrown on previous releases after the session was detached. Currently the MessagingException is not thrown anymore and the client behaves like the Qpid Python client (no exception/unresponsive, please see above). So, this is a regression. There is no change in amqp1.0 path (detaching session still leads to Error: Session ended by peer)
Fixed upstream by https://svn.apache.org/r1656928
(In reply to Gordon Sim from comment #2) > Fixed upstream by https://svn.apache.org/r1656928 An intermittent issue with this fix was discovered in a particular case. A new approach has been taken in: https://svn.apache.org/r1657321
Affected packages: qpid-cpp-*-0.30-6
This issue has been fixed. Proper exception is reported (not-attached). Verified on rhel6.6 (i686, x86_64) and rhel7.1 (x86_64). Packages: qpid-cpp-*-0.30-7 -> VERIFIED
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHEA-2015-0805.html