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

Include addresses in closed comm repr #5203

Merged
merged 2 commits into from
Aug 13, 2021
Merged

Conversation

jrbourbeau
Copy link
Member

This PR updates our comm reprs to include local and remote address after the comm has been closed (this information is already included when the comm is running). This means the repr for closed comm will look like

<TLS (closed)  local=tls://... remote=tls://...>

instead of

<closed TLS>

which will help aid debugging (xref #5202)

cc @mrocklin @fjetter

@fjetter
Copy link
Member

fjetter commented Aug 13, 2021

I'm not entirely sure if this helps. We often raise a CommClosedError without context. Either way, I think this is a good idea

@fjetter
Copy link
Member

fjetter commented Aug 13, 2021

See also #5209

@fjetter fjetter merged commit 17cd4db into dask:main Aug 13, 2021
fjetter pushed a commit to fjetter/distributed that referenced this pull request Aug 13, 2021
@jrbourbeau jrbourbeau deleted the comm-repr branch August 13, 2021 15:18
@jrbourbeau
Copy link
Member Author

Thanks for reviewing @fjetter! My thinking was that since we use the comm repr in convert_stream_closed_error

def convert_stream_closed_error(obj, exc):
"""
Re-raise StreamClosedError as CommClosedError.
"""
if exc.real_error is not None:
# The stream was closed because of an underlying OS error
exc = exc.real_error
if ssl and isinstance(exc, ssl.SSLError):
if "UNKNOWN_CA" in exc.reason:
raise FatalCommClosedError(f"in {obj}: {exc.__class__.__name__}: {exc}")
raise CommClosedError(f"in {obj}: {exc.__class__.__name__}: {exc}") from exc
else:
raise CommClosedError(f"in {obj}: {exc}") from exc

it will help in those situations (which I've been running into recently). Totally agree #5209 is a more thorough solution 👍

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.

None yet

2 participants