Bug 620742 - Qpid starts with faulty value --num-jfiles 1
Summary: Qpid starts with faulty value --num-jfiles 1
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: qpid-cpp
Version: Development
Hardware: All
OS: Linux
low
high
Target Milestone: 1.3.2-RC2
: ---
Assignee: Kim van der Riet
QA Contact: ppecka
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-08-03 11:46 UTC by ppecka
Modified: 2011-08-12 16:21 UTC (History)
5 users (show)

Fixed In Version: qpid-cpp-mrg-0.7.946106-27
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-07-05 14:21:58 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
reproducer (4.00 KB, application/x-shellscript)
2010-08-12 12:22 UTC, ppecka
no flags Details

Description ppecka 2010-08-03 11:46:54 UTC
Description of problem:
Qpid starts with faulty value --num-jfiles 1 , where allowed range should be within <4,64>

Version-Release number of selected component (if applicable):
python-qpid-0.7.946106-4.el5
qpid-cpp-client-0.7.946106-8.el5
qpid-cpp-client-devel-0.7.946106-8.el5
qpid-cpp-client-devel-docs-0.7.946106-8.el5
qpid-cpp-client-ssl-0.7.946106-8.el5
qpid-cpp-mrg-debuginfo-0.7.946106-8.el5
qpid-cpp-server-0.7.946106-8.el5
qpid-cpp-server-cluster-0.7.946106-8.el5
qpid-cpp-server-devel-0.7.946106-8.el5
qpid-cpp-server-ssl-0.7.946106-8.el5
qpid-cpp-server-store-0.7.946106-8.el5
qpid-cpp-server-xml-0.7.946106-8.el5
qpid-java-client-0.7.946106-5.el5
qpid-java-common-0.7.946106-5.el5
qpid-tests-0.7.946106-1.el5
qpid-tools-0.7.946106-6.el5


How reproducible:
often

Steps to Reproduce:
1. mkdir -p /tmp/qpidd.9518
2.qpidd -d --log-enable debug+ --log-to-stdout no --log-to-stderr no --log-to-file /tmp/qpidd.9518/qpidd_0.log --data-dir /tmp/qpidd.9518 --auth no --num-jfiles 1 --jfile-size-pgs 10 --port 0

  
Actual results:
info No message store configured, persistence is disabled.


Expected results:
should fail to start

Additional info:

Comment 1 Kim van der Riet 2010-08-03 15:15:28 UTC
This is not a bug.

Starting the broker with:

./qpidd --auth no --load-module /root/store/lib/.libs/msgstore.so --data-dir /tmp/qpid --log-enable info+ --num-jfiles 1

I see the following in the log:

2010-08-03 11:04:02 info Loaded Module: /root/store/lib/.libs/msgstore.so
2010-08-03 11:04:02 info No message store configured, persistence is disabled.
2010-08-03 11:04:02 info Management enabled
2010-08-03 11:04:02 warning parameter num-jfiles (1) is below allowable minimum (4); changing this parameter to minimum value.
2010-08-03 11:04:02 notice Journal "TplStore": Created
2010-08-03 11:04:02 notice Store module initialized; store-dir=/tmp/qpid

a) The store is presumably loading in your test case because the config file in /etc/qpidd.conf has it listed, even if the command-line does not name the store. If the --no-module-dir is added, then no modules would load except those on the command-line, and the broker would fail because of an unknown option. If the "Loaded Module: ...msgstore.so" line appears in the log, the store is loaded.

b) The message from the null message store (No message store configured, persistence is disabled) occurs whether or not the store is loaded. This is a bit confusing, I agree, but results from the fact that the null message store must be loaded first.

c) The log contains a warning that the number of files has been increased to the minimum value. This is normal behaviour for the async store. Similar behaviour would occur for larger than legal sizes for both store size and number of files.

I'll set a NEEDINFO on this, can you verify the above? If this is as described, please close with NOTABUG.

Comment 2 ppecka 2010-08-12 12:22:29 UTC
Created attachment 438421 [details]
reproducer

