| Summary: | msgGroups: broker crash when purge/reroute method called for more messages than queue actual messages count | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise MRG | Reporter: | Petr Matousek <pematous> | ||||||||
| Component: | qpid-cpp | Assignee: | Ken Giusti <kgiusti> | ||||||||
| Status: | CLOSED CURRENTRELEASE | QA Contact: | MRG Quality Engineering <mrgqe-bugs> | ||||||||
| Severity: | unspecified | Docs Contact: | |||||||||
| Priority: | high | ||||||||||
| Version: | Development | CC: | jross | ||||||||
| Target Milestone: | 2.1.2 | ||||||||||
| Target Release: | --- | ||||||||||
| Hardware: | Unspecified | ||||||||||
| OS: | Unspecified | ||||||||||
| Whiteboard: | |||||||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||||||
| Doc Text: |
Cause
Attempting to purge or move more messages than are present on a message group queue.
Consequence
The broker will crash.
Fix
The broker will check if the requested number of messages is present.
Result
If there are less than the requested number of messages present on the queue, the broker will only move/purge those messages that are present.
|
Story Points: | --- | ||||||||
| Clone Of: | Environment: | ||||||||||
| Last Closed: | Type: | --- | |||||||||
| Regression: | --- | Mount Type: | --- | ||||||||
| Documentation: | --- | CRM: | |||||||||
| Verified Versions: | Category: | --- | |||||||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||||||
| Attachments: |
|
||||||||||
Created attachment 526125 [details]
test reproducer
Created attachment 526128 [details]
stack trace
Created attachment 526130 [details]
stack_trace2.txt
Should be fixed as of upstream revision: 1196764 This issue has been fixed. Verified on RHEL5.7 and RHEL6.2, architectures: x86_64, i686 packages installed: qpid-cpp-mrg-0.14-3.el5 qpid-qmf-0.14-2.el5 qpid-cpp-0.14-1.el6 qpid-qmf-0.14-3.el6 -> VERIFIED
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
Attempting to purge or move more messages than are present on a message group queue.
Consequence
The broker will crash.
Fix
The broker will check if the requested number of messages is present.
Result
If there are less than the requested number of messages present on the queue, the broker will only move/purge those messages that are present.
|
Description of problem: For the queues defined with the message groups functionality enabled (qpid.group_header_key supplied): If requested to purge/reroute more than actual messages count in the non-empty queue (either using qpid-tool or qmf), broker connection is aborted. qpidd: ./qpid/broker/MessageGroupManager.h:73: void qpid::broker::MessageGroupManager::unFree(const qpid::broker::MessageGroupManager::GroupState&): Assertion `pos != freeGroups.end() && pos->second == &state' failed. Exception in do_call: %r (None, 'connection aborted') qpid: Broker disconnected: Disconnected Broker The stack trace is attached and contains following error: UnicodeDecodeError: 'utf8' codec can't decode byte 0xb6 in position 3: unexpected code byte Please see additional info for more details, Version-Release number of selected component (if applicable): qpidd (qpidc) version 0.13 snv branch QPID-3346 (revision 1177617) How reproducible: 100% Steps to Reproduce: 1. run the attached test reproducer Actual results: abort signal on the broker when purge/reroute more messages than actual messages count in the queue Expected results: purge/reroute all the messages matching the filter Additional info: Moreover consuming messages after "successful" command call (queue contains more messages than requested) leads again to core dump. The stack trace is attached - stack_trace2.txt. this can be reproduced using the following change in attached test reproducer: - result = q.purge(5, {}) + result = q.purge(1, {})