Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 805155 - dev-python/uvloop-0.15.3-r1 fails tests (tests.test_tcp.Test_AIO_TCPSSL hangs)
Summary: dev-python/uvloop-0.15.3-r1 fails tests (tests.test_tcp.Test_AIO_TCPSSL hangs)
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords: TESTFAILURE
Depends on:
Blocks:
 
Reported: 2021-07-30 06:30 UTC by Agostino Sarubbo
Modified: 2022-10-19 03:15 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,82.50 KB, text/plain)
2021-07-30 06:31 UTC, Agostino Sarubbo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2021-07-30 06:30:58 UTC
https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/

Issue: dev-python/uvloop-0.15.3-r1 fails tests (hang).
Discovered on: amd64 (internal ref: ci)

NOTE:
This machine uses GCC-11: https://gcc.gnu.org/gcc-11/porting_to.html
I had to kill the process.
Comment 1 Agostino Sarubbo gentoo-dev 2021-07-30 06:31:02 UTC
Created attachment 728064 [details]
build.log

build log and emerge --info
Comment 2 Rolf Eike Beer archtester 2021-09-12 08:33:10 UTC
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) ...
Comment 3 Rolf Eike Beer archtester 2021-12-03 15:56:19 UTC
Same in 0.16.0
Comment 4 Alex Fan archtester 2022-05-17 02:45:54 UTC
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
Comment 5 Rolf Eike Beer archtester 2022-05-17 13:29:30 UTC
IMHO that shows that the timeout calibration is just wrong for slow or crowded machines.