Bug 1093019 - Session detach is not detected by the client application
Summary: Session detach is not detected by the client application
Keywords:
Status: NEW
Alias: None
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: python-qpid
Version: Development
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: messaging-bugs
QA Contact: Messaging QE
URL:
Whiteboard:
Depends On:
Blocks: 1094177 1187636
TreeView+ depends on / blocked
 
Reported: 2014-04-30 12:37 UTC by Petr Matousek
Modified: 2021-11-14 22:29 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1094177 1187636 (view as bug list)
Environment:
Last Closed:
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Petr Matousek 2014-04-30 12:37:41 UTC
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

Comment 1 Petr Matousek 2015-02-27 13:23:48 UTC
Affected component correction:
this issue was discovered on python-qpid-0.22-14 and still persist on python-qpid-0.22-19


Note You need to log in before you can comment on or make changes to this bug.