[zope2-tracker] [Bug 143357] Re: zeopack.py / ClientStorage.py: deadlock on non existent storage
Jean Jordaan
jean.jordaan at gmail.com
Wed Jun 3 07:54:35 EDT 2009
Here's a different angle on the same issue:
I'm trying to make zeopack fail without hanging when faced by a ZEO
server it can't talk to.
I set wait_timeout in the pack2 function in zeopack.py:
cs = ClientStorage(addr, storage=storage, wait=1, wait_timeout=3, read_only=1)
However, this has no effect because in ClientStorage._wait, the call to
'self._rpc_mgr.connect(sync=1)' hangs before the timeout 'while' loop is
entered.
I'm looking at
Zope-2.10.5-final/lib/python/ZEO/ClientStorage.py
but the code is the same in Zope-2.11.3-final
This is what a failing zeopack run looks like:
zope at redacted:/home/zope/instances/plone-2.5/client2$
PYTHONPATH=/home/zope/Zope-2.10.5-final/lib/python/
/home/zope/Zope-2.10.5-final/bin/zeopack.py -p 9030 -S 1
ERROR:ZEO.zrpc.Connection(C):(redacted:9030) bad handshake 'Z201'
ERROR:ZEO.zrpc.Connection(C):(redacted:9030) Error caught in asyncore
Traceback (most recent call last):
File "/home/zope/Python-2.4.4/lib/python2.4/asyncore.py", line 69, in read
obj.handle_read_event()
File "/home/zope/Python-2.4.4/lib/python2.4/asyncore.py", line 391, in handle_read_event
self.handle_read()
File "/home/zope/Zope-2.10.5-final/lib/python/ZEO/zrpc/smac.py", line 219, in handle_read
self.message_input(msg)
File "/home/zope/Zope-2.10.5-final/lib/python/ZEO/zrpc/connection.py", line 903, in recv_handshake
Connection.recv_handshake(self, proto)
File "/home/zope/Zope-2.10.5-final/lib/python/ZEO/zrpc/connection.py", line 489, in recv_handshake
raise ZRPCError("bad handshake %r" % proto)
ZRPCError: bad handshake 'Z201'
ERROR:ZEO.zrpc:(23263) CW: error in testConnection (('redacted', 9030))
Traceback (most recent call last):
File "/home/zope/Zope-2.10.5-final/lib/python/ZEO/zrpc/client.py", line 454, in test_connection
self.preferred = self.client.testConnection(self.conn)
File "/home/zope/Zope-2.10.5-final/lib/python/ZEO/ClientStorage.py", line 430, in testConnection
auth = stub.getAuthProtocol()
File "/home/zope/Zope-2.10.5-final/lib/python/ZEO/ServerStub.py", line 89, in getAuthProtocol
return self.rpc.call('getAuthProtocol')
File "/home/zope/Zope-2.10.5-final/lib/python/ZEO/zrpc/connection.py", line 639, in call
raise DisconnectedError()
DisconnectedError
This loops forever.
--
zeopack.py / ClientStorage.py: deadlock on non existent storage
https://bugs.launchpad.net/bugs/143357
You received this bug notification because you are a member of Zope 2
Developers, which is subscribed to Zope 2.
More information about the zope2-tracker
mailing list