Bug 756808

Summary: qpid-stat -q output, "bytes" column overflow
Product: Red Hat Enterprise MRG Reporter: Leonid Zhaldybin <lzhaldyb>
Component: qpid-toolsAssignee: Ernie <eallen>
Status: CLOSED ERRATA QA Contact: Leonid Zhaldybin <lzhaldyb>
Severity: medium Docs Contact:
Priority: medium    
Version: 2.1CC: esammons, jross, mtoth
Target Milestone: 3.0   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard:
Fixed In Version: mrg-0.18 Doc Type: Bug Fix
Doc Text:
Cause: Create a queue with more than 4gb of data and view the queue info using qpid-stat -q Consequence: The bytesIn column displayed by qpid-stat -q was displaying as an unsigned 32 bit number. It would "wrap around" to 0 when the value exceeded 4gb. Fix: The qpid-stat code now formats the bytesIn column using an unsigned 64 bit number. Result: The bytesIn column is able to display numbers that are greater than 4db
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-09-24 15:03:34 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Leonid Zhaldybin 2011-11-24 16:37:10 UTC
Description of problem:
If a queue contains 4 GB of messages (or more), then the qpid-stat tool is unable to properly display the amount of bytes in this queue.
After I sent exactly 4GB of data to a queue, "qpid-stat -q" showed correct number of messages in this queue, but at the same time, the "bytes" column contained the value "0" for this queue:
[root@lzhaldyb-rhel62x ~]# qpid-stat -q
Queues
  queue                                dur  autoDel  excl  msg    msgIn  msgOut  bytes  bytesIn  bytesOut  cons  bind
  =====================================================================================================================
  qmfc-v2-ui-lzhaldyb-rhel62x.13638.1       Y        Y        0      0      0       0      0        0         1     1
  topic-lzhaldyb-rhel62x.13638.1            Y        Y        0      0      0       0      0        0         1     4
  reply-lzhaldyb-rhel62x.13638.1            Y        Y        0     58     58       0   22.4k    22.4k        1     2
  qmfc-v2-hb-lzhaldyb-rhel62x.13638.1       Y        Y        0      0      0       0      0        0         1     2
  test                                                     4.10k  4.10k     0       0   4.29g       0         0     1
  qmfc-v2-lzhaldyb-rhel62x.13638.1          Y        Y        0     11     11       0   8.15k    8.15k        1     2

After sending some more messages, this column value continued to grow from this "fake" zero. Looks like a 32-bit overflow to me.


Version-Release number of selected component (if applicable):
qpid-tools-0.12-2.el6.noarch

How reproducible:
always

Steps to Reproduce:
1. Create a queue which can hold more than 4GB of data.
2. Send exactly 4GB of data to this queue, run "qpid-stat -q" command. 
  
Actual results:
The "bytes" column will indicate, that the queue currently contains 0 bytes.

Expected results:
qpid-stat should be able to correctly display queue's statistics for the values bigger than 4GB.

Additional info:
I'm unable to test it on i686 because of the bug 756790.

Comment 3 Ernie 2013-02-21 15:11:09 UTC
This bug was already fixed in the current 2.3 version of qpid-tools.

Comment 7 Leonid Zhaldybin 2013-10-22 12:28:16 UTC
This issue has been fixed. There is no overflow of "bytes" column in qpid-stat tool output. Tested on RHEL6 x86_64.

Packages used for testing:

python-qpid-0.22-5.el6
python-qpid-qmf-0.22-18.el6
qpid-cpp-client-0.22-21.el6
qpid-cpp-client-devel-0.22-21.el6
qpid-cpp-client-devel-docs-0.22-21.el6
qpid-cpp-client-ssl-0.22-21.el6
qpid-cpp-server-0.22-21.el6
qpid-cpp-server-devel-0.22-21.el6
qpid-cpp-server-ha-0.22-21.el6
qpid-cpp-server-ssl-0.22-21.el6
qpid-cpp-server-store-0.22-21.el6
qpid-cpp-server-xml-0.22-21.el6
qpid-java-amqp-0-10-client-jms-0.23-4.el6
qpid-java-client-0.23-4.el6
qpid-java-common-0.23-4.el6
qpid-java-example-0.23-4.el6
qpid-jca-0.22-1.el6
qpid-jca-xarecovery-0.22-1.el6
qpid-proton-c-0.5-6.el6
qpid-proton-c-devel-0.5-6.el6
qpid-qmf-0.22-18.el6
qpid-snmpd-1.0.0-12.el6
qpid-tools-0.22-6.el6

-> VERIFIED

Comment 10 errata-xmlrpc 2014-09-24 15:03:34 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/RHEA-2014-1296.html