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 ronaldoussoren
Recipients ned.deily, ronaldoussoren
Date 2015-12-22.12:57:09
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Content claims that getaddrinfo may deadlock when using threads and fork on (amongst others) OSX due to using a global lock.

That lock is used when getaddrinfo is believed to be not thread safe, see the relevant code below (from the blog post):

/* 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))

I think it is worthwhile to investigate whether or not getaddrinfo on OSX is really not thread safe. 

Some source code for OSX can be found at the link below, I haven't checked yet which OSX release this corresponds to:
Date User Action Args
2015-12-22 12:57:11ronaldoussorensetrecipients: + ronaldoussoren, ned.deily
2015-12-22 12:57:10ronaldoussorensetmessageid: <>
2015-12-22 12:57:10ronaldoussorenlinkissue25924 messages
2015-12-22 12:57:09ronaldoussorencreate