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

Fix setting Python futures when they have already completed #281

Merged
merged 8 commits into from
Sep 30, 2024

Conversation

pentschev
Copy link
Member

@pentschev pentschev commented Sep 24, 2024

Prevent calling set_result()/set_exception() on Python futures if they are already cancelled()/done(). Calling set_result()/set_exception() when the future has already completed raises an exception that may be uncatched as it may happen on a thread different from the application, which seems to have been one of the reasons why distributed-ucxx tests have been hanging.

Although not all test failures have been resolved by this, hangs have seemingly also been less frequent in local tests.

Additionally set more sensible log levels for other errors coming from CPython implementation and remove the PyErr_Print() which will just print a message to stdout instead of a log message.

@pentschev pentschev added bug Something isn't working non-breaking Introduces a non-breaking change labels Sep 24, 2024
@pentschev pentschev requested a review from a team as a code owner September 24, 2024 16:22
Copy link
Contributor

@wence- wence- left a comment

Choose a reason for hiding this comment

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

This makes sense to me, thanks.

@pentschev pentschev changed the base branch from branch-0.40 to branch-0.41 September 30, 2024 11:34
@pentschev
Copy link
Member Author

Thanks for approval @wence- . Since this has potential to impact at least tests in RAFT/cuML and we're already in code freeze I've retargeted, but I'll merge it once tests pass.

@pentschev
Copy link
Member Author

/merge

@rapids-bot rapids-bot bot merged commit 8b2dc77 into rapidsai:branch-0.41 Sep 30, 2024
67 of 70 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working non-breaking Introduces a non-breaking change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants