Bug 773719

Summary: Concurrent queue bind on the same queue results in crash
Product: Red Hat Enterprise MRG Reporter: Jason Dillaman <jdillama>
Component: qpid-cppAssignee: Ted Ross <tross>
Status: CLOSED ERRATA QA Contact: Leonid Zhaldybin <lzhaldyb>
Severity: high Docs Contact:
Priority: high    
Version: 2.0CC: esammons, iboverma, jross, lzhaldyb, mcressma, tross
Target Milestone: 2.3   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: qpid-cpp-0.18-1 Doc Type: Bug Fix
Doc Text:
Cause: There was a defect in the qpid broker in which the list of bindings on a queue was insufficiently protected from concurrent access. Consequence: If multiple clients connected to the broker were adding and deleting bindings on the same queue, the broker might crash. Fix: The broker was updated to provide adequate protection for this data structure. Result: The broker does not crash with multiple clients manipulating the bindings on the same queue.
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-03-06 18:54:23 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 698367, 803771    
Attachments:
Description Flags
Reproducer none

Description Jason Dillaman 2012-01-12 17:27:45 UTC
Description of problem:
While concurrently creating bindings to the same queue from multiple broker connections, the broker will periodically crash.  

Version-Release number of selected component (if applicable):
qpid-cpp-server-0.12-6_ptc_hotfix_3.el6.x86_64

How reproducible:
Frequently

Steps to Reproduce:
1. Concurrently create bindings to the same queue
2. Observe that multiple threads are able to invoke QueueBindings::add concurrently 
  
Actual results:
Qpid broker will crash

Expected results:
Qpid broker does not crash and bindings are created

Additional info:

Comment 3 Ted Ross 2012-01-13 13:56:13 UTC
Upstream issue:  https://issues.apache.org/jira/browse/QPID-3755

Comment 4 Ted Ross 2012-01-13 15:35:45 UTC
Created attachment 555091 [details]
Reproducer

Comment 5 Ted Ross 2012-01-13 15:37:27 UTC
I've attached a reproducer.  This program runs against a broker running on "localhost:10000" and has a queue called "test-queue" pre-configured.

If 20 instances of this program are run at the same time, the failure can be seen reliably.

Comment 6 Ted Ross 2012-01-13 16:21:04 UTC
Fixed upstream in revision 1231158.

Comment 11 Pavel Moravec 2012-10-12 06:10:30 UTC
*** Bug 704510 has been marked as a duplicate of this bug. ***

Comment 12 Leonid Zhaldybin 2013-01-10 06:33:59 UTC
Tested on RHEL5.9 and RHEL6.3 (both i386 and x86_64). This issue has been fixed.

Packages used for testing:

RHEL5.9
qpid-cpp-client-0.18-13.el5
qpid-cpp-client-devel-0.18-13.el5
qpid-cpp-client-devel-docs-0.18-13.el5
qpid-cpp-client-ssl-0.18-13.el5
qpid-cpp-server-0.18-13.el5
qpid-cpp-server-cluster-0.18-13.el5
qpid-cpp-server-devel-0.18-13.el5
qpid-cpp-server-ssl-0.18-13.el5
qpid-cpp-server-store-0.18-13.el5
qpid-cpp-server-xml-0.18-13.el5
qpid-java-client-0.18-6.el5
qpid-java-common-0.18-6.el5
qpid-java-example-0.18-6.el5
qpid-qmf-0.18-13.el5
qpid-qmf-devel-0.18-13.el5
qpid-tools-0.18-7.el5

RHEL6.3
qpid-cpp-client-0.18-13.el6
qpid-cpp-client-devel-0.18-13.el6
qpid-cpp-client-devel-docs-0.18-13.el6
qpid-cpp-server-0.18-13.el6
qpid-cpp-server-devel-0.18-13.el6
qpid-cpp-server-store-0.18-13.el6
qpid-cpp-server-xml-0.18-13.el6
qpid-java-client-0.18-6.el6
qpid-java-common-0.18-6.el6
qpid-java-example-0.18-6.el6
qpid-qmf-0.18-13.el6
qpid-tools-0.18-7.el6_3

-> VERIFIED

Comment 14 errata-xmlrpc 2013-03-06 18:54:23 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/RHSA-2013-0561.html