Skip to content

Say why a VS chunk chain is lost, and stop claiming it cannot be - #109

Merged
glslang merged 1 commit into
mainfrom
agent/unplaced-investigation
Aug 14, 2026
Merged

Say why a VS chunk chain is lost, and stop claiming it cannot be#109
glslang merged 1 commit into
mainfrom
agent/unplaced-investigation

Conversation

@glslang

@glslang glslang commented Aug 14, 2026

Copy link
Copy Markdown
Owner

Rebased onto main now that #108 has merged. Diagnostic wording and documentation only,
no behaviour change.

What unplaced_bytes actually is

It has been exactly 290,816 bytes over 19 extents on four consecutive live walks
the same extents at the same addresses each time. Too stable to be damage, and until now
unexplained.

Splitting the diagnostic by cause gives 13 extents whose chain named a header it could
not read, and 6 more in those same regions that were already lost behind them. Carrying
how far back the named header is put it inside the hole rather than before it:

VS extent at 0xffffdf080c20d000 ... the chain named 0xffffdf080c20ce00, 0x200 bytes back
                                    previous extent ended 0xffffdf080c20c000

which contradicts the reason I gave in walk_vs for believing the chain always crosses a
hole: that a decommitted range is the interior of a free chunk, so the allocator has to
keep its own headers reachable.

That is true of decommitted memory. A hole is not only decommitted memory. !pte on
each named address:

VA ffffdf080c20ce00 ... PTE contains 00007DDE00000084
not valid   PageFile: 0   Offset: 7dde   Protect: 4 - ReadWrite

A pagefile PTE, not a zero one — paged pool that is committed and paged out. The
header is really there; a KD link simply cannot fault a page in. So unplaced_bytes is
not a walker defect and not corruption: it is memory unreachable from a live target,
which is why the figure is identical run to run on an idle VM and why the same walk over
a dump carrying paged memory would not lose it.

Why nothing is being recovered here

The obvious next step would be to re-anchor from reusable_chunks/cached_chunks — the
free-tree and delay-free chunk addresses the walk already collects are validated chunk
boundaries, so resuming from one inside an unplaced extent would not be a guess. I have
not done it, and I do not think it is worth it: 290,816 bytes is roughly 0.3% of a walk
that reaches 446k chunks, the recovery would be partial (only where a free chunk happens
to start in the extent), and it adds a second way for the chain to be wrong in exchange.
Worth revisiting only if this figure ever grows.

Verification

cargo test (125 pass), cargo clippy --all-targets clean, re-run after the rebase. The
wording was read off four live runs; the last one produced the samples quoted above.

@coderabbitai

coderabbitai Bot commented Aug 14, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@glslang, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 36 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 99b10821-aa9c-4241-870a-f04f86be39a7

📥 Commits

Reviewing files that changed from the base of the PR and between c67acaf and bc60139.

📒 Files selected for processing (1)
  • src/pool/snapshot.rs

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.

Base automatically changed from agent/stall-is-the-region-ending to main August 14, 2026 17:23
`unplaced_bytes` has sat at exactly 290,816 over 19 extents on four consecutive
live walks, which is too stable to be damage and was unexplained. It is now
explained, and the explanation contradicts a claim I put in `walk_vs`'s own
documentation: that the chain always crosses a hole, because a decommitted
range is the interior of a free chunk and the allocator keeps its headers
reachable.

True of decommitted memory. A hole is not only decommitted memory. On the live
target the chain named a header inside every hole it failed to cross, and
`!pte` on those addresses says why:

    VA ffffdf080c20ce00 ... PTE contains 00007DDE00000084
    not valid  PageFile: 0  Offset: 7dde  Protect: 4 - ReadWrite

A pagefile PTE, not a zero one: paged pool that is committed and paged out. The
header really is there and a KD link cannot fault it in, so those bytes are
unreachable from a live target rather than missing from the pool — and the same
walk against a dump carrying paged memory would not lose them.

The diagnostic splits into its two causes, since `PoolDiagnostics` folds numbers
but not words and a walk should say which it met: 13 extents whose chain named
an unreadable header, and 6 further extents in those same regions that were
already lost. It also carries how far back the named header is, which is what
placed it inside the hole rather than before it.

No behaviour change. This is the walk explaining a number it already reported.
@glslang
glslang force-pushed the agent/unplaced-investigation branch from f2c3776 to bc60139 Compare August 14, 2026 17:25
@glslang
glslang merged commit 40f79cd into main Aug 14, 2026
9 checks passed
@glslang
glslang deleted the agent/unplaced-investigation branch August 14, 2026 17:26
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.

1 participant