[ZCM] [ZC] 1737/ 1 Request "zeopack.py / ClientStorage.py: deadlock
on non existent storage"
Collector: Zope Bugs, Features,
and Patches ...
zope-coders-admin at zope.org
Thu Mar 24 05:47:48 EST 2005
Issue #1737 Update (Request) "zeopack.py / ClientStorage.py: deadlock on non existent storage"
Status Pending, Zope/bug+solution low
To followup, visit:
http://www.zope.org/Collectors/Zope/1737
==============================================================
= Request - Entry #1 by Anonymous User on Mar 24, 2005 5:47 am
Hello,
I try to pack my storages at zeo with the zeopack.py command per cronjob.
Example:
> zeopack.py -h localhost -S 1 -p 9999 -d 30
If I try inadvertently to pack an non existent storage like "2" for example, the
zeopack.py doesn't return an error. Instead of returning an error, it retries to connect the storage over and over again. The script has to be stopped manually. This effect isn't very practical for cron jobs.
Debug results:
> ./zeopack.py -h localhost -S 2 -p 9999 -d 30
------
2005-03-24T11:37:23 INFO(0) ZCS:22023 ClientStorage (pid=22023) created RO/normal for storage: '2'
------
2005-03-24T11:37:23 INFO(0) ZEC:2-None-0 ClientCache: storage='2', size=20971520; file[0]='2-None-0'
------
2005-03-24T11:37:23 INFO(0) ZCS:22023 Testing connection <ManagedConnection ('192.168.3.197', 9999)>
------
2005-03-24T11:37:23 INFO(0) zrpc-conn:localhost:9999 received handshake 'Z201'
------
2005-03-24T11:37:23 INFO(0) ZCS:22023 Server authentication protocol None
------
2005-03-24T11:37:23 ERROR(200) zrpc:22023 CW: error in testConnection (('localhost', 9999))
Traceback (most recent call last):
File "/usr/lib/zope2.7/lib/python/ZEO/zrpc/client.py", line 482, in test_connection
self.preferred = self.client.testConnection(self.conn)
File "/usr/lib/zope2.7/lib/python/ZEO/ClientStorage.py", line 469, in testConnection
stub.register(str(self._storage), self._is_read_only)
File "/usr/lib/zope2.7/lib/python/ZEO/ServerStub.py", line 47, in register
self.rpc.call('register', storage_name, read_only)
File "/usr/lib/zope2.7/lib/python/ZEO/zrpc/connection.py", line 375, in call
raise inst # error raised by server
ValueError: unknown storage: 2
Solution:
The testConnection routine of ClientStorage class should also consider the
"ValueError: unknown storage" to break the deadlock.
Best regards
A. Gabriel
==============================================================
More information about the Zope-Collector-Monitor
mailing list