Bug 1049498

Summary: [amqp1.0] connection loss is not detected by session sync() call
Product: Red Hat Enterprise MRG Reporter: Petr Matousek <pematous>
Component: qpid-cppAssignee: Gordon Sim <gsim>
Status: CLOSED ERRATA QA Contact: Petr Matousek <pematous>
Severity: high Docs Contact:
Priority: medium    
Version: DevelopmentCC: freznice, gsim, iboverma, jross, lzhaldyb
Target Milestone: 3.0   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: qpid-cpp-0.22-35 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-09-24 15:09:45 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1050867    
Bug Blocks: 1010399    
Attachments:
Description Flags
reproducer none

Description Petr Matousek 2014-01-07 16:05:24 UTC
Description of problem:

When an amqp1.0 client is connected to the broker and the connection is lost, 
session sync call do not raise any exception and seems to be successful. Also connection isOpen() returns wrong connection state. See the attached reproducer for more details.

0-10 client reports exception immediately on sync call. Also the connection isOpen() call reports the proper connection state.

Version-Release number of selected component (if applicable):
qpid-cpp-*-0.22-30.el6

How reproducible:
100%

Steps to Reproduce:
1. start the broker
2. create connection to the broker
3. create session
4. stop the broker
5. call session.sync()
6. sync call seems to be successfully executed, no exception is raised  

ie.
1. service qpidd start
2. ./sync_client --connection-options "{protocol:amqp1.0}"
3. service qpidd stop
4. client continues execution (repeatedly calls the session sync method) even if the connection is lost

Actual results:
connection loss is not detected, sync call do not raise any exception, inappropriate connection state is reported by connection isOpen() call

Expected results:
an exception appears when the connection is lost on session sync call,
connection isOpen() call reports the proper connection state

Additional info:

Comment 1 Petr Matousek 2014-01-07 16:06:04 UTC
Created attachment 846765 [details]
reproducer

Comment 2 Gordon Sim 2014-01-21 18:32:45 UTC
Fix for Session::sync() issue applied upstream: https://svn.apache.org/r1560125

The issue with Connection::isOpen()is fixed by the backports for https://bugzilla.redhat.com/show_bug.cgi?id=1050867.

Note on reproducer, I found that with the Connection.isOpen() test in place I couldn't reproduce the exception from sync(). I tested both protocols with that test in place and with it replaced by 'true'.

Comment 4 Petr Matousek 2014-02-11 12:43:15 UTC
This issue has been fixed. Verified on rhel6.5 (x86_64, i386).

packages under test:
qpid-cpp-*-0.22-35

-> VERIFIED

Comment 5 errata-xmlrpc 2014-09-24 15:09:45 UTC
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.

http://rhn.redhat.com/errata/RHEA-2014-1296.html