Fix: event-driven drain in session-timeout HUNG handler - #1636
Conversation
|
Warning Review limit reached
Next review available in: 10 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. 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. Comment |
The handler slept a fixed 2 s after SIGUSR1 before printing the HUNG group and SIGTERMing the children. On a loaded runner a starved descendant can take longer than 2 s to run its faulthandler dump, so the dump is cut off by the SIGTERM and the HUNG body lacks the frames that caused the hang. Drain until the pump's output stops growing (bounded at 10 s, quiet-detected at ~1 s) so slow signal delivery still lands in the group; the child is only SIGTERMed once the output has settled.
The handler slept a fixed 2 s after SIGUSR1 before printing the HUNG group and SIGTERMing the children. On a loaded runner (the cpu lane runs 5 jobs in parallel on one box) a starved descendant can take longer than 2 s to run its faulthandler dump — the dump then dies with the SIGTERM and the HUNG body lacks the frames that caused the hang (
_grandchild_deadlock_sentinelmissing).\n\nDrain until the pump's output stops growing (bounded at 10 s, quiet-detected at ~1 s of no new output), so slow signal delivery still lands in the group; children are SIGTERMed only once the output has settled.\n\nRationale: this is the same fixed-budget-vs-slow-process pattern as the session-timeout test's 3 s — event-driven instead of constant-tuning. Locally the race-free test passes in every configuration (3.9/3.10, full suite, under multi-process load ×20); this change hardens the production handler against the one unreproducible-locally case (real 5-job load on the runner).