Summary: | dev-python/uvloop-0.15.3-r1 fails tests (tests.test_tcp.Test_AIO_TCPSSL hangs) | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Agostino Sarubbo <ago> |
Component: | Current packages | Assignee: | Python Gentoo Team <python> |
Status: | CONFIRMED --- | ||
Severity: | normal | CC: | eike, kevinlyles, mgorny, sam |
Priority: | Normal | Keywords: | TESTFAILURE |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | build.log |
Description
Agostino Sarubbo
2021-07-30 06:30:58 UTC
Created attachment 728064 [details]
build.log
build log and emerge --info
I had the same on sparc: test_create_connection_memory_leak (tests.test_tcp.Test_AIO_TCPSSL) ... skipped '' test_create_connection_ssl_1 (tests.test_tcp.Test_AIO_TCPSSL) ... Exception in thread test-server: Traceback (most recent call last): File "/var/tmp/portage/dev-python/uvloop-0.15.3-r1/work/uvloop-0.15.3/uvloop/_testbase.py", line 489, in _run self._handle_client(conn) File "/var/tmp/portage/dev-python/uvloop-0.15.3-r1/work/uvloop-0.15.3/uvloop/_testbase.py", line 500, in _handle_client self._prog(TestSocketWrapper(sock)) File "/var/tmp/portage/dev-python/uvloop-0.15.3-r1/work/uvloop-0.15.3/tests/test_tcp.py", line 1376, in server data = sock.recv_all(len(B_DATA)) File "/var/tmp/portage/dev-python/uvloop-0.15.3-r1/work/uvloop-0.15.3/uvloop/_testbase.py", line 358, in recv_all data = self.recv(n - len(buf)) File "/usr/lib/python3.9/ssl.py", line 1226, in recv return self.read(buflen) File "/usr/lib/python3.9/ssl.py", line 1101, in read return self._sslobj.read(len) socket.timeout: The read operation timed out During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib/python3.9/threading.py", line 973, in _bootstrap_inner self.run() File "/var/tmp/portage/dev-python/uvloop-0.15.3-r1/work/uvloop-0.15.3/uvloop/_testbase.py", line 458, in run self._run() File "/var/tmp/portage/dev-python/uvloop-0.15.3-r1/work/uvloop-0.15.3/uvloop/_testbase.py", line 497, in _run self._test._abort_socket_test(ex) File "/var/tmp/portage/dev-python/uvloop-0.15.3-r1/work/uvloop-0.15.3/uvloop/_testbase.py", line 228, in _abort_socket_test self.fail(ex) File "/usr/lib/python3.9/unittest/case.py", line 670, in fail raise self.failureException(msg) AssertionError: The read operation timed out /usr/lib/python3.9/threading.py:975: ResourceWarning: unclosed <ssl.SSLSocket fd=11, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('127.0.0.1', 54133), raddr=('127.0.0.1', 45420)> self._invoke_excepthook(self) ResourceWarning: Enable tracemalloc to get the object allocation traceback ERROR test_create_connection_ssl_failed_certificate (tests.test_tcp.Test_AIO_TCPSSL) ... /usr/lib/python3.9/asyncio/sslproto.py:320: ResourceWarning: unclosed transport <asyncio.sslproto._SSLProtocolTransport object at 0xf476c238> _warn(f"unclosed transport {self!r}", ResourceWarning, source=self) ResourceWarning: Enable tracemalloc to get the object allocation traceback /usr/lib/python3.9/asyncio/selector_events.py:704: ResourceWarning: unclosed transport <_SelectorSocketTransport fd=27> _warn(f"unclosed transport {self!r}", ResourceWarning, source=self) ResourceWarning: Enable tracemalloc to get the object allocation traceback skipped '' test_create_connection_ssl_slow_handshake (tests.test_tcp.Test_AIO_TCPSSL) ... skipped '' test_create_server_ssl_1 (tests.test_tcp.Test_AIO_TCPSSL) ... Same in 0.16.0 I can reproduce as well on 0.16.0 Either reducing TOTAL_CNT to 10 from 25, or increasing ssl_handshake_timeout from 10.0 to 30.0 makes the test pass on my environment. Not entirely sure about the reason, might be pure timeout or actual bugs. https://github.com/MagicStack/uvloop/blob/3e71ddc3383a8e0546519117c8775323c19eb6d7/tests/test_unix.py#L609 IMHO that shows that the timeout calibration is just wrong for slow or crowded machines. |