[Python-Dev] mysterious hangs in socket code
Barry A. Warsaw
Tue, 3 Sep 2002 21:35:27 -0400
>>>>> "JH" == Jeremy Hylton <email@example.com> writes:
JH> I've been running a small, multi-threaded program to retrieve
JH> web pages today. The entire program appears to hang when I
JH> perform a slow DNS operation, even there is no
JH> application-level coordinate between the threads.
Does strace'ing the program provide any clues? Also, if it's a DNS
thing, you should definitely try to run it on different networks (or
at least pointing to different DNS servers).
Ok, running it now as "strace python foo.py" (Py2.2.1) and I see
similar behavior. It seems to mostly be sitting in select() calls and
rt_sigsuspend() which I guess is a wrapper around sigsuspend(). When
I use Python 2.1.3 I never see it sit in sigsuspend().