Skip to content

Prevent swallowed timeouts from wedging sync workers - #379

Merged
AlecRosenbaum merged 4 commits into
masterfrom
fix/retry-signal-timeouts
Aug 18, 2026
Merged

Prevent swallowed timeouts from wedging sync workers#379
AlecRosenbaum merged 4 commits into
masterfrom
fix/retry-signal-timeouts

Conversation

@AlecRosenbaum

@AlecRosenbaum AlecRosenbaum commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

This PR prevents sync workers from remaining indefinitely wedged when asynchronous task handling swallows a hard-timeout exception. It retries timeout delivery before terminating the worker so its supervisor can replace it.

Comment thread tasktiger/timeouts.py Outdated

def handle_death_penalty(self, signum: int, frame: Any) -> None:
if self.retries >= 3:
sys.exit(1)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

should I use os._exit instead?

@AlecRosenbaum
AlecRosenbaum requested a review from thomasst August 14, 2026 12:11

@thomasst thomasst left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'm assuming we deliberately don't want to do any cleanup here (such as threading._shutdown() etc), so _exit is probably fine. Are we able to log or print an error safely here?

@AlecRosenbaum
AlecRosenbaum merged commit f82ffbb into master Aug 18, 2026
72 checks passed
@AlecRosenbaum
AlecRosenbaum deleted the fix/retry-signal-timeouts branch August 18, 2026 15:56
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.

2 participants