fix(containerprofilemanager): cap identified call stacks per container#849
fix(containerprofilemanager): cap identified call stacks per container#849matthyx wants to merge 2 commits into
Conversation
Each distinct call site produces a distinct (deduped-by-hash) IdentifiedCallStack stored in the per-container callStacks map. A workload that launches many distinct executables (or a process-enumeration/fork-churn attack) grows this map unbounded within a reporting window, driving the node-agent OOM (observed on a live cluster: Go heap grew to ~900MB under churn, with the call-stack build/store path the top allocation). Cap at 512 distinct stacks per container - the profile only needs a representative set. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Docs-exempt: internal memory-safety cap, no API/behavior change
|
Warning Review limit reached
Next review available in: 31 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. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 Walkthrough
✨ Finishing Touches🧪 Generate unit tests (beta)
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 per-container CallStackSearchTree (built from the profile's identified call stacks) stores one bidirectional tree + trie + path set per distinct CallID. A container that launches many distinct executables produces many distinct call sites, growing the tree unbounded - heap profiling showed buildBidirectionalTree/convertNodesToFrames as the top allocation (~57MB) once the identified-call-stack map was capped. Cap at 512 distinct call sites per container's tree, matching the identified-call-stack cap. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Docs-exempt: internal memory-safety cap, no API/behavior change
Performance Benchmark ResultsNode-Agent Resource Usage
Dedup EffectivenessNo data available. |
Performance Benchmark ResultsNode-Agent Resource Usage
Dedup EffectivenessNo data available. |
Each distinct call site produces a distinct (deduped-by-hash)
IdentifiedCallStackstored in the per-containercallStacksmap. A workload that launches many distinct executables (or a process-enumeration/fork-churn attack) grows this map unbounded within a reporting window, driving the node-agent OOM. Observed via heap profiling on a live cluster: Go heap grew to ~900MB under churn (createCallStackFromTrace/ReportIdentifiedCallStackthe top allocation), node-agent OOMKilled. Cap at 512 distinct stacks per container; dedup-by-hash preserved below the cap.🤖 Generated with Claude Code