Bug 574571
| Summary: | Python messaging client unusable after receiving a malformed message | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise MRG | Reporter: | Ted Ross <tross> | ||||||||||
| Component: | python-qpid | Assignee: | Ernie <eallen> | ||||||||||
| Status: | CLOSED ERRATA | QA Contact: | mick <mgoulish> | ||||||||||
| Severity: | high | Docs Contact: | |||||||||||
| Priority: | high | ||||||||||||
| Version: | Development | CC: | gsim, jross, lzhaldyb, mgoulish, mtoth, tross | ||||||||||
| Target Milestone: | 3.0 | Keywords: | Patch, TestCaseProvided | ||||||||||
| Target Release: | --- | ||||||||||||
| Hardware: | All | ||||||||||||
| OS: | Linux | ||||||||||||
| Whiteboard: | |||||||||||||
| Fixed In Version: | python-qpid-0.22-3.el6, python-qpid-0.22-2.el5 | Doc Type: | Bug Fix | ||||||||||
| Doc Text: |
It was discovered that setting the content-type of a message to `amqp/map` when the content is not a map created an exception. All further operations on the session or connections raised the original exception, which rendered the API unusable at that point. The fix ensures the original encoding exception is not raised again after it has been passed back to the calling application. A mismatched content type will still raise an exception, but will not prevent further operations.
|
Story Points: | --- | ||||||||||
| Clone Of: | Environment: | ||||||||||||
| Last Closed: | 2014-09-24 15:01:46 UTC | Type: | --- | ||||||||||
| Regression: | --- | Mount Type: | --- | ||||||||||
| Documentation: | --- | CRM: | |||||||||||
| Verified Versions: | Category: | --- | |||||||||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||||||||
| Embargoed: | |||||||||||||
| Attachments: |
|
||||||||||||
|
Description
Ted Ross
2010-03-17 20:40:05 UTC
Another, simpler way to reproduce this is to create the message with an unknown content-type (i.e. amqp/list1). This will also cause the receiving script to throw the never-clearing exception. Upstream at https://issues.apache.org/jira/browse/QPID-2453 Upstream jira does not indicate any fix. -> ASSIGNED Created attachment 679756 [details] Test that exposes bug The cases in the bz description and comment 1 don't cause this bug anymore. However, using content type of "ampq/map" with string content will throw an exception when attempting to send the message. After which all subsequent commands fail with the original exception returned. Created attachment 685286 [details]
Capture encode and decode exceptions
Fix only addresses encode and decode exceptions. It returns the exception to the app. Other exceptions are handled the same way they were: they block all operations on the connection.
Created attachment 686001 [details]
Add python tests
Adds tests to ensure operations can continue after receiving an encode/decode exception.
Created attachment 737691 [details]
Renamed exception to ContentError
I'm working on verifying this one, subject to approval by Leonid. Important step before attempting repro: qpid-config add queue q-4-574571 repro successful using broker built from svn version 1471157 no repro (reproducer finishes happy) using installed packages from Vienna RC5. I would call this one verified, except I have not yet learned all proper QE mechanisms / conventions. Verified after testing on { 32-bit , 64-bit } x { RHEL 5.9 , RHEL 6.4 }
packages
{
RHEL 5.9
{
cyrus-sasl-2.1.22-7.el5_8.1
cyrus-sasl-devel-2.1.22-7.el5_8.1
cyrus-sasl-lib-2.1.22-7.el5_8.1
cyrus-sasl-plain-2.1.22-7.el5_8.1
python-qpid-0.22-4.el5
python-qpid-qmf-0.22-5.el5
python-saslwrapper-0.22-2.el5
qpid-cpp-client-0.22-6.el5
qpid-cpp-client-devel-0.22-6.el5
qpid-cpp-server-0.22-6.el5
qpid-java-client-0.22-2.el5
qpid-java-common-0.22-2.el5
qpid-java-example-0.22-2.el5
qpid-proton-c-0.4-2.2.el5
qpid-qmf-0.22-5.el5
qpid-tools-0.22-2.el5
saslwrapper-0.22-2.el5
}
RHEL 6.4
{
cyrus-sasl-2.1.23-13.el6_3.1
cyrus-sasl-devel-2.1.23-13.el6_3.1
cyrus-sasl-gssapi-2.1.23-13.el6_3.1
cyrus-sasl-lib-2.1.23-13.el6_3.1
cyrus-sasl-md5-2.1.23-13.el6_3.1
cyrus-sasl-plain-2.1.23-13.el6_3.1
python-qpid-0.22-4.el6.noarch
python-qpid-qmf-0.22-5.el6
python-saslwrapper-0.22-3.el6
qpid-cpp-client-0.22-6.el6
qpid-cpp-client-devel-0.22-6.el6
qpid-cpp-server-0.22-6.el6
qpid-proton-c-0.4-2.2.el6
qpid-proton-c-devel-0.4-2.2.el6
qpid-qmf-0.22-5.el6
qpid-tools-0.22-3.el6.noarch
saslwrapper-0.22-3.el6
}
}
tcms test case number: 261360 The python tests that were added are: testExceptionRaisedMismatchedContentType , and testRecoverAfterException 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 |