-
-
Notifications
You must be signed in to change notification settings - Fork 30.7k
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
Add socket.create_server() utility function #80115
Comments
The main point of this patch is to automatize all the necessary tasks which are usually involved when creating a server socket, amongst which:
This is somewhat related to bpo-17561 which I prefer to leave pending for now (need to think about it more carefully). bpo-17561 is complementary to this one so it appears it can be integrated later (or never) without altering the base functionality implemented in here. |
Closing this out as duplicate. Will continue in bpo-35934. |
The previous comment is a self-reference. I believe the intention was to mark this as a duplicate of bpo-17561. |
Correct. Sorry for the typo. |
The change broke multiple buildbots, please fix buildbots or the change will be reverted: Revert on fail: https://pythondev.readthedocs.io/ci.html#revert-on-fail |
AMD64 Ubuntu Shared 3.x: https://buildbot.python.org/all/#/builders/141/builds/1498 FAIL: test_wait_socket (test.test_multiprocessing_fork.TestWait) Traceback (most recent call last):
File "/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/test/_test_multiprocessing.py", line 4377, in test_wait_socket
self.assertEqual(b''.join(v), expected)
AssertionError: b'1\n2\n3\n4\n5\n6\n7\n8\n9\n' != b'0\n1\n2\n3\n4\n5\n6\n7\n8\n9\n' |
AMD64 FreeBSD CURRENT Shared 3.x: https://buildbot.python.org/all/#/builders/168/builds/885 test_wait (test.test_multiprocessing_spawn.TestWait) ... ok
test_wait_integer (test.test_multiprocessing_spawn.TestWait) ... ok
test_wait_slow (test.test_multiprocessing_spawn.TestWait) ... ok
Process Process-62:
Traceback (most recent call last):
File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/multiprocessing/process.py", line 302, in _bootstrap
self.run()
File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/multiprocessing/process.py", line 99, in run
self._target(*self._args, **self._kwargs)
File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/_test_multiprocessing.py", line 4337, in _child_test_wait_socket
s.connect(address)
ConnectionResetError: [Errno 54] Connection reset by peer
/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/multiprocessing/process.py:318: ResourceWarning: unclosed <socket.socket fd=5, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('127.0.0.1', 2397)>
traceback.print_exc()
ResourceWarning: Enable tracemalloc to get the object allocation traceback
Process Process-60:
Traceback (most recent call last):
File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/multiprocessing/process.py", line 302, in _bootstrap
self.run()
File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/multiprocessing/process.py", line 99, in run
self._target(*self._args, **self._kwargs)
File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/_test_multiprocessing.py", line 4337, in _child_test_wait_socket
s.connect(address)
ConnectionResetError: [Errno 54] Connection reset by peer
/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/multiprocessing/process.py:318: ResourceWarning: unclosed <socket.socket fd=5, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('127.0.0.1', 2398)>
traceback.print_exc()
ResourceWarning: Enable tracemalloc to get the object allocation traceback
Process Process-59:
Traceback (most recent call last):
File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/multiprocessing/process.py", line 302, in _bootstrap
self.run()
File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/multiprocessing/process.py", line 99, in run
self._target(*self._args, **self._kwargs)
File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/_test_multiprocessing.py", line 4337, in _child_test_wait_socket
s.connect(address)
ConnectionResetError: [Errno 54] Connection reset by peer
/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/multiprocessing/process.py:318: ResourceWarning: unclosed <socket.socket fd=5, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('127.0.0.1', 2399)>
traceback.print_exc()
ResourceWarning: Enable tracemalloc to get the object allocation traceback
Timeout (0:25:00)!
Thread 0x0000000800acc000 (most recent call first):
File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/socket.py", line 212 in accept
File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/_test_multiprocessing.py", line 4361 in test_wait_socket
File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/unittest/case.py", line 680 in run
File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/unittest/case.py", line 740 in __call__
File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/unittest/suite.py", line 122 in run
File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/unittest/suite.py", line 84 in __call__
File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/unittest/suite.py", line 122 in run
File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/unittest/suite.py", line 84 in __call__
File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/unittest/suite.py", line 122 in run
File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/unittest/suite.py", line 84 in __call__
File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/unittest/runner.py", line 176 in run
File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/support/__init__.py", line 1968 in _run_suite
File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/support/__init__.py", line 2064 in run_unittest
File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/libregrtest/runtest.py", line 178 in test_runner
File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/libregrtest/runtest.py", line 182 in runtest_inner
File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/libregrtest/runtest.py", line 137 in runtest
File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/libregrtest/main.py", line 305 in rerun_failed_tests
File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/libregrtest/main.py", line 623 in _main
File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/libregrtest/main.py", line 586 in main
File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/libregrtest/main.py", line 640 in main
File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/__main__.py", line 2 in <module>
File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/runpy.py", line 85 in _run_code
File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/runpy.py", line 192 in _run_module_as_main
test_wait_socket (test.test_multiprocessing_spawn.TestWait) ... *** Error code 1 |
s390x SLES 3.x: FAIL: test_wait_socket (test.test_multiprocessing_fork.TestWait) |
Those are old failures (+/- 17 hours ago). I committed: |
Oh, you wrote "BPO-" rather than "bpo-" and so your commit wasn't mentioned here: commit 8702b67
Oh, great! Thanks for the fix. Sorry, I was 10 days late to handle emails from the buildbot-status mailing list. I only reported failures, I didn't check if it has been fixed in the meanwhile. I close again the issue. |
No problem. My bad that I mistyped the "BPO" thing. |
I was sure that I already reported the issue... In fact, I commented bpo-17561 :-) |
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: