Bug 1026354

Summary: python client does not throw correct exception when exceed size of qpid.paging page
Product: Red Hat Enterprise MRG Reporter: Zdenek Kraus <zkraus>
Component: qpid-cppAssignee: Gordon Sim <gsim>
Status: CLOSED CURRENTRELEASE QA Contact: Eric Sammons <esammons>
Severity: low Docs Contact:
Priority: low    
Version: 3.0CC: esammons, gsim, iboverma, jross, pematous
Target Milestone: 3.0   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: qpid-cpp-0.22-25.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-01-21 12:55:41 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:

Description Zdenek Kraus 2013-11-04 13:47:14 UTC
Description of problem:
When using the qpid.paging feature and python sends a message larger than size of page then only 'qpid.messaging.exceptions.ConnectionError: connection aborted' is thrown on session.sync(). But there should be exception on client for exceeding the page size.

Version-Release number of selected component (if applicable):
python-qpid-0.22-5

How reproducible:
100%

Steps to Reproduce:
1. ./drain  "test_qpid_paging_reject_oversized;{'node': {'x-declare': {'arguments': {'qpid.flow_stop_count': 0, 'qpid.page_factor': 1, 'qpid.flow_resume_count': 0, 'qpid.flow_stop_size': 0, 'qpid.paging': True, 'qpid.max_pages_loaded': 32, 'qpid.flow_resume_size': 0}}}, 'create': 'always'}"

2. ./spout "test_qpid_paging_reject_oversized" "<CONTENT LARGER THAN 4kB>"


Actual results:
Traceback (most recent call last):
  File "/var/dtests/node_data/clients/spout.py", line 115, in <module>
    snd.send(msg)
  File "<string>", line 6, in send
  File "/usr/lib/python2.6/site-packages/qpid/messaging/endpoints.py", line 888, in send
    self.sync(timeout=timeout)
  File "<string>", line 6, in sync
  File "/usr/lib/python2.6/site-packages/qpid/messaging/endpoints.py", line 900, in sync
    if not self._ewait(lambda: self.acked >= mno, timeout=timeout):
  File "/usr/lib/python2.6/site-packages/qpid/messaging/endpoints.py", line 813, in _ewait
    result = self.session._ewait(lambda: self.error or predicate(), timeout)
  File "/usr/lib/python2.6/site-packages/qpid/messaging/endpoints.py", line 580, in _ewait
    result = self.connection._ewait(lambda: self.error or predicate(), timeout)
  File "/usr/lib/python2.6/site-packages/qpid/messaging/endpoints.py", line 219, in _ewait
    self.check_error()
  File "/usr/lib/python2.6/site-packages/qpid/messaging/endpoints.py", line 212, in check_error
    raise e
qpid.messaging.exceptions.ConnectionError: connection aborted


Expected results:
## excpetion from C++, so something simmilar:
2013-11-04 14:18:59 [Client] warning Broker closed connection: 501, Message is larger than page size for queue backed by /var/lib/qpidd/test_qpid_paging_reject_oversized (/builddir/build/BUILD/qpid-0.22/cpp/src/qpid/broker/PagedQueue.cpp:106)
  framing-error: Message is larger than page size for queue backed by /var/lib/qpidd/test_qpid_paging_reject_oversized (/builddir/build/BUILD/qpid-0.22/cpp/src/qpid/broker/PagedQueue.cpp:106) at /usr/lib64/perl5/vendor_perl/qpid/messaging/Session.pm line 204.


Additional info:

Comment 1 Gordon Sim 2013-11-04 16:15:06 UTC
This is a broker bug, as the broker closes the connection with this error rather than raising a session exception (over 0-10) or closing the link (1.0).

Comment 2 Gordon Sim 2013-11-04 17:08:18 UTC
Fixed upstream: https://svn.apache.org/r1538684