[ZODB-Dev] [ zodb-Bugs-640376 ] clientstorage hangs on failed connect

noreply@sourceforge.net noreply@sourceforge.net
Tue, 19 Nov 2002 17:43:36 -0800


Bugs item #640376, was opened at 2002-11-18 18:09
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=115628&aid=640376&group_id=15628

Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Jeremy Hylton (jhylton)
>Assigned to: Jeremy Hylton (jhylton)
Summary: clientstorage hangs on failed connect

Initial Comment:
I tried to use the zeoup script to test a server I knew
did not exist.  I thought this would be a good test
that the script does something useful in the face of
failures.  (I tried connecting to www.zope.com, 9001.)

If zeoup.py passes wait=0 to the ClientStorage
constructor, the constructor never returns.  There's an
XXX comment in ZEO.zrpc.client that says if the server
never connects or fails, we wait forever.  It looks
like we're waiting forever.  I think we need to do
something smarter for a case where the server is never
going to respond.

Also, it's impossible to use Ctrl-C to interrupt
zeoup.py when this happens.  It looks like the main
thread is stuck in an Event.wait() call.


----------------------------------------------------------------------

>Comment By: Guido van Rossum (gvanrossum)
Date: 2002-11-19 20:43

Message:
Logged In: YES 
user_id=6380

> If zeoup.py passes wait=0 to the ClientStorage
> constructor, the constructor never returns.

Don't you mean wait=1? That's what it passes. With wait=0,
the constructor returns quickly, but then the first call
that tries to use the storage hangs forever.

I'm not sure what we can do about the wait=1 case.  This
means to wait until the storage comes up; the assumption
here is that the storage may be down, and that it may take a
long time before it comes up.

The Ctrl-C will take some time to debug. Do you want me to
spend time doing that?


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=115628&aid=640376&group_id=15628