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

Better logging for anomalous task termination #8082

Merged
merged 2 commits into from
Aug 8, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion distributed/worker_state_machine.py
Original file line number Diff line number Diff line change
Expand Up @@ -3656,9 +3656,11 @@ def _finish_async_instruction(
stim = task.result()
except asyncio.CancelledError:
# This should exclusively happen in Worker.close()
logger.warning(f"Async instruction for {task} ended with CancelledError")
return
except BaseException: # pragma: nocover
logger.exception("async instruction handlers should never raise!")
# This should never happen
logger.exception(f"Unhandled exception in async instruction for {task}")
Copy link
Member

Choose a reason for hiding this comment

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

Not intended as blocking comment, but I could see it being useful if we included the type of the exception and possibly the exception message here.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

logger.exception automatically does that

raise

# Capture metric events in _transition_to_memory()
Expand Down