Skip to content
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

Trial DirtyReactorAggregateError with asyncio on Windows #10279

Open
twisted-trac opened this issue Nov 23, 2021 · 0 comments
Open

Trial DirtyReactorAggregateError with asyncio on Windows #10279

twisted-trac opened this issue Nov 23, 2021 · 0 comments

Comments

@twisted-trac
Copy link

wRAR's avatar @wRAR reported
Trac ID trac#10279
Type defect
Created 2021-11-23 16:27:19Z

I'm getting 100% reproducible stray selectables/DelayedCalls with some of our (Scrapy) FTP/HTTP tests that happen only on Windows and only with the asyncio reactor. I'm attaching a simplified test case that makes a FTP server, a FTP client and connects using wrong credentials. As far as I can see the recommended cleanups are already done, yet I always get

[ERROR]
Traceback (most recent call last):
Failure: twisted.trial.util.DirtyReactorAggregateError: Reactor was unclean.
DelayedCalls: (set twisted.internet.base.DelayedCall.debug = True to debug)
<DelayedCall 0x1f739f900a0 [600.0s] called=0 cancelled=0 TimeoutMixin.__timedOut()>

test_foo.BaseFTPTestCase.test_invalid_credentials
===============================================================================
[ERROR]
Traceback (most recent call last):
Failure: twisted.trial.util.DirtyReactorAggregateError: Reactor was unclean.
Selectables:
<ProtocolWrapper #0 on 59858>

The DelayedCall debug output points at setTimeout in twisted.protocols.ftp.FTP.connectionMade.

Run with trial .\test_foo.py. Tested with Python 3.9 and 3.10, with Twisted 21.7.0.

Attachments:

  • test_foo.py (1948 bytes) - added by wRAR on 2021-11-23 16:27:55Z - example of a failing test
Searchable metadata
trac-id__10279 10279
type__defect defect
reporter__wRAR wRAR
priority__normal normal
milestone__None None
branch__ 
branch_author__ 
status__new new
resolution__None None
component__core core
keywords__None None
time__1637684839192424 1637684839192424
changetime__1637684839192424 1637684839192424
version__None None
owner__None None

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant