Skip to content

ci(gc): make the forced-evacuation arm actually evacuate, and assert it (#7336) - #7338

Merged
proggeramlug merged 1 commit into
mainfrom
fix/7336-vacuous-evac-arm
Aug 3, 2026
Merged

ci(gc): make the forced-evacuation arm actually evacuate, and assert it (#7336)#7338
proggeramlug merged 1 commit into
mainfrom
fix/7336-vacuous-evac-arm

Conversation

@proggeramlug

@proggeramlug proggeramlug commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Fixes #7336. The gate whose results were being used to argue for making statepoints the default was evacuating nothing.

Measured

copied_objects and moved_objects were 0 on all eight probes, and 5 of 8 matched zero stack-map records while the conservative scan did the rooting. The --require-fp-walks assert passed throughout, because it checks that a walk happened, not that it found anything.

Why

The probes drive collection with gc():

[gc-scan-fallback] site=manual_collect automatic=false count=1

gc() is a full mark-sweep behind a forced conservative scan, and PERRY_GC_FORCE_EVACUATE is read only on the MINOR path.

This is #6942/#6946 repeating — the case CLAUDE.md records verbatim as "months of 'passes under evacuation' meant nothing" — and it had reappeared inside the gate we were about to delete the shadow stack on the strength of.

The fix, and why the gate stays green

The evacuation arms now drive the minor path (PERRY_GC_HEAP_LIMIT=8 PERRY_GC_INCREMENTAL=0 PERRY_CONSERVATIVE_STACK_SCAN=off). Under that config all 8 probes move:

probe objects copied
01_nursery_churn 17,054
02_survivor_promotion 90,271
03_cross_gen_writes 41,132
04_dead_after_deep_stack 16,507
05_closure_capture 11,169
06_string_retention 16,234
07_array_grow_evacuate 16,134
08_map_set_sidetables 5,946

So this makes the arm real and keeps it green — the gate was passing on nothing, and now passes on something.

PERRY_CONSERVATIVE_STACK_SCAN=off is what makes the copying minor eligible; without it the trigger reports eligible=false fallback=conservative_stack (#7255).

The assertion

New scripts/gc_evacuation_liveness_assert.py requires at least one copying minor that copied at least one object, and when it finds none it names the cause rather than just failing — manual_collect (wrong path, #6942) or an ineligible copying minor (#7255).

Self-checked both ways against real traces: it fails the old vacuous run and passes the new one.

What this means for the adoption decision

#7314's evidence included "all three arms pass under PERRY_GC_FORCE_EVACUATE=1 PERRY_GC_VERIFY_EVACUATION=1". On these probes that arm was inert, so that particular claim was not evidence about moving GC. Anything re-measured after this lands is worth substantially more than anything measured before it.

Summary by CodeRabbit

  • Bug Fixes

    • Corrected forced-evacuation probes so they perform actual object evacuation instead of completing without moving objects.
    • Added validation to detect when evacuation activity is missing and report diagnostic information.
  • Tests

    • Expanded garbage-collection checks across multiple runtime configurations.
    • Added automated verification that copying collections occur and successfully move objects.

@proggeramlug
proggeramlug merged commit 480aab9 into main Aug 3, 2026
@proggeramlug
proggeramlug deleted the fix/7336-vacuous-evac-arm branch August 3, 2026 19:43
@coderabbitai

coderabbitai Bot commented Aug 3, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 81357440-fe17-457c-9667-6bf2d936a6f7

📥 Commits

Reviewing files that changed from the base of the PR and between 3961d5e and 8837b62.

📒 Files selected for processing (3)
  • .github/workflows/gc-native-roots.yml
  • changelog.d/7338-evacuation-arm-was-vacuous.md
  • scripts/gc_evacuation_liveness_assert.py

📝 Walkthrough

Walkthrough

The workflow now runs forced-evacuation probes with copying-minor settings and disables conservative scanning. A trace validator requires copying-minor activity and copied objects, and the workflow fails when a probe does not meet those conditions.

Changes

GC evacuation validation

Layer / File(s) Summary
Configure copying-minor probes
.github/workflows/gc-native-roots.yml
Forced-evacuation matrices use an 8-unit heap, disabled incremental GC, and disabled conservative stack scanning.
Validate evacuation activity
.github/workflows/gc-native-roots.yml, scripts/gc_evacuation_liveness_assert.py, changelog.d/7338-evacuation-arm-was-vacuous.md
The workflow validates each probe trace. The checker requires a copying minor and the configured number of copied objects. The changelog documents the corrected collection path and failure diagnostics.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related issues

  • PerryTS/perry issue 6946 — The workflow now uses copying-minor evacuation settings and checks copied-object diagnostics.
  • PerryTS/perry issue 6982 — The configuration overlaps with copying-minor stress cases, but this change does not address that issue’s crash.

Possibly related PRs

  • PerryTS/perry#7314 — Both changes update the native-roots workflow and validate forced-evacuation probes.
  • PerryTS/perry#7322 — This change extends the native-roots workflow introduced there.
  • PerryTS/perry#7057 — Both changes use constrained copying-minor settings and copied-object diagnostics.

Sequence Diagram(s)

sequenceDiagram
  participant Workflow
  participant GC runtime
  participant Trace validator
  Workflow->>GC runtime: Run each forced-evacuation probe with diagnostics
  GC runtime-->>Workflow: Produce GC trace
  Workflow->>Trace validator: Check copying-minor and copied-object counts
  Trace validator-->>Workflow: Return pass or failure
  Workflow-->>Workflow: Fail if any probe lacks evacuation activity
Loading
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/7336-vacuous-evac-arm

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.

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.

gc: the native-roots forced-evacuation arm is vacuous — nothing moves, and 5 of 8 probes match zero stack-map records

1 participant