Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 550151

Summary: If an XML exchange is declared durable, the broker crashes on recovery
Product: Red Hat Enterprise MRG Reporter: Mike Cressman <mcressma>
Component: qpid-cppAssignee: Kim van der Riet <kim.vdriet>
Status: CLOSED ERRATA QA Contact: Jeff Needle <jneedle>
Severity: high Docs Contact:
Priority: high    
Version: 1.2CC: gsim, jneedle, tao, tross
Target Milestone: 1.2.2   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
C: create a new durable exchange of a type supplied by a plugin (such as xml), then stop and restart the broker C: the broker will terminate after throwing an instance of 'qpid::broker::UnknownExchangeTypeException' F: reorder the startup sequence so that the plugin modules are loaded before the store is recovered R: the new exchange is now recognized and recovered successfully and the broker starts up
Story Points: ---
Clone Of: 501749 Environment:
Last Closed: 2010-10-08 01:50:14 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: 501749    
Bug Blocks:    

Description Mike Cressman 2009-12-23 18:59:41 UTC
+++ This bug was initially created as a clone of Bug #501749 +++

Description of problem:

If an exchange is declared as durable, the broker will fail on subsequent recovery.  This is true of any exchange type supplied by a plug-in.

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

1.1.1

How reproducible:

100%

Steps to Reproduce:
1. Start a broker with the store and xml modules loaded.
2. execute the command "qpid-config add exchange xml myxml"
3. restart the broker
  
Actual results:

The broker will fail with: terminate called after throwing an instance of 'qpid::broker::UnknownExchangeTypeException'

Expected results:

Success, and recovery of the "myxml" exchange.

Additional info:

--- Additional comment from tross on 2009-05-20 11:25:53 EDT ---

This is caused by the fact that the broker recovers the store before it loads plug-in modules.  At the time the xml exchange is recovered, the type is as yet unknown.

--- Additional comment from tross on 2009-05-20 11:28:54 EDT ---

Sorry,  here are the correct steps to reproduce:

Steps to Reproduce:
1. Start a broker with the store and xml modules loaded.
2. execute the command "qpid-config add exchange xml myxml --durable"
3. restart the broker

--- Additional comment from gsim on 2009-05-21 08:45:51 EDT ---

Added handling for this case as r777096 on qpid trunk and r3390 on store.
Moved registration for the xml- and replication- exchanges to earlyInitialise() to allow instances of these types to be recovered (r777073).

--- Additional comment from iboverma on 2009-10-06 12:17:15 EDT ---

Move to 1.3.

Comment 1 Mike Cressman 2009-12-23 19:12:44 UTC
Target for first MRG-M 1.2 errata (internal release 1.2.2)

Comment 2 Kim van der Riet 2010-01-05 18:10:09 UTC
The store r.3390 made it to the 1.2 branch, however r.777096 did not. Those changes in r.777096 which change the order of the loading of XmlExchange and ReplicationExchange from initialize() to earlyInitialize() have been backported to the 1.2 branch in the MRG git repo.

Comment 4 Mike Cressman 2010-09-24 15:51:33 UTC
    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:
C: create a new durable exchange of a type supplied by a plugin (such as xml), then stop and restart the broker
C: the broker will terminate after throwing an instance of 'qpid::broker::UnknownExchangeTypeException'
F: reorder the startup sequence so that the plugin modules are loaded before the store is recovered
R: the new exchange is now recognized and recovered successfully and the broker starts up

Comment 5 errata-xmlrpc 2010-10-08 01:50:14 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2010-0756.html