Repository navigation
Conversation
Pass --lazy-pages to CRIU so that the dump leaves the memory pages out of the image and serves them on demand from a page server. The contest test checks that CRIU starts listening on the page server port and that the container keeps running with --leave-running. As in runc's integration test, it is skipped when CRIU lacks uffd-noncoop. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: donkomura <koiru3822fs@gmail.com>
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The readiness-timeout fallback can kill only the runtime while leaving CRIU blocked in accept(), leaking the page server, so forced cleanup must terminate CRIU too.
1 open issue
What changed in this PR
Adds --lazy-pages checkpoint support, wiring the CLI option through to CRIU so memory pages can be served on demand rather than stored in checkpoint images.
Changes:
- Passes the lazy-pages flag through the CLI, checkpoint options, and CRIU configuration.
- Adds an integration test for page-server readiness and
--leave-running, skipped when CRIU lacksuffd-noncoop. - Extracts shared timeout-waiting and unused-port helpers.
| File | Description |
|---|---|
| tests/contest/contest/src/tests/lifecycle/container_lifecycle.rs | Registers the lazy-pages test and feature checks. |
| tests/contest/contest/src/tests/lifecycle/checkpoint.rs | Adds lazy-pages testing and shared process helpers. |
| crates/youki/src/commands/checkpoint.rs | Forwards the CLI flag into checkpoint options. |
| crates/liboci-cli/src/checkpoint.rs | Exposes --lazy-pages. |
| crates/libcontainer/src/container/container.rs | Adds the lazy-pages checkpoint option. |
| crates/libcontainer/src/container/container_checkpoint.rs | Configures CRIU with the lazy-pages setting. |
Review effort: Balanced
Comment on lines
+893
to
+894
| let _ = self.child.kill(); | ||
| let _ = self.child.wait(); |
This branch has not been deployed
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.

Description
Pass --lazy-pages to CRIU so that the dump leaves the memory pages out of the image and serves them on demand from a page server.
The contest test checks that CRIU starts listening on the page server port and that the container keeps running with --leave-running. As in runc's integration test, it is skipped when CRIU lacks uffd-noncoop.
Type of Change
Testing
Related Issues
#3394
Additional Context
Difference from runc
Before a lazy-pages dump, runc sends a
FEATURE_CHECKrequest to CRIU. If CRIU does not support lazy pages, runc fails early withcriu is missing features: [LazyPages]. youki does not make this check, because rust-criu has no public API to send aFEATURE_CHECKrequest. With an unsupported CRIU, youki does not reject the request beforehand, and the checkpoint fails during the dump with CRIU's own error.The feature check will be added outside this PR. The plan is to add the API to rust-criu first and, after a rust-criu release includes it, call it from youki when
--lazy-pagesis given.