Bug 679216 - Deleting a queue with an alternate exchange can cause infinite loop
Summary: Deleting a queue with an alternate exchange can cause infinite loop
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: qpid-cpp
Version: 1.3
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: 2.0
: ---
Assignee: Gordon Sim
QA Contact: Petr Matousek
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-02-21 22:21 UTC by Chris Pitman
Modified: 2011-06-23 15:43 UTC (History)
4 users (show)

Fixed In Version: qpid-cpp-0.9.1079953
Doc Type: Bug Fix
Doc Text:
Cause: The bindings for a queue were removed after attempting to reroute any orphaned messages. Consequence: If orphaned messages were reroute to an exchange to which the queue itself was bound, an infinite loop would result. Fix: Remove the bindings for a deleted queue before routing orphaned messages. Result: No infinite loop results as there is no longer a binding back to the original queue when the messages are rerouted.
Clone Of:
Environment:
Last Closed: 2011-06-23 15:43:22 UTC
Target Upstream Version:


Attachments (Terms of Use)
Test case (577 bytes, application/x-shellscript)
2011-02-21 22:22 UTC, Chris Pitman
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2011:0890 0 normal SHIPPED_LIVE Red Hat Enterprise MRG Messaging 2.0 Release 2011-06-23 15:42:41 UTC

Description Chris Pitman 2011-02-21 22:21:36 UTC
Description of problem:
Create an exchange and a queue, with the queue have the exchange as its alternate and being bound to the exchange.  Deliver a message to the exchange so that it goes to the queue.  When the queue is deleted with qpid-config, the message will endlessly cycle through the broker. 

Version-Release number of selected component (if applicable):
qpid-tools-0.7.946106-11.el5
qpid-cpp-client-0.7.946106-24_ptc_hotfix_4.el5
qpid-cpp-client-ssl-0.7.946106-24_ptc_hotfix_4.el5
qpid-cpp-mrg-debuginfo-0.7.946106-24_ptc_hotfix_4.el5
qpid-cpp-client-devel-0.7.946106-24_ptc_hotfix_4.el5
qpid-cpp-client-rdma-0.7.946106-24_ptc_hotfix_4.el5
qpid-cpp-server-store-0.7.946106-24_ptc_hotfix_4.el5
qpid-cpp-server-rdma-0.7.946106-24_ptc_hotfix_4.el5
python-qpid-0.7.946106-14.el5
rh-qpid-cpp-tests-0.7.946106-24_ptc_hotfix_4.el5
qpid-cpp-server-devel-0.7.946106-24_ptc_hotfix_4.el5
qpid-cpp-server-0.7.946106-24_ptc_hotfix_4.el5
qpid-cpp-server-ssl-0.7.946106-24_ptc_hotfix_4.el5
qpid-cpp-client-devel-docs-0.7.946106-24_ptc_hotfix_4.el5
qpid-cpp-server-cluster-0.7.946106-24_ptc_hotfix_4.el5


How reproducible:
Always

Steps to Reproduce:
1. Start a broker on port 5672 with authentication off
2. Run attached script
  
Actual results:
Script does not terminate, and qpid-stat -e shows that main exchange has constantly increasing message count.

Expected results:
Script terminates, and main exchange only receives a single message.

Comment 1 Chris Pitman 2011-02-21 22:22:04 UTC
Created attachment 480010 [details]
Test case

Comment 2 Gordon Sim 2011-03-03 12:49:51 UTC
Test added upstream in r1076604. Already fixed on trunk as a result of
refactoring in r1072179.

Comment 3 Gordon Sim 2011-03-07 12:31:33 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Cause:
The bindings for a queue were removed after attempting to reroute any orphaned messages.

Consequence:
If orphaned messages were reroute to an exchange to which the queue itself was bound, an infinite loop would result.

Fix:
Remove the bindings for a deleted queue before routing orphaned messages.

Result:
No infinite loop results as there is no longer a binding back to the original queue when the messages are rerouted.

Comment 4 Petr Matousek 2011-04-22 11:51:13 UTC
This issue has been fixed

Verified on RHEL4.9, RHEL5.6 and RHEL6.1, architectures: i386, x86_64

packages installed:
python-qpid-0.10-1.el5
python-qpid-qmf-0.10-6.el5
qpid-cpp-client-0.10-4.el5
qpid-cpp-client-devel-0.10-4.el5
qpid-cpp-client-devel-docs-0.10-4.el5
qpid-cpp-client-ssl-0.10-4.el5
qpid-cpp-mrg-debuginfo-0.10-4.el5
qpid-cpp-server-0.10-4.el5
qpid-cpp-server-cluster-0.10-4.el5
qpid-cpp-server-devel-0.10-4.el5
qpid-cpp-server-ssl-0.10-4.el5
qpid-cpp-server-store-0.10-4.el5
qpid-cpp-server-xml-0.10-4.el5
qpid-java-client-0.10-4.el5
qpid-java-common-0.10-4.el5
qpid-java-example-0.10-4.el5
qpid-java-jca-0.10-4.el5
qpid-qmf-0.10-2.el5
qpid-qmf-0.10-6.el5
qpid-qmf-devel-0.10-2.el5
qpid-qmf-devel-0.10-6.el5
qpid-tools-0.10-4.el5


-> VERIFIED

Comment 5 errata-xmlrpc 2011-06-23 15:43:22 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHEA-2011-0890.html


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