Repository navigation
ci: reduce SCA memory pressure on ARM runners - #472
Merged
Merged
Conversation
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The default ARM SCA runner has an 8 GiB cgroup limit. On the full-scan workload from matrixorigin/matrixone#31428, the control run's long-lived
golangci-lintprocess reached 7.20 GiB RSS; the cgroup had 7.30 GiB of anonymous memory and only about 7 MiB of inactive file cache at that point. The original failed job's log is unavailable, so the process killed in that incident is not established.Change
Set a default
GOMEMLIMIT=5GiBon the existing modernmake static-check-analysisinvocation, retaining any explicitly supplied value. This is a soft target per Go process, not a cgroup memory limit. It reaches inventory, vet, compiler children and golangci. Package selection, enabled linters and build parallelism are unchanged. The legacymake static-checkpath remains unchanged.Related to matrixorigin/matrixone#31428. Keep the issue open: this is a measured mitigation of the analysis peak, not proof that the original incident or every whole-job OOM is eliminated.
Validation
Ran sequential full SCA controls on the ARM 4c/8 GiB runner class using the same incident source, full package graph, Go and linter versions and observed cache restore keys: baseline, candidate. Both passed and recorded no OOM or OOM-kill events.
make static-check-analysiselapsedThe full package graph and 12 enabled golangci linters were unchanged; both had zero final golangci findings and the 139 emitted molint diagnostic records matched. This establishes output parity, not correctness of the existing molint failure gating, which is tracked separately. These are single-run measurements; effective CPU quota, host load and exact build/page-cache warmth were not recorded, so they do not predict a precise timing improvement.
off, existingGOFLAGS, legacy handling and license/analysis failures.off.actionlintandgit diff --checkpassed. There is no Go source or test change; Go UT race and BVT are not applicable to this workflow-only change.gpt-6.1-terraatmaxreasoning effort.Remaining risk
The candidate's loader reached a sampled
current - inactive_filepeak of 7.919 GiB, versus 7.358 GiB in the baseline. This misses the proposed 7.5 GiB whole-scan headroom target; the metric includes file memory that may be reclaimable and is not a hard measure of unreclaimable memory. The candidate's loader had fourmemory.events maxincrements versus none in the baseline loader; one pair cannot determine causation. The Go soft limit does not bound aggregate compiler or non-Go memory. Further evidence is needed if loader OOM recurs; this change does not guarantee that the whole job stays below the container limit.The legacy 4.2 path and SCA on larger runner overrides have not been benchmarked with this setting. An explicit higher limit or
offcan remove the mitigation.