Bug 500174 - Queue purge unsafe on cluster
Summary: Queue purge unsafe on cluster
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: qpid-cpp
Version: 1.1.1
Hardware: All
OS: Linux
urgent
high
Target Milestone: 1.1.2
: ---
Assignee: Alan Conway
QA Contact: Frantisek Reznicek
URL:
Whiteboard:
Depends On:
Blocks: 501015
TreeView+ depends on / blocked
 
Reported: 2009-05-11 13:57 UTC by Gordon Sim
Modified: 2015-11-16 00:07 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-06-12 17:38:55 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Patch for qpidd that disallows dangerous methods in clusters (3.51 KB, patch)
2009-05-15 18:07 UTC, Ted Ross
no flags Details | Diff
An improved patch for disallowing dangerous methods during cluster operation. (3.56 KB, patch)
2009-05-18 19:19 UTC, Ted Ross
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2009:1097 0 normal SHIPPED_LIVE Red Hat Enterprise MRG Messaging bug fixing update 2009-06-12 17:38:48 UTC

Description Gordon Sim 2009-05-11 13:57:11 UTC
Description of problem:

If a new cluster member is added after broker objects (queues, exchanges etc) are added to the original cluster nodes, then the new member allocates different management ids to those objects.

This causes problems when e.g. a management method is invoked

Version-Release number of selected component (if applicable):

qpidd-0.5.752581-5.el5

How reproducible:

100%

Steps to Reproduce:
1. start one cluster node 
2. add a queue (e.g. qpid-config add queue test-queue)
3. start new node for the same cluster
4. send 5 messages to the queue (e.g. for m in A B C D E; do echo $m; done | ./src/tests/sender --send-eos 1 -p NODE_1)
5. connect to one node with qpid-tool and invoke purge on the queue specifying 3 messages should be removed (e.g. call <ID> purge 3)
6. exit qpid-tool and consume messages from the other node (i.e. not the one we just connected to using qpid-tool) (e.g. ./src/tests/receiver -p NODE_2)
  
Actual results:

All 5 message are received although three were purged off the other node. The other node also crashes with something like: 

error Execution exception: invalid-argument: anonymous.04e9044c-211f-403e-863a-fbeb0704566b: confirmed < (4+0) but only sent < (3+0) (qpid/SessionState.cpp:151)

Expected results:

Purge should work consistently across cluster, leaving 2 messages on the queue in all nodes. Subsequent use of cluster should not cause crashes.

Additional info:

You can also just check using qpid-tool that the queues have different ids after step 3 above, which is the root of the problem.

(sender and receiver test programs used in examples above are from qpid svn)

Comment 1 Grant Shipley 2009-05-14 15:37:59 UTC
Moving to XPlanner backlog.

Comment 2 Ted Ross 2009-05-15 18:07:30 UTC
Created attachment 344213 [details]
Patch for qpidd that disallows dangerous methods in clusters

Comment 3 Ted Ross 2009-05-18 19:19:12 UTC
Created attachment 344506 [details]
An improved patch for disallowing dangerous methods during cluster operation.

Comment 4 Gordon Sim 2009-05-28 10:21:50 UTC
Queue.purge and other potentially dangerous methos disallowed for clusters in qpidd-0.5.752581-8

Comment 5 Frantisek Reznicek 2009-06-01 07:44:15 UTC
The issue has been workarounded by disabling queue purge in qpidd cluster configuration. Validated on RHEL 5.3 i386 / x86_64 on packages:
[root@intel-greencity-01 bz499872]# rpm -qa | egrep '(qpid|openais)' | sort -u
openais-0.80.3-22.el5_3.7
openais-debuginfo-0.80.3-22.el5_3.7
openais-devel-0.80.3-22.el5_3.7
python-qpid-0.5.752581-1.el5
qpidc-0.5.752581-10.el5
qpidc-debuginfo-0.5.752581-10.el5
qpidc-devel-0.5.752581-10.el5
qpidc-perftest-0.5.752581-10.el5
qpidc-rdma-0.5.752581-10.el5
qpidc-ssl-0.5.752581-10.el5
qpidd-0.5.752581-10.el5
qpidd-acl-0.5.752581-10.el5
qpidd-cluster-0.5.752581-10.el5
qpidd-devel-0.5.752581-10.el5
qpid-dotnet-0.4.738274-2.el5
qpidd-rdma-0.5.752581-10.el5
qpidd-ssl-0.5.752581-10.el5
qpidd-xml-0.5.752581-10.el5
qpid-java-client-0.5.751061-4.el5
qpid-java-common-0.5.751061-4.el5

-> VERIFIED

Comment 7 errata-xmlrpc 2009-06-12 17:38:55 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/RHBA-2009-1097.html


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