Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.

Bug 800912

Summary: qpid-perftest stucks when iterations>1 and npubs<nsubs
Product: Red Hat Enterprise MRG Reporter: Pavel Moravec <pmoravec>
Component: qpid-testsAssignee: Kim van der Riet <kim.vdriet>
Status: CLOSED ERRATA QA Contact: Leonid Zhaldybin <lzhaldyb>
Severity: medium Docs Contact:
Priority: low    
Version: 2.1CC: esammons, gsim, iboverma, jross, lzhaldyb
Target Milestone: 2.3Keywords: EasyFix, Patch
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: qpid-tests-0.18-1 Doc Type: Bug Fix
Doc Text:
Cause: The qpid-perftest program had a logic error which caused it to wait for the incorrect number of control messages. Consequence: Running qpid-perftest with --npubs < --nsubs and --iterations > 0 fails to finish, and appears to hang. Fix: Patch applied which fixes the logic error Result: The qpid-perftest program now can handle --npubs < --nsubs and --iterations > 0 without appearing to hang, and finishes normally.
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-03-06 13:55:16 EST Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Attachments:
Description Flags
proposed patch none

Description Pavel Moravec 2012-03-07 08:57:42 EST
Description of problem:
When running qpid-perftest with iterations>1 and npubs<nsubs, the program stucks in the "middle" of consuming messages in 2nd iteration.


Version-Release number of selected component (if applicable):
any (incl. 0.12)


How reproducible:
100%


Steps to Reproduce:
1. qpid-perftest --count 15000 --npubs 2 --nsubs 4 --iterations 2

  
Actual results:
(*) qpid-perftest stucks in 2nd iteration at point:
Sending start 2 times to qpid-perftest_pub_start
Sending next 2 times to qpid-perftest_sub_iteration
Processing 2 messages from qpid-perftest_pub_done .. done.
Processing 4 messages from qpid-perftest_sub_done ...

(*) qpid-stat -q shows that 15.0k messages are not yet consumed in qpid-perftest0 queue (the number depends on qpid-perftest parameters)


Expected results:
(*) qpid-perftests finishes
(*) qpid-perftest0 has no message inside after the finish


Additional info:
- patch proposed
- upstream QPID-3889 logged for the same
Comment 1 Pavel Moravec 2012-03-07 08:59:33 EST
Created attachment 568300 [details]
proposed patch

opts.totalSubs of "next" messages shall be sent to wake up subscribers, instead of current opts.totalPubs.
Comment 2 Gordon Sim 2012-03-07 11:59:25 EST
Fixed upstream (by Kim): http://svn.apache.org/viewvc?view=rev&rev=1186215
Comment 9 Leonid Zhaldybin 2012-10-08 09:18:48 EDT
Tested on RHEL5.8 and RHEL6.3 (both i386 and x86_64). The qpid-perftest command from the reproduction scenario was run for a few hundreds of times without triggering the issue.

Packages used for testing:

RHEL5.8
qpid-cpp-client-0.18-1.el5
qpid-cpp-client-devel-0.18-1.el5
qpid-cpp-client-devel-docs-0.18-1.el5
qpid-cpp-client-rdma-0.18-1.el5
qpid-cpp-client-ssl-0.18-1.el5
qpid-cpp-mrg-debuginfo-0.18-1.el5
qpid-cpp-server-0.18-1.el5
qpid-cpp-server-cluster-0.18-1.el5
qpid-cpp-server-devel-0.18-1.el5
qpid-cpp-server-rdma-0.18-1.el5
qpid-cpp-server-ssl-0.18-1.el5
qpid-cpp-server-store-0.18-1.el5
qpid-cpp-server-xml-0.18-1.el5

RHEL6.3
qpid-cpp-client-0.18-1.el6_3
qpid-cpp-client-devel-0.18-1.el6_3
qpid-cpp-client-devel-docs-0.18-1.el6_3
qpid-cpp-client-rdma-0.18-1.el6_3
qpid-cpp-client-ssl-0.18-1.el6_3
qpid-cpp-debuginfo-0.18-1.el6_3
qpid-cpp-server-0.18-1.el6_3
qpid-cpp-server-cluster-0.18-1.el6_3
qpid-cpp-server-devel-0.18-1.el6_3
qpid-cpp-server-rdma-0.18-1.el6_3
qpid-cpp-server-ssl-0.18-1.el6_3
qpid-cpp-server-store-0.18-1.el6_3
qpid-cpp-server-xml-0.18-1.el6_3

-> VERIFIED
Comment 11 errata-xmlrpc 2013-03-06 13:55:16 EST
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/RHSA-2013-0561.html