Skip to content

fix: use system_clock for Boost.Interprocess timed_receive to prevent futex spin loop causing high CPU (#358)#368

Merged
intuibase merged 1 commit into
elastic:mainfrom
intuibase:timer_fix
Apr 23, 2026
Merged

fix: use system_clock for Boost.Interprocess timed_receive to prevent futex spin loop causing high CPU (#358)#368
intuibase merged 1 commit into
elastic:mainfrom
intuibase:timer_fix

Conversation

@intuibase

@intuibase intuibase commented Apr 23, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@coderabbitai

coderabbitai Bot commented Apr 23, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 82e76a6e-72d3-4122-9539-070e5e29512e

📥 Commits

Reviewing files that changed from the base of the PR and between f165d11 and 7012a72.

📒 Files selected for processing (1)
  • prod/native/libcommon/code/coordinator/CoordinatorProcess.cpp

📝 Walkthrough

Walkthrough

The coordinator loop's message-queue timeout mechanism was modified to use std::chrono::system_clock for deadline calculation instead of std::chrono::steady_clock. The timeout duration remains 10ms. This single-line change affects how the timeout deadline is computed during the timed_receive operation in the message processing loop. All other control flow, exception handling, and message processing logic remains unaffected. No public interfaces or exported declarations were altered.

🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • 🛠️ Update Documentation: Commit on current branch
  • 🛠️ Update Documentation: Create PR

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@intuibase intuibase changed the title fix: use system_clock for Boost.Interprocess timed_receive to prevent… fix: use system_clock for Boost.Interprocess timed_receive to prevent futex spin loop causing high CPU (#358) Apr 23, 2026
@intuibase
intuibase merged commit b45c450 into elastic:main Apr 23, 2026
63 checks passed
@intuibase
intuibase deleted the timer_fix branch April 23, 2026 18:41
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.

100% CPU caused by futex spin loop in coordinator process (CLOCK_MONOTONIC vs FUTEX_CLOCK_REALTIME mismatch)

2 participants