-
-
Notifications
You must be signed in to change notification settings - Fork 33.6k
Closed
Labels
testsTests in the Lib/test dirTests in the Lib/test dirtopic-SSLtopic-asynciotype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
Bug description:
I noticed recently that in Fedora builds on x86_64, the test.test_asyncio.test_ssl test often (but not always) times out on Fedora ELN (next RHEL version) and EPEL 10.1. The failure often looks like this:
Re-running test.test_asyncio.test_ssl in verbose mode (matching: test_create_connection_ssl_1)
test_create_connection_ssl_1 (test.test_asyncio.test_ssl.TestSSL.test_create_connection_ssl_1) ... Warning -- Uncaught thread exception: AssertionError
Exception in thread test-server:
Traceback (most recent call last):
File "/builddir/build/BUILD/python3.14-3.14.2-build/Python-3.14.2/Lib/test/test_asyncio/test_ssl.py", line 1888, in _run
self._handle_client(conn)
~~~~~~~~~~~~~~~~~~~^^^^^^
File "/builddir/build/BUILD/python3.14-3.14.2-build/Python-3.14.2/Lib/test/test_asyncio/test_ssl.py", line 1899, in _handle_client
self._prog(TestSocketWrapper(sock))
~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
File "/builddir/build/BUILD/python3.14-3.14.2-build/Python-3.14.2/Lib/test/test_asyncio/test_ssl.py", line 318, in server
data = sock.recv_all(len(B_DATA))
File "/builddir/build/BUILD/python3.14-3.14.2-build/Python-3.14.2/Lib/test/test_asyncio/test_ssl.py", line 1759, in recv_all
data = self.recv(n - len(buf))
File "/builddir/build/BUILD/python3.14-3.14.2-build/Python-3.14.2/Lib/ssl.py", line 1285, in recv
return self.read(buflen)
~~~~~~~~~^^^^^^^^
File "/builddir/build/BUILD/python3.14-3.14.2-build/Python-3.14.2/Lib/ssl.py", line 1140, in read
return self._sslobj.read(len)
~~~~~~~~~~~~~~~~~^^^^^
TimeoutError: The read operation timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/builddir/build/BUILD/python3.14-3.14.2-build/Python-3.14.2/Lib/threading.py", line 1082, in _bootstrap_inner
self._context.run(self.run)
~~~~~~~~~~~~~~~~~^^^^^^^^^^
File "/builddir/build/BUILD/python3.14-3.14.2-build/Python-3.14.2/Lib/test/test_asyncio/test_ssl.py", line 1860, in run
self._run()
~~~~~~~~~^^
File "/builddir/build/BUILD/python3.14-3.14.2-build/Python-3.14.2/Lib/test/test_asyncio/test_ssl.py", line 1896, in _run
self._test._abort_socket_test(ex)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^
File "/builddir/build/BUILD/python3.14-3.14.2-build/Python-3.14.2/Lib/test/test_asyncio/test_ssl.py", line 182, in _abort_socket_test
self.fail(ex)
~~~~~~~~~^^^^
File "/builddir/build/BUILD/python3.14-3.14.2-build/Python-3.14.2/Lib/unittest/case.py", line 750, in fail
raise self.failureException(msg)
AssertionError: The read operation timed out
ERROR
Future exception was never retrieved
future: <Future finished exception=ConnectionAbortedError('SSL handshake is taking longer than 67.5 seconds: aborting the connection')>
ConnectionAbortedError: SSL handshake is taking longer than 67.5 seconds: aborting the connection
======================================================================
ERROR: test_create_connection_ssl_1 (test.test_asyncio.test_ssl.TestSSL.test_create_connection_ssl_1)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/builddir/build/BUILD/python3.14-3.14.2-build/Python-3.14.2/Lib/test/test_asyncio/test_ssl.py", line 387, in test_create_connection_ssl_1
run(client)
~~~^^^^^^^^
File "/builddir/build/BUILD/python3.14-3.14.2-build/Python-3.14.2/Lib/test/test_asyncio/test_ssl.py", line 382, in run
self.loop.run_until_complete(_gather(*tasks))
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
File "/builddir/build/BUILD/python3.14-3.14.2-build/Python-3.14.2/Lib/asyncio/base_events.py", line 719, in run_until_complete
return future.result()
~~~~~~~~~~~~~^^
File "/builddir/build/BUILD/python3.14-3.14.2-build/Python-3.14.2/Lib/test/test_asyncio/test_ssl.py", line 373, in _gather
return await asyncio.gather(*tasks)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/builddir/build/BUILD/python3.14-3.14.2-build/Python-3.14.2/Lib/test/test_asyncio/test_ssl.py", line 328, in client
reader, writer = await asyncio.open_connection(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...<3 lines>...
**extras)
^^^^^^^^^
File "/builddir/build/BUILD/python3.14-3.14.2-build/Python-3.14.2/Lib/asyncio/streams.py", line 48, in open_connection
transport, _ = await loop.create_connection(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lambda: protocol, host, port, **kwds)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/builddir/build/BUILD/python3.14-3.14.2-build/Python-3.14.2/Lib/asyncio/base_events.py", line 1198, in create_connection
transport, protocol = await self._create_connection_transport(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...<2 lines>...
ssl_shutdown_timeout=ssl_shutdown_timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/builddir/build/BUILD/python3.14-3.14.2-build/Python-3.14.2/Lib/asyncio/base_events.py", line 1231, in _create_connection_transport
await waiter
ConnectionAbortedError: SSL handshake is taking longer than 67.5 seconds: aborting the connection
----------------------------------------------------------------------
Ran 1 test in 140.061s
FAILED (errors=1)
test test.test_asyncio.test_ssl failed
1 test failed again:
test.test_asyncio.test_ssl
I don't know what's different in those environments, and I usually just retry until it succeeds, but recently it took 6+ tries for me to build Python 3.13.11 on EPEL 10.1.
I wonder if the timeout could be extended, or if this is some real problem :/
CPython versions tested on:
3.15, 3.14, 3.13
Operating systems tested on:
Linux
Linked PRs
Metadata
Metadata
Assignees
Labels
testsTests in the Lib/test dirTests in the Lib/test dirtopic-SSLtopic-asynciotype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Projects
Status
Done