Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 589908 - QMF python console: list index out of range FAILURE
Summary: QMF python console: list index out of range FAILURE
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: qpid-qmf
Version: Development
Hardware: All
OS: Linux
urgent
urgent
Target Milestone: 1.3
: ---
Assignee: Ted Ross
QA Contact: Jan Sarenik
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-05-07 09:21 UTC by Jan Sarenik
Modified: 2011-08-12 16:02 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-08-05 08:53:55 UTC
Target Upstream Version:


Attachments (Terms of Use)
C++ QMF agent with Python test (deleted)
2010-05-07 09:21 UTC, Jan Sarenik
no flags Details
C++ QMF agent with Python test in a loop (deleted)
2010-07-08 07:53 UTC, Jan Sarenik
no flags Details
C++ QMF agent with a fixed Python test in a loop (deleted)
2010-07-08 08:47 UTC, Jan Sarenik
no flags Details

Description Jan Sarenik 2010-05-07 09:21:41 UTC
Created attachment 412274 [details]
C++ QMF agent with Python test

While testing bug 547519, I found this strange behavior:

Traceback (most recent call last):
  File "<stdin>", line 5, in ?
IndexError: list index out of range
FAILURE

Version-Release number of selected component (if applicable):
  python-qpid-0.7.938298-1.el5
  qpid-cpp-server-0.7.939184-1.el5

Very easily reproducible:
1. run qpidd
2. run 'while perftest; do :; done' in one terminal (this is not vital)
3. run 'while ./runtest.sh; do :; done' in qmf-agent-20100507 directory
   in another terminal
  
Actual results:
  IndexError: list index out of range

Expected results (it appears, but it should appear ALWAYS):
  {u'second': 34, u'map-data': {u'numeric-data': 10000, u'string-data': 'Text'}, u'first': 'String data'}

Comment 1 Jan Sarenik 2010-06-25 08:58:17 UTC
On python-qpid-0.7.946106-2.el5 I am getting this error on _every_
run instead of occasionally. Raising priority.

Comment 2 Jan Sarenik 2010-06-25 08:58:51 UTC
See TCMS https://tcms.engineering.redhat.com/case/47650/?from_plan=2216

Comment 3 Jan Sarenik 2010-06-25 12:46:21 UTC
Strangely enough, on RHEL6, python-qmf-0.7.946106-4.el6.noarch
it ends with same error only ocassionally.

Comment 4 Jan Sarenik 2010-07-08 07:04:42 UTC
I am retesting this with python-qpid-0.7.946106-4.el5 now and everything
seems to be working, running in a loop of one thousand runs, will get
back with results soon.

Comment 5 Jan Sarenik 2010-07-08 07:52:32 UTC
So the problem is that 17 out of 1000 runs ended with following:

--------------------------------------------------------------------------
{u'second': 34, u'map-data': {u'numeric-data': 10000, u'string-data': 'Text'}, u'first': 'String data'}
Exception in thread Thread for broker: localhost:5672 (most likely raised during interpreter shutdown):
Traceback (most recent call last):
  File "/usr/lib64/python2.4/threading.py", line 442, in __bootstrap
  File "/usr/lib/python2.4/site-packages/qmf/console.py", line 2539, in run
  File "/usr/lib64/python2.4/Queue.py", line 125, in get
exceptions.TypeError: 'NoneType' object is not callable
Unhandled exception in thread started by 
Error in sys.excepthook:

Original exception was:
--------------------------------------------------------------------------

The rest ended merely with the first line,
{u'second': 34, u'map-data': {u'numeric-data': 10000, u'string-data': 'Text'}, u'first': 'String data'}

Everything was performed on RHN-up-to-date RHEL5 x86_64 with
qpid-cpp-server-0.7.946106-6.el5 running with --auth=no.
python-qpid-0.7.946106-4.el5

Comment 6 Jan Sarenik 2010-07-08 07:53:46 UTC
Created attachment 430267 [details]
C++ QMF agent with Python test in a loop

This is the reproducer I used.

Comment 7 Gordon Sim 2010-07-08 08:00:55 UTC
I believe you can avoid that by calling s.delBroker(b) at the end of the python script.

Comment 8 Jan Sarenik 2010-07-08 08:05:35 UTC
Thank you, Gordon. This way the only remaining problem is cleared out
and I will now focus on verifying this bug on all the supported systems.

Comment 9 Jan Sarenik 2010-07-08 08:47:27 UTC
Created attachment 430270 [details]
C++ QMF agent with a fixed Python test in a loop

Verified on RHEL5 x86_64
  qpid-cpp-server-0.7.946106-6.el5
  python-qpid-0.7.946106-4.el5
  python-qmf-0.7.946106-5.el5

Comment 10 Jan Sarenik 2010-07-08 09:26:42 UTC
Oh no, sorry, it is not working on i386.
------------------------------------------
Traceback (most recent call last):
  File "<stdin>", line 5, in ?
IndexError: list index out of range
------------------------------------------

RHEL5.5 i386
qmf-devel-0.7.946106-6.el5
python-qmf-0.7.946106-5.el5
python-qpid-0.7.946106-4.el5
qpid-cpp-server-0.7.946106-6.el5

Putting back to ASSIGNED.

Comment 11 Jan Sarenik 2010-08-05 08:47:55 UTC
Excuse me, this is rather error on the side of program I use.
It should first check if the list contains the element it
wants to read. Is this assumption right?

-------------------------------------------
from qmf.console import Session
s = Session()
b = s.addBroker()
parents = s.getObjects(_class="parent")
# check should go here
print parents[0].args
s.delBroker(b)
-------------------------------------------


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