Bug 991146

Summary: C++ Broker with durable queues/exchanges fails to restart - Out of bounds
Product: Red Hat Enterprise MRG Reporter: Chuck Rolke <crolke>
Component: qpid-cppAssignee: Ernie <eallen>
Status: CLOSED ERRATA QA Contact: Petra Svobodová <psvobodo>
Severity: unspecified Docs Contact:
Priority: high    
Version: 2.3CC: jross, psvobodo
Target Milestone: 3.1   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: qpid-cpp-0.22 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Linux system.example.com 2.6.32-358.14.1.el6.x86_64 #1 SMP Mon Jun 17 15:54:20 EDT 2013 x86_64 x86_64 x86_64 GNU/Linux
Last Closed: 2015-04-14 13:46:51 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
shell reproducer none

Description Chuck Rolke 2013-08-01 17:40:21 UTC
Description of problem:

When reproducing bz921925 the broker does not restart after creating several queues:

Starting broker: --daemon \
    --acl-file /home/crolke/tmp/x1/qpidd.acl \
    --auth yes \
    -t \
    --port 50000 \
    --jfile-size-pgs 16 \
    --num-jfiles 4 \
    --data-dir /home/crolke/tmp/x1/  \
    --log-to-file /home/crolke/tmp/x1/broker-log.txt \
    --sasl-config /home/crolke/sasl_config \
    --max-queues-per-user 10
2013-08-01 13:26:35 [Broker] debug Forked daemon child process
2013-08-01 13:26:36 [System] debug Exception constructed: Daemon startup failed: Out of Bounds
Daemon startup failed: Out of Bounds
2013-08-01 13:26:36 [Broker] critical Unexpected error: Daemon startup failed: Out of Bounds


Version-Release number of selected component (if applicable):

PACKAGES =========================================
 
cyrus-sasl-2.1.23-13.el6_3.1.x86_64
cyrus-sasl-devel-2.1.23-13.el6_3.1.x86_64
cyrus-sasl-gssapi-2.1.23-13.el6_3.1.x86_64
cyrus-sasl-lib-2.1.23-13.el6_3.1.x86_64
cyrus-sasl-md5-2.1.23-13.el6_3.1.x86_64
cyrus-sasl-plain-2.1.23-13.el6_3.1.x86_64
python-qpid-0.18-4.el6.noarch
python-qpid-qmf-0.18-15.el6.x86_64
python-saslwrapper-0.18-1.el6_3.x86_64
qpid-cpp-client-0.18-14.el6.x86_64
qpid-cpp-client-devel-0.18-14.el6.x86_64
qpid-cpp-client-devel-docs-0.18-14.el6.noarch
qpid-cpp-client-rdma-0.18-14.el6.x86_64
qpid-cpp-client-ssl-0.18-14.el6.x86_64
qpid-cpp-debuginfo-0.14-22.el6_3.x86_64
qpid-cpp-server-0.18-14.el6.x86_64
qpid-cpp-server-cluster-0.18-14.el6.x86_64
qpid-cpp-server-devel-0.18-14.el6.x86_64
qpid-cpp-server-rdma-0.18-14.el6.x86_64
qpid-cpp-server-ssl-0.18-14.el6.x86_64
qpid-cpp-server-store-0.18-14.el6.x86_64
qpid-cpp-server-xml-0.18-14.el6.x86_64
qpid-java-client-0.18-7.el6.noarch
qpid-java-common-0.18-7.el6.noarch
qpid-java-example-0.18-7.el6.noarch
qpid-jca-0.18-8.el6.noarch
qpid-jca-xarecovery-0.18-8.el6.noarch
qpid-proton-c-0.4-2.2.el6.x86_64
qpid-proton-c-devel-0.4-2.2.el6.x86_64
qpid-qmf-0.18-15.el6.x86_64
qpid-qmf-debuginfo-0.14-14.el6_3.x86_64
qpid-qmf-devel-0.18-15.el6.x86_64
qpid-tests-0.18-2.el6.noarch
qpid-tools-0.18-8.el6.noarch
saslwrapper-0.18-1.el6_3.x86_64
saslwrapper-devel-0.18-1.el6_3.x86_64


