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_drain_raises() fails randomly on Windows #81051
Comments
https://ci.appveyor.com/project/python/cpython/builds/24376676 ERROR: test_drain_raises (test.test_asyncio.test_streams.StreamTests) Traceback (most recent call last):
File "C:\projects\cpython\lib\test\test_asyncio\test_streams.py", line 820, in test_drain_raises
self.loop.run_until_complete(client(*addr))
File "C:\projects\cpython\lib\asyncio\base_events.py", line 584, in run_until_complete
return future.result()
File "C:\projects\cpython\lib\test\test_asyncio\test_streams.py", line 810, in client
await writer.drain()
File "C:\projects\cpython\lib\asyncio\streams.py", line 351, in drain
await fut
File "C:\projects\cpython\lib\asyncio\selector_events.py", line 860, in write
n = self._sock.send(data)
ConnectionAbortedError: [WinError 10053] An established connection was aborted by the software in your host machine |
I have gotten this too, multiple times, on both Azure Pipelines and Appveyor. The latter is worse since required. There was also a Mac failure for Azure, not sure is same issue. Please disable this test. External resource problems should not be blocking merges of good patches. This is especially obnoxious for backports because it is not possible to rerun by close and reopen, as closing causes the backport branch to be deleted. |
Maybe the test started to fail randomly after this change: commit 1cc0ee7
The test is quite old, added in bpo-25441: commit c44ecdf
|
Another candidate: commit a076e4f (refs/bisect/bad)
Before this commit, the test pass. After this commit, the test still pass but logs a warning: vstinner@WIN C:\vstinner\python\master>python -m test test_asyncio -m test_drain_raises -v
(...)
test_drain_raises (test.test_asyncio.test_streams.StreamTests) ... Task exception was never retrieved
future: <Task finished name='Task-2' coro=<StreamWriter.drain() done, defined at C:\vstinner\python\master\lib\asyncio\streams.py:417> exception=ConnectionAbor
tedError(10053, 'An established connection was aborted by the software in your host machine', None, 10053, None)>
Traceback (most recent call last):
File "C:\vstinner\python\master\lib\asyncio\streams.py", line 434, in drain
await fut
File "C:\vstinner\python\master\lib\asyncio\proactor_events.py", line 370, in _loop_writing
self._write_fut = self._loop._proactor.send(self._sock, data)
File "C:\vstinner\python\master\lib\asyncio\windows_events.py", line 488, in send
ov.WSASend(conn.fileno(), buf, flags)
ConnectionAbortedError: [WinError 10053] An established connection was aborted by the software in your host machine
ok
(...)
Tests result: SUCCESS |
I wrote PR 13316 to revert the commit a076e4f of bpo-36802: |
Please postpone the reversion for a while. |
PR 13313 has been merged into master. Let's see if it does fix this issue in master. Python 3.7 is different: streams.py doesn't have _fast_drain() which was added by commit a076e4f (bpo-36802). So instead, I created PR 13328 to revert the commit 93aa57a of bpo-36801, to get more time to find a proper fix to Python 3.7. |
Agree with your conclusion |
"""
""" I reverted this change in 3.7: commit c647ad9 (HEAD -> 3.7, upstream/3.7)
Without this revert, I was able to easily reproduce the failure. With the revert, I cannot reproduce it anymore: |
Andrew merged #13330 into master, it should fix this issue. |
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: