New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test_multiprocessing: test_listener_client flakiness #47520
Comments
Per mail thread: Attached is the patch to connection.py to drop the fqdn call. Final suggestion from Trent:
Indeed.
Agreed again. I believe what we're dealing with here though is a lack I believe the problems we've run into stem from the fact that the API How do I connect to an AF_INET Listener (i.e. SocketListener) instance So, for now, I think we should enforce this invariant by raising an |
The connection patch was applied r64961 |
I made a mistake and reverted r64961 - self._address is used pretty |
Hello. I also experienced test_multiprocessing hang on win2k and I Index: Lib/multiprocessing/connection.py --- Lib/multiprocessing/connection.py (revision 65551)
+++ Lib/multiprocessing/connection.py (working copy)
@@ -217,7 +217,12 @@
self._socket.listen(backlog)
address = self._socket.getsockname()
if type(address) is tuple:
- address = (socket.getfqdn(address[0]),) + address[1:]
+ def getfqdn(s): # ???
+ if s == '127.0.0.1':
+ return 'localhost'
+ else:
+ return socket.getfqdn(s)
+ address = (getfqdn(address[0]),) + address[1:]
self._address = address
self._family = family
self._last_accepted = None I'm not familiar to socket, so probably this info is useless. ;-) |
Jesse, thanks for capturing my e-mail thread in this issue. Can you This would mean raising an exception in Listener.__init__ if this |
If I understand the suggestion correctly, it would forbid people to IMO, the "FQDN removal patch" as uploaded by Jesse is simple and |
Unfortunately, the patch while simple, is too simple. The removal of the |
Selon Jesse Noller <report@bugs.python.org>:
I don't understand what you mean. The patch you uploaded doesn't remove the |
Hmm. Then that was a mistake on my part: it's entirely possible the |
Trent/Antoine - I'm stuck on the fence about this. Per trent's own However - to Antoine's point - using 0.0.0.0 to listen on "all Attached is a cleaned up diff of the removal of the fqdn call - this I need someone with a windows machine (Hi Trent!) that exposed the |
I confirmed this patch works on my win2000. |
I've removed the fqdn call per the patch as of r65641 Lowering this to an enhancement to consider the removal of the 0.0.0.0 |
I can confirm the patch works in Windows. Regarding the 0.0.0.0 issue, % svn diff connection.py --- connection.py (revision 65645)
+++ connection.py (working copy)
@@ -217,6 +217,8 @@
self._socket.bind(address)
self._socket.listen(backlog)
self._address = self._socket.getsockname()
+ if self._address[0] == '0.0.0.0':
+ self._address[0] = '127.0.0.1'
self._family = family
self._last_accepted = None That way, we still support binding on all addresses, and self._address |
Le lundi 11 août 2008 à 19:58 +0000, Trent Nelson a écrit :
Please no. If the user asks for 0.0.0.0, either obey or raise an My own humble opinion is that 0.0.0.0 should be allowed and, at worse, |
I was thinking about this on the way home last night and concluded that As for the original issue, Jesse I'm +1 on your connection_v2.patch. |
documented in r70960 |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: