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 <1456111993.44.0.164668159059.issue26406@psf.upfronthosting.co.za>
In-reply-to
Content
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":

http://www.openbsd.org/plus54.html

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:

http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libc/net/getaddrinfo.c.diff?r1=1.71&r2=1.72&only_with_tag=MAIN

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":

http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libc/net/getaddrinfo.c.diff?r1=1.82&r2=1.83&only_with_tag=MAIN

The same day, he removed the man page warning:

http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libc/net/getaddrinfo.3.diff?r1=1.43&r2=1.44&only_with_tag=MAIN

NetBSD 4.0 was released 2007-12-19.
History
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: <1456111993.44.0.164668159059.issue26406@psf.upfronthosting.co.za>
2016-02-22 03:33:13emptysquarelinkissue26406 messages
2016-02-22 03:33:11emptysquarecreate