Skip to content

runsc/boot: validate version before loading async pages during restore - #16298

Closed
copybara-service[bot] wants to merge 1 commit into
masterfrom
test/cl1005912581
Closed

copybara-service[bot] wants to merge 1 commit into
masterfrom
test/cl1005912581

Conversation

@copybara-service

Copy link
Copy Markdown

runsc/boot: validate version before loading async pages during restore

Problem

In runsc/boot/controller.go, Restore() spawned kernel.NewAsyncMFLoader before checking the checkpoint version. When restoring a checkpoint from a different runsc build, the background loader started parsing incompatible page headers immediately, causing a panic (makeslice: len out of range) instead of returning a clean error.

My fix

Move statefile reading and the version check before creating mainMF and starting NewAsyncMFLoader. Incompatible checkpoints now fail fast with a clear version error.

Fixes #14278

FUTURE_COPYBARA_INTEGRATE_REVIEW=#14279 from DARSHANR007:fix-restore-version-check ddf6027

@copybara-service copybara-service Bot added the exported Issue was exported automatically label Oct 23, 2026
@copybara-service
copybara-service Bot force-pushed the test/cl1005912581 branch 2 times, most recently from 572f6ff to 1e1821a Compare October 24, 2026 09:36
### Problem
In `runsc/boot/controller.go`, `Restore()` spawned `kernel.NewAsyncMFLoader` before checking the checkpoint version. When restoring a checkpoint from a different `runsc` build, the background loader started parsing incompatible page headers immediately, causing a panic (`makeslice: len out of range`) instead of returning a clean error.

### My fix
Move statefile reading and the version check before creating `mainMF` and starting `NewAsyncMFLoader`. Incompatible checkpoints now fail fast with a clear version error.

Fixes #14278

FUTURE_COPYBARA_INTEGRATE_REVIEW=#14279 from DARSHANR007:fix-restore-version-check ddf6027
PiperOrigin-RevId: 1005912581
@copybara-service copybara-service Bot closed this Oct 30, 2026
@copybara-service
copybara-service Bot deleted the test/cl1005912581 branch October 30, 2026 11:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

exported Issue was exported automatically

Projects

None yet

Development

Successfully merging this pull request may close these issues.

restore: pages file is parsed before the runsc_version check

1 participant