use the ProactorEventLoop on windows#7494
Conversation
483e935 to
f1c6747
Compare
Unit Test ResultsSee test report for an extended history of previous test failures. This is useful for diagnosing flaky tests. 20 files ± 0 20 suites ±0 11h 25m 12s ⏱️ + 4m 44s For more details on these failures and errors, see this check. Results for commit 445d001. ± Comparison against base commit fca4b35. ♻️ This comment has been updated with latest results. |
|
Looks like cc @graingert @crusaderky I believe you have a win machine. could you try reproducing this? |
I'll add it to my pile :) |
|
reproduced. investigating |
|
I'm lost. @graingert I could use your expertise. This issue is specifically about having a LocalCluster running when the interpreter shuts down: import distributed
if __name__ == "__main__":
cluster = distributed.LocalCluster(processes=True, n_workers=1)What I could find:
The same code, in main, executes |
|
@crusaderky we could be racing our atexit hook with tornado's https://github.com/tornadoweb/tornado/blob/9ea5cdd5fefaf8c2314b62aea9d93fa9d010f186/tornado/platform/asyncio.py#L58-L75 |
|
Maybe on windows we could default to "asyncio_tcp" to avoid going via the tornado selector thread? |
|
I opened a draft PR to try this out: #7532 |
|
Blocked by tornadoweb/tornado#3173 |
|
Hi @fjetter, it looks like tornadoweb/tornado#3173 has been resolved. Is it possible to get this PR merged? I've been following this issue #7492, and it's no longer a problem if I copy the change to |
|
I rebased the PR and we can have a look |
|
I see that the tornado changes are not, yet, released. We likely need that new version. Possibly we'll even need to implement some compat layer then. I don't have a problem bumping the minimal version of tornado but maybe not to the most recent one. cc @graingert can you chime in and take a look? |
|
@fjetter even with the new tornado code, although the AddThreadSelectorEventLoop is correctly closed when I've pushed a commit to try this out. |
|
@crusaderky I'm getting: which I don't understand, do we expect the order of these operations to change if selector calls are deferred to a thread with AddThreadSelectorEventLoop? |
|
@graingert distributed/distributed/worker.py Lines 1778 to 1780 in 7b21399
It looks like an (inconsequential) race condition to me. It's ok to change the test to compare sets. |
Supersedes #5833
Closes #7492
Closes #7434