Alan Conway created QPID-5933:
---------------------------------
Summary: Python client infinite recursion if connection dropped
Key: QPID-5933
URL: https://issues.apache.org/jira/browse/QPID-5933
Project: Qpid
Issue Type: Bug
Components: Python Client
Affects Versions: 0.28
Reporter: Alan Conway
Assignee: Alan Conway
The python client goes into an infinite recursion if the connection is dropped
at the wrong moment. This script demonstrates:
====
import subprocess, qpid.messaging as qm, time
out = open("qpidd.log", "w")
broker = subprocess.Popen(["qpidd", "--auth=no"],
stdout=out, stderr=subprocess.STDOUT)
time.sleep(2)
c = qm.Connection.establish("0.0.0.0")
s = c.session()
broker.kill()
s.receiver("q")
====
The recursion looks like this;
File "/usr/local/lib/python2.6/site-packages/qpid/messaging/endpoints.py",
line 644, in receiver
receiver._ewait(lambda: receiver.linked)
File "/usr/local/lib/python2.6/site-packages/qpid/messaging/endpoints.py",
line 1010, in _ewait
result = self.session._ewait(lambda: self.error or predicate(), timeout)
File "/usr/local/lib/python2.6/site-packages/qpid/messaging/endpoints.py",
line 594, in _ewait
result = self.connection._ewait(lambda: self.error or predicate(), timeout)
File "/usr/local/lib/python2.6/site-packages/qpid/messaging/endpoints.py",
line 233, in _ewait
self.check_error()
File "/usr/local/lib/python2.6/site-packages/qpid/messaging/endpoints.py",
line 225, in check_error
self.close()
File "<string>", line 6, in close
File "/usr/local/lib/python2.6/site-packages/qpid/messaging/endpoints.py",
line 344, in close
ssn.close(timeout=timeout)
File "<string>", line 6, in close
File "/usr/local/lib/python2.6/site-packages/qpid/messaging/endpoints.py",
line 768, in close
self.sync(timeout=timeout)
File "<string>", line 6, in sync
File "/usr/local/lib/python2.6/site-packages/qpid/messaging/endpoints.py",
line 759, in sync
if not self._ewait(lambda: not self.outgoing and not self.acked,
timeout=timeout):
File "/usr/local/lib/python2.6/site-packages/qpid/messaging/endpoints.py",
line 594, in _ewait
result = self.connection._ewait(lambda: self.error or predicate(), timeout)
File "/usr/local/lib/python2.6/site-packages/qpid/messaging/endpoints.py",
line 233, in _ewait
self.check_error()
File "/usr/local/lib/python2.6/site-packages/qpid/messaging/endpoints.py",
line 225, in check_error
--
This message was sent by Atlassian JIRA
(v6.2#6252)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]