Bug 500174 - Queue purge unsafe on cluster
Queue purge unsafe on cluster
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: qpid-cpp (Show other bugs)
All Linux
urgent Severity high
: 1.1.2
: ---
Assigned To: Alan Conway
Frantisek Reznicek
Depends On:
Blocks: 501015
  Show dependency treegraph
Reported: 2009-05-11 09:57 EDT by Gordon Sim
Modified: 2015-11-15 19:07 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-06-12 13:38:55 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

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

External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2009:1097 normal SHIPPED_LIVE Red Hat Enterprise MRG Messaging bug fixing update 2009-06-12 13:38:48 EDT

  None (edit)
Description Gordon Sim 2009-05-11 09:57:11 EDT
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):


How reproducible:


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 11:37:59 EDT
Moving to XPlanner backlog.
Comment 2 Ted Ross 2009-05-15 14:07:30 EDT
Created attachment 344213 [details]
Patch for qpidd that disallows dangerous methods in clusters
Comment 3 Ted Ross 2009-05-18 15:19:12 EDT
Created attachment 344506 [details]
An improved patch for disallowing dangerous methods during cluster operation.
Comment 4 Gordon Sim 2009-05-28 06:21:50 EDT
Queue.purge and other potentially dangerous methos disallowed for clusters in qpidd-0.5.752581-8
Comment 5 Frantisek Reznicek 2009-06-01 03:44:15 EDT
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

Comment 7 errata-xmlrpc 2009-06-12 13:38:55 EDT
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.


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