Bug 518394 - Creating durable and cluster-durable queue which has bad --file-count and/or --file-size parameter causes an exception only for first time
Summary: Creating durable and cluster-durable queue which has bad --file-count and/or ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: python-qpid
Version: 1.1.6
Hardware: All
OS: Linux
low
medium
Target Milestone: 1.3
: ---
Assignee: Kim van der Riet
QA Contact: Frantisek Reznicek
URL:
Whiteboard:
Depends On: 636827
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-08-20 09:05 UTC by Frantisek Reznicek
Modified: 2015-11-16 01:11 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
When creating queues using the Python tools, certain combinations of file size and number caused the broker to close the connection with an error code, resulting in unpredictable behavior when using the tools to make stores that were larger than default. Because it interfered with parameter-handling for queue sizes larger than the default, this update disables the incomplete auto-expand feature, with the result that queues with non-default sizes can successfully be created without error.
Clone Of:
Environment:
Last Closed: 2010-10-14 15:57:29 UTC


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2010:0773 normal SHIPPED_LIVE Moderate: Red Hat Enterprise MRG Messaging and Grid Version 1.3 2010-10-14 15:56:44 UTC

Description Frantisek Reznicek 2009-08-20 09:05:37 UTC
Description of problem:

Creating durable and cluster-durable queue 
which has  --file-count and/or --file-size parameter out of range causes an exception only for first time of queue declaration.

Next time when the same queue is declared with same (bad) parameters causes python API to not throw any exception, but queue is of course not created. This is in fact misleading and buggy. See Additional info field.


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

How reproducible:
100%

Steps to Reproduce:
1. qpid-config queues ; echo $?
2. qpid-config add queue b3 --file-count=16 --file-size=24 --durable --cluster-durable ; echo $?
3. qpid-config queues ; echo $?
4. pid-config add queue b3 --file-count=16 --file-size=24 --durable --cluster-durable ; echo $?
5. qpid-config queues ; echo $?

  

Actual results:
Exception is raised at point 2. but not at point 4. Exit code is the same case, non-zero for point 2. and zero for point 4.


Expected results:
The exception[s] JERR_LFMGR_BADAEFNUMLIM need to be thrown everytime queue is going to be created with invalid parameters.


Additional info:
[root@mrg-qe-01 ~]# qpid-config queues ; echo $?
Queue Name                                     Attributes
======================================================================
reply-mrg-qe-01.lab.eng.brq.redhat.com.4152.1  auto-del excl
topic-mrg-qe-01.lab.eng.brq.redhat.com.4152.1  auto-del excl
0
[root@mrg-qe-01 ~]# qpid-config add queue b3 --file-count=16 --file-size=24 --durable --cluster-durable ; echo $?
Failed: SessionException - (501, u'Queue b3: create() failed: jexception 0x0500 lpmgr::initialize() threw JERR_LFMGR_BADAEFNUMLIM: Bad auto-expand file number limit. (_ae_max_jfiles=0; num_jfiles=16) (MessageStoreImpl.cpp:456)')
1
[root@mrg-qe-01 ~]# qpid-config queues ; echo $?
Queue Name                                     Attributes
======================================================================
reply-mrg-qe-01.lab.eng.brq.redhat.com.4166.1  auto-del excl
topic-mrg-qe-01.lab.eng.brq.redhat.com.4166.1  auto-del excl
0
[root@mrg-qe-01 ~]# qpid-config add queue b3 --file-count=16 --file-size=24 --durable --cluster-durable ; echo $?
0
# ABOVE THREE LINES ARE BUGGY, expecting exception and exit code != 0
[root@mrg-qe-01 ~]# qpid-config queues ; echo $?
Queue Name                                     Attributes
======================================================================
reply-mrg-qe-01.lab.eng.brq.redhat.com.4178.1  auto-del excl
topic-mrg-qe-01.lab.eng.brq.redhat.com.4178.1  auto-del excl
0

