Fix shutdown timeout handling in completion wait function by stelfrag · Pull Request #21395 · netdata/netdata
Conversation
Summary
- Handle spurious wakeups when waiting for a completion
Summary by cubic
Fixed timed wait in completion to handle spurious wakeups and respect shutdown timeouts. Prevents premature timeouts or hanging during shutdown.
- Bug Fixes
- Use an absolute deadline and compute remaining timeout each loop.
- Re-check completion after each wake to ignore spurious wakeups.
- Enforce a minimum 1 ns timeout when zero is passed.
Written for commit 6a88f34. Summary will update automatically on new commits.
stelfrag
marked this pull request as ready for review
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No issues found across 1 file
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No issues found during shutdown. LGTM!
stelfrag added a commit to stelfrag/netdata that referenced this pull request
Dec 5, 2025) (cherry picked from commit edb587b)
Ferroin pushed a commit that referenced this pull request
Dec 15, 2025(cherry picked from commit edb587b)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters