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 emptysquare
Recipients emptysquare, gvanrossum, martin.panter, ned.deily, python-dev, ronaldoussoren, yselivanov
Date 2016-02-22.03:33:11
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
In socketmodule.c we lock around getaddrinfo calls on platforms where getaddrinfo is believed not to be thread-safe. We've verified that it *is* thread-safe, and therefore stopped locking around it, on FreeBSD 5.3+ (#1288833) and Mac OS X 10.5+ (#25924). This ticket intends to do the same for OpenBSD and NetBSD.

OpenBSD 5.4 fixed getaddrinfo's thread safety and announced it 2013-11-01, "getaddrinfo(3) is now thread-safe":

NetBSD's fix is older and less publicized. Since ancient times NetBSD's getaddrinfo.c included a comment, "Thread safe-ness must be checked", and the getaddrinfo(3) man page had the same warning as other BSDs, "The implementation of getaddrinfo is not thread-safe." On 2004-05-27 Christos Zoulas committed with the comment "make yp stuff re-entrant", fixing obvious problems like static variables in getaddrinfo:

That change was released with NetBSD 3.0, and that alone might convince us to stop locking around getaddrinfo. Later, on 2006-07-18, between NetBSD 3 and 4, Zoulas deleted the comment "Thread safe-ness must be checked" from the source, with the message "Remove comments that do not reflect reality anymore":

The same day, he removed the man page warning:

NetBSD 4.0 was released 2007-12-19.
Date User Action Args
2016-02-22 03:33:13emptysquaresetrecipients: + emptysquare, gvanrossum, ronaldoussoren, ned.deily, python-dev, martin.panter, yselivanov
2016-02-22 03:33:13emptysquaresetmessageid: <>
2016-02-22 03:33:13emptysquarelinkissue26406 messages
2016-02-22 03:33:11emptysquarecreate