runtime-adapter: a_clone_refuses_a_scratch_image_whose_upper_an_earlier_clone_used fails intermittently
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- linux, rust
- Domain
- infrastructure, operating-systems
Research direction
Start with tests/runtime-adapter/tests/vm_clone.rs, then trace graceful stop through nvx-rs/src/guest/root.rs and nvx-rs/src/guest/sys/port.rs. Check whether every stop path syncs or unmounts the scratch filesystem before power-off, including failures when another mount namespace holds the root. Done when graceful stop leaves a copied scratch image with its expected entries and the intermittent clone test passes.
Written by the indexing model from the issue text.
Description
a_clone_refuses_a_scratch_image_whose_upper_an_earlier_clone_used (tests/runtime-adapter/tests/vm_clone.rs) failed twice in CI on the Linux KVM runner (Guests and sandboxes), and passed on each rerun: run 40852461399 (attempt 1) and run 40943638955 (attempt 1). Both times the second start, over a copy of the earlier clone's scratch image, started (exit 0, sandbox=started) instead of ending with CLONE_FAILED (8) and unusable-root.
The guest's check_fresh (nvx-rs/src/guest/root.rs) accepts an upper whose upper and work directories are missing or empty. So the copy held none of the entries that the earlier clone wrote there: the overlay's work directory, and the file of the contents probe, which the test had checked reached the upper. Yet the test copied the image only after a stop that reported graceful, success 0 and complete.
Likely cause: the earlier clone's writes to the scratch's ext4 file system had not all reached the image when its VM powered off. ext4 commits its journal every 5 seconds by default, a clone reaches its probe and its stop within seconds, and the guest powers the VM off through the control port (power_off in nvx-rs/src/guest/sys/port.rs), which flushes nothing itself. To check:
- whether the stop unmounts or syncs the scratch's file system before the power-off, on every path, and whether an unmount that fails (for example, while another mount namespace still holds the root) goes unreported;
- if it does not, sync the scratch (
syncfs) or unmount it before the power-off, so that a graceful stop leaves the scratch image complete. A scratch that is kept across boots needs the same.
Found in #957 (5102663a added the test), and seen again while validating stacked PRs on dev. Related to #833.
- Dominant language
- Rust
- Stars
- 758
- Forks
- 48
- Avg merge
- 18h 27m
- Merged PRs (30d)
- 446
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/nvx
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 69/100
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
microsoft/nvx#1055 · 1 comment ·
Maintainers usually reply within 1 day
-
ci: move the performance history's commits off devPossibly taken @ppenna claimed this today. Open
Difficulty 4/5 3-5 days Newbie friendliness 25/100
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
yunfie-twitter/Palleria#474 ·
Maintainers usually reply within 1 day
-
good first issue help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
servo/rust-smallvec#827 ·
Maintainers usually reply within 1 day
-
bug tests
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day