Bug 876664 - Some change in exception handling
Summary: Some change in exception handling
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: qpid-cpp
Version: Development
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: 2.3
: ---
Assignee: Chuck Rolke
QA Contact: Petr Matousek
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-11-14 16:52 UTC by Petr Matousek
Modified: 2013-03-06 18:52 UTC (History)
4 users (show)

Fixed In Version: qpid-cpp-0.18-10
Doc Type: Bug Fix
Doc Text:
Cause: If a queue creation fails because of a bad property value then artifacts of the failed creation are not cleaned up. Consequence: If the queue is later created correctly then an error appears describes 'two management objects with the same identifier'. Fix: When a queue creation fails because of bad property values then delete all artifacts related to the failed queue. Result: There is no possibility for management objects to have identifier conflicts and there is no error message.
Clone Of:
Environment:
Last Closed: 2013-03-06 18:52:48 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 759196 0 medium CLOSED clustered broker with management: broker: error Detected two management objects with the same identifier 2025-02-10 03:14:28 UTC
Red Hat Product Errata RHSA-2013:0561 0 normal SHIPPED_LIVE Moderate: Red Hat Enterprise MRG Messaging 2.3 security update 2013-03-06 23:48:13 UTC

Internal Links: 759196

Description Petr Matousek 2012-11-14 16:52:08 UTC
Description of problem:

1. When qpid-config user provides bad input when creating a queue/exchange, an exception is returned from the client, ie:

qpid-tools-0.18:
Failed: Exception: Exception from Agent: {u'error_code': 7L, u'error_text': 'illegal-argument: Cannot convert qpid.max_size to unsigned integer: F8:int64(-1) (qpid/broker/QueuePolicy.cpp:148)'}

qpid-tools-0.14:
Failed: SessionException: ExecutionException(error_code=531, command_id=serial(73), class_code=8, command_code=1, field_index=0, description=u'illegal-argument: Cannot convert qpid.max_size to unsigned integer: F8:int64(-1) (qpid/broker/QueuePolicy.cpp:143)', error_info={}, channel=1, id=serial(77))

^^ Correct - appropriate exception is returned from both the versions, the queue/exchange is not created).

on 2.2 packages (0.14) following error message is logged immediately to the broker log:
2012-11-14 16:15:27 error Execution exception: illegal-argument: Cannot convert qpid.max_size to unsigned integer: F8:int64(-1) (qpid/broker/QueuePolicy.cpp:143)

But this does not occur on 0.18 packages.

2. Then the qpid-tools user corrects his bad input and use the same name for a queue/exchange.

The queue/exchange is properly created, but after several seconds following message is logged to broker log:
2012-11-14 17:14:42 [Management] error Detected two management objects with the same identifier: 0-546-1--47(org.apache.qpid.broker:queue:q)

(^^this does not occur on 0.14 packages)

Maybe some management data do not get properly cleaned?

I do not see any real impact of this error, management tools lists only the one properly created queue/exchange. So the only issue here at the moment is that the management error message is logged to broker log.

Feel free to change the component to qpid-tools if you find it more appropriate.

Version-Release number of selected component (if applicable):
qpid-cpp-*-0.18-9
qpid-tools-0.18-6

How reproducible:
100%

Steps to Reproduce:  
1. qpid-config add queue q --max-queue-size=-1
2. qpid-config add queue q --max-queue-size=1
3. wait several seconds until following message is logged:
2012-11-14 17:14:42 [Management] error Detected two management objects with the same identifier: 0-546-1--47(org.apache.qpid.broker:queue:q)

Actual results:
Management error message in the broker log

Expected results:
No such message logged

Additional info:

Comment 2 Justin Ross 2012-11-14 18:52:15 UTC
Chuck, please assess.

Comment 3 Chuck Rolke 2012-11-16 21:58:45 UTC
Yes this is a bug. Part 2 bug "error Detected two management objects with the same identifier" is a resource leak.

Comment 7 Petr Matousek 2013-01-18 17:21:55 UTC
This issue has been fixed.

Verified on rhel5.9, rhel6.4 Beta (i386 / x86_64)

Packages used for testing:
qpid-cpp-*-0.18-13

-> VERIFIED

Comment 9 errata-xmlrpc 2013-03-06 18:52:48 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/RHSA-2013-0561.html


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