How reproducible:

100%

Steps to Reproduce:
1. From a normal user directory execute attached script.
2.
3.

Actual results:

After creating queues and exchanges the broker is restarted.
Restart fails with 'Out of bounds' errors.

Expected results:

Restart should succeed.

Additional info:

Comment 1 Chuck Rolke 2013-08-01 17:43:52 UTC
Created attachment 781687 [details]
shell reproducer

Reproducer script copied from bz921925

Comment 2 Justin Ross 2014-06-12 18:10:56 UTC
Ernie, please see if this reproduces against 0.22-mrg.

Comment 3 Ernie 2014-06-26 22:56:46 UTC
Looks like this is fixed in 0.22

Steps:
- install and test qpid version
$qpidd -v
qpidd (qpid-cpp) version 0.22
- in the dir that will run the test script, create qpidd.conf for the sasl_config dir that points to /home/eallen/sasl_config/qpidd.sasldb. It should contain:
pwcheck_method: auxprop
auxprop_plugin: sasldb
sasldb_path: /home/eallen/sasl_config/qpidd.sasldb
sql_select: dummy select
mech_list: ANONYMOUS PLAIN DIGEST-MD5 EXTERNAL CRAM-MD5
- in the dir that will run the test script, ensure qpidd.sasldb contains users guest/guest and admin/admin
- make sure legacystore was the only store available in /usr/local/lib64/qpid/daemon

