A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2002-September/028809.html below:

mysterious hangs in socket code

[Python-Dev] Re: Re: mysterious hangs in socket code [Python-Dev] Re: Re: mysterious hangs in socket codeMartin v. Loewis martin@v.loewis.de
21 Sep 2002 00:38:18 +0200
Mats Wichmann <mats@laplaza.org> writes:

>  >I think that part is already settled: getaddrinfo, on Linux, is
>  >thread-safe.
> 
> The latest Posix/Single UNIX spec in fact require getaddrinfo
> (and getnameinfo) to be thread-safe.

Yes, but this doesn't stop *BSD from providing a getaddrinfo
implementation that is not thread-safe - they merely document that
limitation on the man page.

> Gives me a headache, too, especially once it vectors off into
> the glibc nss code.  These routines (__gethostbyname2_r is the
> likely suspect, __gethostbyaddr_r and __getservbyname_r might
> also get called) do have paths that could twiddle a glibc internal
> lock so it's not impossible there's an issue here, although at
> something less than a term-paper-depth look it doesn't SEEM like
> it should ever be able to block for very long.

I'd recommend to use strace for further analysis, perhaps using it's
-r option.

Regards,
Martin




RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4