Comment 1 Frantisek Reznicek 2009-08-20 10:11:50 UTC
One more aspect of the bug.

Once JERR_LFMGR_BADAEFNUMLIM exception is thrown (let's assume name 'b3' as above) then there is no chance to declare queue 'b3' until qpidd is restarted.

Let me know if I should raise separate BZ for this.

Comment 3 Kim van der Riet 2009-10-30 14:07:29 UTC
This was fixed in r.3525 for a similar bug (Bug 14568), and has been backported to the 1.1.x/1.2 branch.

A note on the comment above: JERR_LFMGR_BADAEFNUMLIM is thrown when auto-expand is enabled but the maximum number of expanded files allowed (which can be set as a parameter) is lower than the number of files that already exist or are being set.

The fix above disables autoexpand until this feature is complete, currently the I/O handling and core logic is in place, but there is still some peripheral work to complete.

Comment 4 Kim van der Riet 2009-10-30 14:08:23 UTC
Oops, the bug referenced above should be Bug 514568.

Comment 5 Frantisek Reznicek 2010-09-23 12:35:45 UTC
The behavior definitely changed, but I can currently see that ranges are not
checked, desribed as separate linked problem -> bug 636827.

Comment 6 Frantisek Reznicek 2010-09-27 10:04:58 UTC
The issue describes the JERR_LFMGR_BADAEFNUMLIM message store exception when trying to create queue with VALID durability parameters.

Validity range is 
  --file-count=4 ...64
  --file-size=1 ... 32768


The recent tests prove that:
1] JERR_LFMGR_BADAEFNUMLIM is not thrown
2] queue[s] are created

Although there is another issue touched in bug 636827 that corrent range need to be checked and user should get notified, this is addressed as separate bug 637751.


python-qmf-0.7.946106-13.el5
python-qpid-0.7.946106-14.el5
qmf-0.7.946106-17.el5
qmf-devel-0.7.946106-17.el5
qpid-cpp-*-0.7.946106-17.el5
qpid-dotnet-0.4.738274-2.el5
qpid-java-*-0.7.946106-10.el5
qpid-tools-0.7.946106-11.el5
ruby-qpid-0.7.946106-2.el5


-> VERIFIED

Comment 7 Kim van der Riet 2010-10-05 15:35:49 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:
Cuase: Some combinations of file size/number when creating queues through the python tools cause the broker to close the connection with JERR_LFMGR_BADAEFNUMLIM.

Consequence: Unpredictable behaviour when using the python tools to make larger than default stores.

Fix: Auto-expand is an incomplete feature in the store. It has parameters which were not printed in the help, but were still being processed in the parameter handling logic. These were interfering with the normal parameter handling for larger-than-default queue sizes. The auto-expand parameters were disabled until the feature is complete.

Result: Larger-than-default queue creation through the python tools works normally.

Comment 8 Douglas Silas 2010-10-05 17:51:04 UTC
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -1,7 +1 @@
-Cuase: Some combinations of file size/number when creating queues through the python tools cause the broker to close the connection with JERR_LFMGR_BADAEFNUMLIM.
+When creating queues using the Python tools, certain combinations of file size and number caused the broker to close the connection with an error code, resulting in unpredictable behavior when using the tools to make stores that were larger than default. Because it interfered with parameter-handling for queue sizes larger than the default, this update disables the incomplete auto-expand feature, with the result that queues with non-default sizes can successfully be created without error.-
-Consequence: Unpredictable behaviour when using the python tools to make larger than default stores.
-
-Fix: Auto-expand is an incomplete feature in the store. It has parameters which were not printed in the help, but were still being processed in the parameter handling logic. These were interfering with the normal parameter handling for larger-than-default queue sizes. The auto-expand parameters were disabled until the feature is complete.
-
-Result: Larger-than-default queue creation through the python tools works normally.

Comment 10 errata-xmlrpc 2010-10-14 15:57:29 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-0773.html


Note You need to log in before you can comment on or make changes to this bug.