$./test_bz921925_bz991146.sh 
Starting broker: --daemon --acl-file /home/eallen/tmp/x1/qpidd.acl --auth yes -t --port 50000 --jfile-size-pgs 16 --num-jfiles 4 --data-dir /home/eallen/tmp/x1/  --log-to-file /home/eallen/tmp/x1/broker-log.txt --sasl-config /home/eallen/sasl_config --max-queues-per-user 10
2014-06-26 18:46:29 [Broker] debug Forked daemon child process
------------------------------------------------------------------------
doing some provisioning
------------------------------------------------------------------------
"qpid-config queues" before restart
Queue Name                                Attributes
=================================================================
3b6b4e2d-5c50-49b8-8f2c-2ff3e77c44df:0.0  auto-del excl 
Durable1_A                                --durable 
Durable1_G                                --durable 
Durable2_A                                --durable --alternate-exchange=longNamedExchangelongNamedExchange 
Durable2_G                                --durable --alternate-exchange=longNamedExchangelongNamedExchange 
Durable3_A                                --durable --max-queue-count=100 --alternate-exchange=longNamedExchangelongNamedExchange 
Durable3_G                                --durable --max-queue-count=100 --alternate-exchange=longNamedExchangelongNamedExchange 
Durable4_A                                --durable --max-queue-size=55555 --alternate-exchange=longNamedExchangelongNamedExchange 
Durable4_G                                --durable --max-queue-size=55555 --alternate-exchange=longNamedExchangelongNamedExchange 
Durable5_A                                --durable --max-queue-size=55555 --max-queue-count=100 --alternate-exchange=longNamedExchangelongNamedExchange 
Durable5_G                                --durable --max-queue-size=55555 --max-queue-count=100 --alternate-exchange=longNamedExchangelongNamedExchange 
Durable6_A                                --durable --max-queue-count=100 
Durable6_G                                --durable --max-queue-count=100 
Durable7_A                                --durable --max-queue-size=55555 --max-queue-count=100 
Durable7_G                                --durable --max-queue-size=55555 --max-queue-count=100 
Durable8_A                                --durable --max-queue-size=55555 
Durable8_G                                --durable --max-queue-size=55555 
------------------------------------------------------------------------
"qpid-config exchanges" before restart
Type      Exchange Name                       Attributes
=================================================================
direct                                        --replicate=none
direct    amq.direct                          --durable --replicate=none
fanout    amq.fanout                          --durable --replicate=none
headers   amq.match                           --durable --replicate=none
topic     amq.topic                           --durable --replicate=none
fanout    longNamedExchangelongNamedExchange  --durable
direct    qmf.default.direct                  --replicate=none
topic     qmf.default.topic                   --replicate=none
topic     qpid.management                     --replicate=none
Stopping broker on port 50000
Starting broker: --daemon --acl-file /home/eallen/tmp/x1/qpidd.acl --auth yes -t --port 50000 --jfile-size-pgs 16 --num-jfiles 4 --data-dir /home/eallen/tmp/x1/  --log-to-file /home/eallen/tmp/x1/broker-log.txt --sasl-config /home/eallen/sasl_config --max-queues-per-user 10
2014-06-26 18:46:36 [Broker] debug Forked daemon child process
------------------------------------------------------------------------
"qpid-config queues" after restart (should be identical up to one aux.queue)
Queue Name                                Attributes
=================================================================
355e1a41-2fe5-481e-acff-0a0b320ed034:0.0  auto-del excl 
Durable1_A                                --durable 
Durable1_G                                --durable 
Durable2_A                                --durable --alternate-exchange=longNamedExchangelongNamedExchange 
Durable2_G                                --durable --alternate-exchange=longNamedExchangelongNamedExchange 
Durable3_A                                --durable --max-queue-count=100 --alternate-exchange=longNamedExchangelongNamedExchange 
Durable3_G                                --durable --max-queue-count=100 --alternate-exchange=longNamedExchangelongNamedExchange 
Durable4_A                                --durable --max-queue-size=55555 --alternate-exchange=longNamedExchangelongNamedExchange 
Durable4_G                                --durable --max-queue-size=55555 --alternate-exchange=longNamedExchangelongNamedExchange 
Durable5_A                                --durable --max-queue-size=55555 --max-queue-count=100 --alternate-exchange=longNamedExchangelongNamedExchange 
Durable5_G                                --durable --max-queue-size=55555 --max-queue-count=100 --alternate-exchange=longNamedExchangelongNamedExchange 
Durable6_A                                --durable --max-queue-count=100 
Durable6_G                                --durable --max-queue-count=100 
Durable7_A                                --durable --max-queue-size=55555 --max-queue-count=100 
Durable7_G                                --durable --max-queue-size=55555 --max-queue-count=100 
Durable8_A                                --durable --max-queue-size=55555 
Durable8_G                                --durable --max-queue-size=55555 
------------------------------------------------------------------------
"qpid-config exchanges" before restart
Type      Exchange Name                       Attributes
=================================================================
direct                                        --replicate=none
direct    amq.direct                          --durable --replicate=none
fanout    amq.fanout                          --durable --replicate=none
headers   amq.match                           --durable --replicate=none
topic     amq.topic                           --durable --replicate=none
fanout    longNamedExchangelongNamedExchange  --durable
direct    qmf.default.direct                  --replicate=none
topic     qmf.default.topic                   --replicate=none
topic     qpid.management                     --replicate=none
------------------------------------------------------------------------
now user guest should be able to create some queue with alternate exchange having the longName
Stopping broker on port 50000
success

Comment 5 Petra Svobodová 2014-10-29 07:30:57 UTC
Now it is possible to create some queue with alternate exchange having the longName and restart the broker; the issue is fixed.

Verified on packages qpid-cpp-0.30-2, qpid-tools-0.30-1; on Rhel6-i386 and x86_64.

--> VERIFIED

Comment 7 errata-xmlrpc 2015-04-14 13:46:51 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.

https://rhn.redhat.com/errata/RHEA-2015-0805.html