Skip to content

heap: the freeze runs under the moving collector, so rt-ci can move objects under the rdb boot - #1074

Merged
sims1253 merged 1 commit into
mainfrom
g3/h-mover-freeze
Nov 29, 2026
Merged

sims1253 merged 1 commit into
mainfrom
g3/h-mover-freeze

Conversation

@sims1253

Copy link
Copy Markdown
Owner

The moving collector's checks (ROBIGO_GC_MOVE=1 and young:N) ran with the boot heap's freeze off. Under the rdb boot that meant marking and moving base and the compiler, 42k objects, at every collection. That was too slow, so rt-ci's young:16 step and the nightly's --full-move ran under M1's loader, and M1 can't be deleted while they do. This is PR 2 of the council's three (after #1072): the freeze now runs under the movers.

 gc/freeze.rs     freeze_enabled = freeze_on (was && !gc_move); refuse_check_under_mover; make_mortal clears MOVED;
                  module docs; tests (freeze_core, composed(), four new)
 gc/mover.rs      forward_heap's I1 check (UnloggedFrozen); the refusal validated before the setters change anything
 gc.rs            Core::new refuses ROBIGO_GC_FREEZE_CHECK + ROBIGO_GC_MOVE
 layout/access.rs mark_seen_by_c marks a FROZEN object too (a thaw may make it ordinary under C)
 api.c            seen(): the same
 tests            freeze_check_env.rs (new binary); heap.rs's mover helpers and an rtcore alloc test turn the freeze off
 docs/ledger/g3/2026-11-29-h-mover-freeze.md   the argument, what is lost, measurements
  • Why it holds: frozen objects are immortal, so they never move. Every edge from a frozen object to a movable one is in the log (I1), which a young collection marks from and rewrites, and a full one forwards. The ledger walks through each mover, phase 1 inside a moving collection, and the address-keyed state. forward_heap now fails the check if a frozen object outside the log names a moved object.
  • What is lost: objects that stay frozen are no longer moved after the start. The start-torture steps still move them during the start, and PR 3 keeps a nightly freeze-off step for after it. A thawed object is new coverage: it moves, or dies, at the collection that thaws it.
  • Measured (rdb, freeze on):
    • young:16 + gctorture over the conformance slice: 8.0 min against today's M1 step's 7.3 min, with no ratcheted case failing.
    • tailcall-frames.R under young:16: 64 s (M1: 71 s). Under =1: 446 s (M1: 267 s), within the nightly's 1,200 s allowance.
    • The frozen set is 42,388 objects under every mode.
  • Out of scope: the rt-ci and nightly flips and the nightly freeze-off slice (PR 3). Sol's S1, element pointers C reads out of a payload, predates this PR and is filed as robigo-rt debug mover: an object C reads out of a payload (DATAPTR of a list) is not marked SEEN_BY_C, so it can move under C #1073.

Proof:

  • cargo test -p robigo-heap -p robigo-rtcore passes plain and under rt-ci's three collector environments: the mover (=1, freeze off), young:16, and the GC stats check with the freeze check.
  • Local gate green on 00c95f4: full scripts/rt-ci.py (42.6 min), --shard debug-assertions (4.8 of 5 min), scripts/lint-job.sh (11/11).

Reviewed with sol-loop: 4 rounds with gpt-6.2-sol. Sol verdict: approved

Claude Opus 5.5 on behalf of Max

…ve with the boot heap frozen

The moving modes (ROBIGO_GC_MOVE=1, young:N) ran with the freeze off,
so under the rdb boot they marked and moved base and the compiler at
every collection, and their rt-ci and nightly steps needed M1's loader.
Now (PR 2 of the council's three):

- freeze_enabled is freeze_on; a mover still cannot start after the
  boot boundary.
- ROBIGO_GC_FREEZE_CHECK under a mover is refused (Core::new and the
  setters, validated before anything changes).
- a frozen object handed to C under the mover is marked SEEN_BY_C, so a
  thaw cannot move it under C; a thawed object is young (MOVED cleared).
- forward_heap fails the check when a frozen object outside the log
  names an object the collection moved (I1).

The argument, measurements and tests: docs/ledger/g3/2026-11-29-h-mover-
freeze.md. Tests that are not about the composed modes stop the
environment's mover (freeze_core) or turn the freeze off (the mover-only
helpers), as rt-ci's crates' steps run them under both.
@coderabbitai

coderabbitai Bot commented Nov 29, 2026

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: f6aa4b58-4cee-4eec-9c00-83643538bda7
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@github-actions github-actions Bot added the size:L 100-499 changed lines outside tests label Nov 29, 2026
@github-actions

Copy link
Copy Markdown

Test delta

added removed net
Rust #[test]s +5 -0 +5

468 changed lines outside tests, 42 in tests: size:L.

@github-actions

Copy link
Copy Markdown

✅ OpenCodeReview: Review partially complete: 0 finding(s); 6 of 8 selected item(s) failed.

@sims1253
sims1253 merged commit 7e97e9f into main Nov 29, 2026
36 checks passed
@sims1253
sims1253 deleted the g3/h-mover-freeze branch November 29, 2026 12:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L 100-499 changed lines outside tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant