-
-
Notifications
You must be signed in to change notification settings - Fork 31.6k
[Windows] : Proactor test_sendfile_close_peer_in_the_middle_of_receiving failure #85848
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
Comments
In an unrelated PR to add a new argument to the base Executor class for concurrent.futures, there was a test_asyncio failure in test_sendfile for the ProactorEventLoop tests: ====================================================================== Traceback (most recent call last):
File "D:\a\cpython\cpython\lib\test\test_asyncio\test_sendfile.py", line 452, in test_sendfile_close_peer_in_the_middle_of_receiving
self.run_loop(
AssertionError: ConnectionError not raised https://github.com/python/cpython/pull/22023/checks?check_run_id=1049760805#step:5:2373 |
In case the link to the logs are lost from closing and reopening the PR, it was a Windows CI test (GitHub actions) ran with the following configuration: D:\a\cpython\cpython>"D:\a\cpython\cpython\PCbuild\amd64\python.exe" -u -Wd -E -bb -m test -uall -u-cpu -rwW --slowest --timeout 1200 -j0 |
Another instance at https://github.com/python/cpython/pull/25585/checks?check_run_id=2447701034 I unlinked the previously linked PR, as that looked to be for bpo-43539 rather than this issue. |
This bug still occurs time to time on GitHub Actions. https://github.com/python/cpython/pull/26826/checks?check_run_id=2874631119 ====================================================================== Traceback (most recent call last):
File "D:\a\cpython\cpython\lib\test\test_asyncio\test_sendfile.py", line 457, in test_sendfile_close_peer_in_the_middle_of_receiving
with self.assertRaises(ConnectionError):
AssertionError: ConnectionError not raised |
Two new failures today: https://github.com/python/cpython/runs/2905621215: 2021-06-24T14:18:23.3775258Z Traceback (most recent call last):
2021-06-24T14:18:23.3776123Z File "D:\a\cpython\cpython\lib\test\test_asyncio\test_sendfile.py", line 457, in test_sendfile_close_peer_in_the_middle_of_receiving
2021-06-24T14:18:23.3777065Z with self.assertRaises(ConnectionError):
2021-06-24T14:18:23.3777775Z AssertionError: ConnectionError not raised
2021-06-24T14:18:23.3778226Z
2021-06-24T14:18:23.3778744Z 2021-06-24T14:18:23.3779161Z https://github.com/python/cpython/runs/2906141524: 2021-06-24T15:23:11.7179754Z Traceback (most recent call last):
2021-06-24T15:23:11.7180469Z File "D:\a\cpython\cpython\lib\test\test_asyncio\test_sendfile.py", line 457, in test_sendfile_close_peer_in_the_middle_of_receiving
2021-06-24T15:23:11.7181284Z with self.assertRaises(ConnectionError):
2021-06-24T15:23:11.7182125Z AssertionError: ConnectionError not raised
2021-06-24T15:23:11.7182560Z
2021-06-24T15:23:11.7183334Z 2021-06-24T15:23:11.7183839Z |
Recent failure on GHA Windows x64: https://github.com/python/cpython/runs/3342514542 2021-08-16T17:19:58.4338049Z ====================================================================== 2021-08-16T17:19:58.4340937Z Traceback (most recent call last):
2021-08-16T17:19:58.4341846Z File "D:\a\cpython\cpython\lib\test\test_asyncio\test_sendfile.py", line 457, in test_sendfile_close_peer_in_the_middle_of_receiving
2021-08-16T17:19:58.4342849Z with self.assertRaises(ConnectionError):
2021-08-16T17:19:58.4343398Z ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2021-08-16T17:19:58.4343982Z AssertionError: ConnectionError not raised |
Happened to me today: https://dev.azure.com/Python/cpython/_build/results?buildId=88208&view=logs&j=c83831cd-3752-5cc7-2f01-8276919eb334&t=5a421c4a-0933-53d5-26b9-04b36ad165eb
|
New failure today: https://github.com/python/cpython/runs/3979900415?check_suite_focus=true test_sendfile_close_peer_in_the_middle_of_receiving (test.test_asyncio.test_sendfile.SelectEventLoopTests) ... ok ====================================================================== Traceback (most recent call last):
File "D:\a\cpython\cpython\lib\test\test_asyncio\test_sendfile.py", line 457, in test_sendfile_close_peer_in_the_middle_of_receiving
with self.assertRaises(ConnectionError):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: ConnectionError not raised |
Happened to a PR I was reviewing today: |
Previously, this failure was more sporadic; now it happens almost every single run on the Azure CI. Has there been updates on the Azure CI lately? |
I'm wondering if the test is faulty. It seems to call EventLoop.sendfile() with a file that is 8K + 1 byte long, @andrew Svetlov, do you know enough of the internals of this code to validate my theory? |
Guido, I can not confirm your suggestion but it seems correct to me. |
Test fixed on Windows 2022 by: commit 1c705fd
|
Thanks Kumar for the fix! |
This failing test was one of my most hated test because it failed randomly for almost 2 years. I'm happy that it has been fixed :-) Regularly, I'm asking for help to fix test_asyncio:
Last years I gave up, since almost no one replied to my requests. |
I'm sorry, Victor. |
As a maintainer of the Python CIs, The Night's Watch (*), it's my fault that I didn't skip these tests earlier. Honestly, it's ok to skip a bunch of tests or even remove them if there is no active maintainer. It's also ok that there is no active maintainer if existing tests continue to pass. asyncio is far from being an exception. Just look at test_nntplib: not maintained for 9 years, https://bugs.python.org/issue40735 This test failure got more attention since it started to fail even more frequently (always?) on Windows 2022. (*) https://pythondev.readthedocs.io/ci.html#the-night-s-watch-is-fixing-the-cis-in-the-darkness-for-you |
I built 3.11.5 on my own Windows computer, and found it passed this test on one computer, but didn't pass on another computer. I think that this issue may not be fixed completely, or I can provide needed information of the computer which this test didn't pass to find out the reason why it didn't pass. |
This issue is closed, please open a new issue. |
test_sendfile_close_peer_in_the_middle_of_receiving
intest_asyncio
#30801Note: 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: