This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Julien.Palard
Recipients Julien.Palard
Date 2014-04-14.17:21:43
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
I just found that python consider linux implementation of getaddrinfo thread safe :


/* On systems on which getaddrinfo() is believed to not be thread-safe,                                                                                                                                                             
   (this includes the getaddrinfo emulation) protect access with a lock. */
#if defined(WITH_THREAD) && (defined(__APPLE__) || \
    (defined(__FreeBSD__) && __FreeBSD_version+0 < 503000) || \
    defined(__OpenBSD__) || defined(__NetBSD__) || \
    defined(__VMS) || !defined(HAVE_GETADDRINFO))

Badly, it's wrong on my version of linux, and maybe others :

So for me, looping in three threads on getaddrinfo leads me to a rapid deadlock, while reading on a NETLINK socket, after another thread wrote a DNS query on it and trying to get a response on it.

It may only be reproductible when your getaddrinfo use a NETLINK to get informations about your interfaces before doing the DNS query.
Date User Action Args
2014-04-14 17:21:43Julien.Palardsetrecipients: + Julien.Palard
2014-04-14 17:21:43Julien.Palardsetmessageid: <>
2014-04-14 17:21:43Julien.Palardlinkissue21216 messages
2014-04-14 17:21:43Julien.Palardcreate