Juergen Kreileder wrote:
Chris Sacca <[EMAIL PROTECTED]> writes:
I think I've found what was causing the hang. It seems like between 0.4 and the cvs upstream changed how they handled timeouts going with threading in the current version. I've been havening trouble reproducing this regularly
Just put an IP address that will timeout in .pyzor/server or pull the network cable.
I'm by no means a python expert but after a quick look at the documentation for the thread module (which the threading module seems to be based on) I get the impression that the code simply can't work.
http://www.python.org/doc/2.4.1/lib/module-thread.html says
,---- | Caveats: | [...] | * Calling sys.exit() or raising the SystemExit exception is | equivalent to calling exit() `----
and thread.exit() just terminates the current thread.
I'm working around the problem by using os._exit(1) instead of sys.exit(1) for timeouts now. It's an ugly hack but it works for me.
Maybe you should revert the timeout handling back to the old SIGALRM code.
Thanks, I've come to the same conclusions myself. I'd like to think that upstream had a reason for using threading, but the old sigalarm stuff works, so I might as well just reimplement it. I'll try to get something into unstable early this week.
Thanks for the help,
Chris
signature.asc
Description: OpenPGP digital signature