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

Ensure connectionpool does not leave comms if closed mid connect #4951

Merged
merged 3 commits into from
Jun 24, 2021

Conversation

fjetter
Copy link
Member

@fjetter fjetter commented Jun 22, 2021

There is a chance for the ConnectionPool to leave connections open even after it was closed.

This came up during #4734

@fjetter
Copy link
Member Author

fjetter commented Jun 23, 2021

Flaky tests are
ubu3.8 #4915
win3.8 #4859

ubu3.9 + ox3.7 + osx3.9 test_register_backend_entrypoint seems to connect to a recent dask release with the message

(dask 2021.6.2 (/Users/runner/miniconda3/envs/dask-distributed/lib/python3.9/site-packages), Requirement.parse('dask==2021.06.1'))

@fjetter
Copy link
Member Author

fjetter commented Jun 23, 2021

I retriggered the run to see if the register_backend_entrypoint issue persists

@fjetter
Copy link
Member Author

fjetter commented Jun 23, 2021

The register_backend_entrypoint issue seems to be unrelated (I believe) but is still persistent, see #4961

Copy link
Member

@mrocklin mrocklin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems ok to me

distributed/core.py Outdated Show resolved Hide resolved
# We might still have tasks haning in the semaphore. This will let them
# run into an exception and raise a commclosed
while self._n_connecting:
await asyncio.sleep(0.005)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just checking, the finally block is triggered when we cancel?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. That's covered in the test, ensured by assert pool._connecting in line 651

@mrocklin
Copy link
Member

+1 from me

fjetter and others added 2 commits June 23, 2021 18:15
Co-authored-by: Matthew Rocklin <mrocklin@gmail.com>
Copy link
Member

@jrbourbeau jrbourbeau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @fjetter! This is in

@jrbourbeau jrbourbeau merged commit f1b0172 into dask:main Jun 24, 2021
@fjetter fjetter deleted the connectionpool_close branch June 24, 2021 07:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants