Skip to content

CABI: don't trap if the last thread of a task exits before the task is resolved - #767

Merged
lukewagner merged 1 commit into
mainfrom
rm-trap
Nov 18, 2026
Merged

lukewagner merged 1 commit into
mainfrom
rm-trap

Conversation

@lukewagner

Copy link
Copy Markdown
Member

As discussed in #763, this PR removes a trap that used to be more load-bearing, but now seems superfluous since there are plenty of other ways to end up with a never-resolved task. The PR also adds some new tests for the new allowed behavior.

@alexcrichton alexcrichton left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

lgtm, but @dicej should be sure to take a look too

@dicej dicej left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I'm kind of ambivalent about this. I do agree that there are other ways to end up with a never-resolved task, but I also feel like this is akin to runtime deadlock detection; just because you can't catch all of them doesn't mean you shouldn't try to catch the obvious ones. Perhaps "catching" in this case just means "provide a runtime option to print a warning or trap to a debugger when a guest does this", though.

Anyway, no real objections.

@lukewagner

Copy link
Copy Markdown
Member Author

@dicej Agreed: I think debugger options are the best route here for detecting deadlocks.

@lukewagner
lukewagner merged commit 9ff90fd into main Nov 18, 2026
2 checks passed
@lukewagner
lukewagner deleted the rm-trap branch November 18, 2026 00:51
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