uses freznice clients

Comment 3 ppecka 2010-08-12 12:45:41 UTC
(In reply to comment #1)
i apologize for confusion, please see my "reproducer" (as attach of #c2 ) 


when i re-starting qpidd with very same params, with --num-jfiles 1, i'm getting:

Daemon startup failed: Queue q_0: recoverQueues() failed: jexception 0x0c00 jinf::validate() threw JERR_JINF_CVALIDFAIL: Journal compatibility validation failure. (File "/tmp/qpidd.3887/rhm/jrnl/0003/q_0//JournalData.jinf": Number of journal files too small: found=1; minimum=4
) (MessageStoreImpl.cpp:790)
2010-08-12 07:59:28 critical Unexpected error: Removing stale lock file /root/.qpidd/qpidd.39693.pid




==quote comment 1==
> 
> c) The log contains a warning that the number of files has been increased to
> the minimum value. This is normal behaviour for the async store. Similar
> behaviour would occur for larger than legal sizes for both store size and
> number of files.
> 
> I'll set a NEEDINFO on this, can you verify the above? If this is as described,
> please close with NOTABUG.    
==cut==

Until now behaviour of qpidd in situations when it was given invalid parametr value - it won't start then until all the vales were correct. Can you please point me to documentation where it says about qpidd behaviour in such situations?( i can't find it there )

Comment 4 Kim van der Riet 2010-08-12 20:03:56 UTC
Good catch.

I was not able to reproduce this exactly, but I was able to core the broker when running qc_queue.py using a parameter of --queue-jrnl-file-cnt=1. This is sending journal geometry parameters to the broker at the time of queue creation, and these parameters were not being checked for limits.

Fixed in r.4205

Comment 6 Kim van der Riet 2010-08-16 11:55:15 UTC
This is a debatable point, and there have been some discussions on it:

1. Each module handles its own options. The broker relies on the module to fail if it does not like an option.

2. The broker uses a fail-fast philosophy in which the smallest misconfiguration results in a failure to start.

3. The store uses a more adaptive approach which tries to use logic to try to understand what the user intended and make the appropriate choice if an option is bad or out-of-range. The change is logged, but the module loads.

4. These two approaches are not consistent with each other, and as you correctly point out, should at least be noted in the documentation.

I have created documentation bug 624416 which suggests additional sections to explain this behaviour.

This behaviour will not change for 1.3, although it is certainly trivial to defeat if it is deemed necessary for a later release.

Comment 8 Kim van der Riet 2011-01-21 12:43:46 UTC
This bug _may_ be a dup of Bug 636827. Alternatively, the fix for this bug happens to also solve the issue in that bug also.

Comment 9 Mike Cressman 2011-01-24 14:59:42 UTC
Included in build for 1.3.2 RC 2.

Comment 11 ppecka 2011-02-11 12:52:27 UTC
Verified on rhel 5.6 / 4.8 both i386 / x86_64


python-qpid-0.7.946106-15.el5
qpid-cpp-client-0.7.946106-27.el5
qpid-cpp-client-devel-0.7.946106-27.el5
qpid-cpp-client-devel-docs-0.7.946106-27.el5
qpid-cpp-client-ssl-0.7.946106-27.el5
qpid-cpp-mrg-debuginfo-0.7.946106-27.el5
qpid-cpp-server-0.7.946106-27.el5
qpid-cpp-server-cluster-0.7.946106-27.el5
qpid-cpp-server-devel-0.7.946106-27.el5
qpid-cpp-server-ssl-0.7.946106-27.el5
qpid-cpp-server-store-0.7.946106-27.el5
qpid-cpp-server-xml-0.7.946106-27.el5
qpid-java-client-0.7.946106-15.el5
qpid-java-common-0.7.946106-15.el5
qpid-java-example-0.7.946106-15.el5
qpid-tests-0.7.946106-1.el5
qpid-tools-0.7.946106-12.el5

--> VERIFIED


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