Threading problems with httplib
Aahz
aahz at pythoncraft.com
Sun May 11 11:57:07 EDT 2003
[posted & e-mailed]
In article <mailman.1052655257.19295.python-list at python.org>,
David Fendrich <david at aitellu.com> wrote:
>
>Hypothesis:
>I think that the problem is related to this:
>http://mail.python.org/pipermail/python-dev/2002-September/028555.html
>("mysterious hangs in socket code")
>Does anybody know if that issue was ever resolved.
>I think that httplib (which is used by both urllib and robotparser) is
>not thread safe (because I sporadically and non-deterministically get
>funny error messages from deep inside the code when I don't surround
>those calls with try/except) and that it locks the GIL around code
>which is idle and waiting to timeout. According to the post mentioned
>above, it might be a problem specific to linux and DNS-resolution.
Yup, you're probably right. Although there never was a specific fix to
this problem AFAIK, there were some changes made for 2.3 due to other
problems. I'd suggest trying 2.3b1, and if that doesn't fix the
problem, please file a bug report on SF and post to python-dev.
--
Aahz (aahz at pythoncraft.com) <*> http://www.pythoncraft.com/
"In many ways, it's a dull language, borrowing solid old concepts from
many other languages & styles: boring syntax, unsurprising semantics,
few automatic coercions, etc etc. But that's one of the things I like
about it." --Tim Peters on Python, 16 Sep 93
More information about the Python-list
mailing list