Bug 609035 - Threading exception when running multiple python clients in parallel
Threading exception when running multiple python clients in parallel
Status: CLOSED DUPLICATE of bug 547295
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: python-qpid (Show other bugs)
Development
All Linux
high Severity high
: 1.3
: ---
Assigned To: messaging-bugs
MRG Quality Engineering
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-06-29 05:10 EDT by Jiri Kolar
Modified: 2010-07-02 07:54 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-07-02 07:54:19 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jiri Kolar 2010-06-29 05:10:45 EDT
Description of problem:
this exception randomly appear when using qpid-config or any other qpid clients:

Exception in thread Thread for broker: 127.0.0.1:9305 (most likely raised during interpreter shutdown):
Traceback (most recent call last):
  File "/usr/lib/python2.4/threading.py", line 442, in __bootstrap
  File "/usr/lib/python2.4/site-packages/qmf/console.py", line 2536, in run
  File "/usr/lib/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:
Exception in thread Thread for broker: 127.0.0.1:23669 (most likely raised during interpreter shutdown):
Traceback (most recent call last):
  File "/usr/lib/python2.4/threading.py", line 442, in __bootstrap
  File "/usr/lib/python2.4/site-packages/qmf/console.py", line 2536, in run
  File "/usr/lib/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:


Version-Release number of selected component (if applicable):
both python-qpid-0.7.938298-1 (current stable)
and python-qpid-0.7.946106-2 

How reproducible:
ocasionaly 

Steps to Reproduce:
1.run multiple python clients (for example qpid-config) in parallel and repeat in a loop
2.
3.
  
Actual results:
Exception occur

Expected results:
No exception

Additional info:

I personlly have seen this only on i386 , but might appear on x86_64 as well
Comment 1 Frantisek Reznicek 2010-06-29 10:50:43 EDT
This is also very easily seen by looping qpid-stat -b on a cluster node:


Brokers
  broker            cluster           uptime     conn  sess  exch  queue
  ========================================================================
  10.34.33.62:5672  fcluster(ACTIVE)  2h 2m 6s      7     4     8    60
  10.34.33.63:5672  fcluster(ACTIVE)  2h 1m 26s     3     3     8    50
  10.34.33.64:5672  fcluster(ACTIVE)  2h 1m 35s     2     2     8    50
  10.34.33.65:5672  fcluster(ACTIVE)  2h 1m 34s     2     2     8    55
Exception in thread Thread for broker: 10.34.33.65: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 2536, 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:


Tested on RHEL 5.5 x86_64 and python-qpid-0.7.946106-3.el5, python-qmf-0.7.946106-4.el5


Repro:
while true; do for i in 09 10 11 12; do qpid-cluster mrg-qe-${i} ; qpid-stat -b mrg-qe-${i}; done done

I raised prio and severity to high/high, feel free to change if you disagree.
Comment 2 Gordon Sim 2010-06-30 05:46:29 EDT
The qpid-stat against a cluster case is easily reproducible and the cause is obvious. In the case of a clustered broker it adds connections for each address in the known list but does not close these down on BrokerManager.disconnect().

The following fixes this specific case:

Index: tools/src/py/qpid-stat
===================================================================
--- tools/src/py/qpid-stat	(revision 959242)
+++ tools/src/py/qpid-stat	(working copy)
@@ -161,6 +161,7 @@
     def Disconnect(self):
         if self.broker:
             self.qmf.delBroker(self.broker)
+        for b in self.brokers: self.qmf.delBroker(b.broker)
 
     def _getCluster(self):
         packages = self.qmf.getPackages()

I can't reproduce the exception with qpid-config.
Comment 3 Jiri Kolar 2010-07-02 07:45:55 EDT
I am sorry , i checked and it was qpid-stat not qpid-config.
Comment 4 Gordon Sim 2010-07-02 07:54:19 EDT

*** This bug has been marked as a duplicate of bug 547295 ***

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