
This issue trackerhas been migrated toGitHub, and is currentlyread-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.
Created on2016-02-22 03:33 byemptysquare, last changed2022-04-11 14:58 byadmin. This issue is nowclosed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| 26406-getaddrinfo-netbsd-openbsd.patch | emptysquare,2016-02-22 03:40 | review | ||
| Messages (5) | |||
|---|---|---|---|
| msg260655 -(view) | Author: A. Jesse Jiryu Davis (emptysquare)* | Date: 2016-02-22 03:33 | |
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.htmlNetBSD'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=MAINThat 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=MAINThe 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=MAINNetBSD 4.0 was released 2007-12-19. | |||
| msg260657 -(view) | Author: A. Jesse Jiryu Davis (emptysquare)* | Date: 2016-02-22 03:40 | |
Patch uploaded.I've copied the "nosy" list from#25924, if that was bad etiquette please forgive me. | |||
| msg260726 -(view) | Author: Roundup Robot (python-dev)![]() | Date: 2016-02-23 11:10 | |
New changeset52a8c1965750 by Ned Deily in branch '2.7':Issue#26406: Avoid unnecessary serialization of getaddrinfo(3) calls onhttps://hg.python.org/cpython/rev/52a8c1965750New changeset419d20551d26 by Ned Deily in branch '3.5':Issue#26406: Avoid unnecessary serialization of getaddrinfo(3) calls onhttps://hg.python.org/cpython/rev/419d20551d26New changeset5ffebeb3e91d by Ned Deily in branch 'default':Issue#26406: merge from 3.5https://hg.python.org/cpython/rev/5ffebeb3e91d | |||
| msg260727 -(view) | Author: Ned Deily (ned.deily)*![]() | Date: 2016-02-23 11:15 | |
Thanks for the additional patch, Jesse. Since we don't have a NetBSD buildbot and I don't have any NetBSD or OpenBSD systems at hand to do any testing, I'll take your word for the version checks. If anyone runs into any problems because of these changes, feel free to re-open this issue. Pushed for release in 2.7.12, 3.5.2, and 3.6.0. | |||
| msg260730 -(view) | Author: A. Jesse Jiryu Davis (emptysquare)* | Date: 2016-02-23 13:27 | |
Thank you! | |||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:58:27 | admin | set | github: 70594 |
| 2016-02-23 13:27:11 | emptysquare | set | messages: +msg260730 |
| 2016-02-23 11:15:30 | ned.deily | set | status: open -> closed resolution: fixed messages: +msg260727 stage: resolved |
| 2016-02-23 11:10:55 | python-dev | set | messages: +msg260726 |
| 2016-02-22 03:40:19 | emptysquare | set | files: +26406-getaddrinfo-netbsd-openbsd.patch keywords: +patch messages: +msg260657 |
| 2016-02-22 03:33:13 | emptysquare | create | |