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_asyncio test_start_tls_server_1 fails in AMD64 FreeBSD CURRENT buildbots #79212
Comments
https://buildbot.python.org/all/#/builders/168/builds/91 CURRENT-amd64% ./python -m test test_asyncio -m test_start_tls_server_1 Stderr:
/usr/home/pablo/cpython/Lib/test/test_asyncio/test_sslproto.py:497: DeprecationWarning: The loop argument is deprecated and scheduled for removal in Python 3.10.
await asyncio.wait_for(
/usr/home/pablo/cpython/Lib/asyncio/sslproto.py:321: ResourceWarning: unclosed transport <asyncio.sslproto._SSLProtocolTransport object at 0x802db68f0>
warnings.warn(f"unclosed transport {self!r}", ResourceWarning,
Unhandled error in exception handler
context: {'message': 'Future exception was never retrieved', 'exception': ConnectionResetError(54, 'Connection reset by peer'), 'future': <Future finished exception=ConnectionResetError(54, 'Connection reset by peer')>}
Traceback (most recent call last):
File "/usr/home/pablo/cpython/Lib/test/libregrtest/runtest.py", line 179, in runtest_inner
test_runner()
File "/usr/home/pablo/cpython/Lib/test/libregrtest/runtest.py", line 175, in test_runner
support.run_unittest(tests)
File "/usr/home/pablo/cpython/Lib/test/support/__init__.py", line 2001, in run_unittest
_run_suite(suite)
File "/usr/home/pablo/cpython/Lib/test/support/__init__.py", line 1920, in _run_suite
raise TestFailed(err)
test.support.TestFailed: Traceback (most recent call last):
File "/usr/home/pablo/cpython/Lib/test/test_asyncio/test_sslproto.py", line 504, in test_start_tls_server_1
self.loop.run_until_complete(run_main())
File "/usr/home/pablo/cpython/Lib/asyncio/base_events.py", line 582, in run_until_complete
return future.result()
File "/usr/home/pablo/cpython/Lib/test/test_asyncio/test_sslproto.py", line 497, in run_main
await asyncio.wait_for(
File "/usr/home/pablo/cpython/Lib/asyncio/tasks.py", line 457, in wait_for
raise exceptions.TimeoutError()
asyncio.exceptions.TimeoutError Stderr: During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/home/pablo/cpython/Lib/asyncio/base_events.py", line 1647, in call_exception_handler
self._exception_handler(self, context)
File "/usr/home/pablo/cpython/Lib/test/test_asyncio/functional.py", line 22, in loop_exception_handler
self.loop.default_exception_handler(context)
AttributeError: 'NoneType' object has no attribute 'default_exception_handler'
/usr/home/pablo/cpython/Lib/test/support/__init__.py:1550: ResourceWarning: unclosed <socket.socket fd=8, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6, laddr=('127.0.0.1', 25746)>
gc.collect()
test test_asyncio failed -- Traceback (most recent call last):
File "/usr/home/pablo/cpython/Lib/test/test_asyncio/test_sslproto.py", line 504, in test_start_tls_server_1
self.loop.run_until_complete(run_main())
File "/usr/home/pablo/cpython/Lib/asyncio/base_events.py", line 582, in run_until_complete
return future.result()
File "/usr/home/pablo/cpython/Lib/test/test_asyncio/test_sslproto.py", line 497, in run_main
await asyncio.wait_for(
File "/usr/home/pablo/cpython/Lib/asyncio/tasks.py", line 457, in wait_for
raise exceptions.TimeoutError()
asyncio.exceptions.TimeoutError Stderr: test_asyncio failed in 1 min 749 ms == Tests result: FAILURE == 1 test failed: Total duration: 1 min 800 ms |
Bisecting points to commit dbf1022 as the dirst bad commit: dbf1022 is the first bad commit
|
I think something is going on with the buildbot itself or the test has some race condition because that commit has been built before multiple times with no error. I am investigating in the buildbot itself. |
Building and testing the parent of dbf1022 always succeeds. |
It seems that the problem is that the ServerProto of test_start_tls_server_1 never receives a call to eof_received(). Weirdly enough it seems that if the HELLO_MSG is large enough (1024 * 1024), then the test always succeed. If we deactivate tls in the test, the test succeeds with any message lenght. |
Re-adding client_context.options |= ssl.OP_NO_TLSv1_3 makes the test pass again. |
Any progress on this issue? It's still failing: |
Someone needs to review PR10011 |
note: Roundup sent me comments as email notifications in the backward order, that's funny to see Pablo's answer before my question :-) |
Maybe I just answered faster than the speed of light ;) |
should this be closed? |
I think is missing a manual backport to 3.6, but now that we are in security fixes only I am not sure of what to do. |
If the failure has regularly shown up on 3.6 FreeBSD buildbots in the past, I would accept a backport of the test change to 3.6. |
Am I wrong with something? If I comment out the FreeBSD conditional (to apply ssl.OP_NO_TLSv1_3), If I change HELLO_MSG to 1*1024*1024 (msg328157), I reported the details in https://bugs.python.org/issue35998#msg336986 and the following. |
Commit f6a47f3 introduced a workaround on Windows and FreeBSD. It was removed by commit f0749da in bpo-35998... but then Windows restarted to fail: So I wrote PR 14148 to reintroduce the workaround until someone finds time to have a look. Note: this issue is open since October 2018. |
It seems like the issue has been fixed. See also bpo-35998 for a similar issue on other platforms. |
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: