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 | trent |
|---|---|
| Recipients | trent |
| Date | 2008年04月04日.15:57:30 |
| SpamBayes Score | 0.10594606 |
| Marked as misclassified | No |
| Message-id | <1207324680.68.0.575928167509.issue2550@psf.upfronthosting.co.za> |
| In-reply-to |
| Content | |
|---|---|
Background: I came across this issue when trying to track down why test_asynchat would periodically wedge python processes on the Windows buildbots, to the point that they wouldn't even respond to SIGKILL (or ctrl-c on the console). What I found after a bit of digging is that Windows doesn't raise EADDRINUSE socket.errors when you bind() two sockets to identical host/ports *IFF* SO_REUSEADDR has been set as a socket option. Decided to brighten up my tube journey into work this morning by reading the Gospel's take on the situation. As per the 'SO_REUSEADDR and SO_REUSEPORT Socket Options' section in chapter 7.5 of Stevens' UNIX Network Programming Volume 1 (2nd Ed): "With TCP, we are never able to start multiple servers that bind the same IP address and same port: a completely duplicate binding. That is, we cannot start one server that binds 198.69.10.2 port 80 and start another that also binds 198.69.10.2 port 80, even if we set the SO_REUSEADDR socket option for the second server." So, it seems at least Windows isn't adhering to this, at least on XP and Server 2008 with 2.5-2.6. I've patched test_socket.py to explicitly test for this situation -- as expected, it passes on Unix (tested on FreeBSD in particular), and fails on Windows. I'd like to commit this to trunk to see if any of the buildbots for different platforms match the behaviour of Windows. |
|
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2008年04月04日 15:58:00 | trent | set | spambayes_score: 0.105946 -> 0.10594606 recipients: + trent |
| 2008年04月04日 15:58:00 | trent | set | spambayes_score: 0.105946 -> 0.105946 messageid: <1207324680.68.0.575928167509.issue2550@psf.upfronthosting.co.za> |
| 2008年04月04日 15:57:33 | trent | link | issue2550 messages |
| 2008年04月04日 15:57:32 | trent | create | |