Skip to content

openvmm: an uncertain snapshot quiesce makes teardown or a later lifecycle request panic #1148

Closed

Description

@tangruize

When a microVM device does not finish stopping before the snapshot quiesce deadline, the capture failure can be followed by a VM-worker panic during teardown. The worker can also panic if it accepts another lifecycle request after a failed or uncertain state transition.

In vmm_core/state_unit/src/lib.rs, StateUnits::stop assumes a running set contains only units eligible for an ordinary Stop:

    /// Stops all the state units.
    pub async fn stop(&mut self) {
        assert!(self.running);
        // Stop units in reverse dependency order so that a dependency is not
        // stopped before its dependant.
        self.run_op(

quiesce_for_save leaves an unfinished unit QuiesceUncertain while the set remains marked running. LoadedVm::run calls pause() before teardown, so that unit reaches run_op, whose state check rejects it. Separately, the worker's request loop continues after an uncertain quiesce or failed start, allowing a later Stop or Reset to reach a terminal unit.

Trigger

Let a unit's Stop take longer than the snapshot quiesce timeout. Request capture, receive an uncertain quiesce error, then terminate the source VM or send another lifecycle request. A failed restart during ResumeAfterFailedSnapshot also leaves terminal units that subsequent requests must not operate on.

Fix

fix.patch repairs both windows: stopping a running set queues another Stop behind the unfinished transition, and the worker checks for terminal units after answering the triggering request and ends its request loop.

The Stop remains unbounded if the device never completes it. This does not settle all failed-start units or repair dead unit channels; partial-restart cleanup is a separate rollback defect.

Activity

  1. tangruize commented on Nov 1, 2026

    @tangruize
    ContributorAuthor

    Proposed patch

    Patch against OpenVMM 998b9f2402050cd16d1faa897bc831ef1434be48. Save the contents below as fix.patch and run git apply fix.patch.

    fix.patch
    diff --git a/vmm_core/state_unit/src/lib.rs b/vmm_core/state_unit/src/lib.rs
    --- a/vmm_core/state_unit/src/lib.rs
    +++ b/vmm_core/state_unit/src/lib.rs
    @@ -524,6 +524,15 @@
             self.running
         }
     
    +    /// Whether a failed or uncertain state transition left a terminal unit.
    +    pub fn has_stuck_unit(&self) -> bool {
    +        self.inner
    +            .lock()
    +            .units
    +            .values()
    +            .any(|unit| unit.state == State::QuiesceUncertain)
    +    }
    +
         /// Starts any units that are individually stopped, because they were added
         /// via [`StateUnits::add`] while the VM was running.
         ///
    @@ -543,6 +552,18 @@
         /// Stops all the state units.
         pub async fn stop(&mut self) {
             assert!(self.running);
    +        // A failed save quiesce leaves units whose stop did not complete in
    +        // `QuiesceUncertain` while the set stays running. Stop them again: the
    +        // new request queues behind the unfinished one, so this waits for the
    +        // unit to stop rather than leaving it running during teardown.
    +        // (`quiesce_for_save` serves microVM snapshots only, which have no
    +        // VMBus, so no such unit runs under `run_async_unit`, which rejects a
    +        // second transition while one is in flight.)
    +        for unit in self.inner.lock().units.values_mut() {
    +            if unit.state == State::QuiesceUncertain {
    +                unit.state = State::Running;
    +            }
    +        }
             // Stop units in reverse dependency order so that a dependency is not
             // stopped before its dependant.
             self.run_op(
    diff --git a/vmm_core/state_unit/src/tests/quiesce.rs b/vmm_core/state_unit/src/tests/quiesce.rs
    --- a/vmm_core/state_unit/src/tests/quiesce.rs
    +++ b/vmm_core/state_unit/src/tests/quiesce.rs
    @@ -170,3 +170,38 @@
         assert!(started.elapsed() < Duration::from_millis(500));
         assert!(!units.is_running());
     }
    +
    +/// Witness (Setup suspicion S-1): after a save quiesce that leaves a unit's state uncertain, the
    +/// VM worker's teardown still calls `StateUnits::stop` (`LoadedVm::run` -> `pause`), which must
    +/// not panic: the source terminates after an uncertain quiesce.
    +#[async_test]
    +async fn test_stop_after_uncertain_quiesce_does_not_panic(driver: DefaultDriver) {
    +    let mut units = StateUnits::new();
    +    let _unit = units
    +        .add("slow")
    +        .spawn(&driver, {
    +            let driver = driver.clone();
    +            |recv| {
    +                run_unit(
    +                    SlowStopUnit {
    +                        driver,
    +                        delay: Duration::from_secs(1),
    +                    },
    +                    recv,
    +                )
    +            }
    +        })
    +        .unwrap();
    +    units.start().await.unwrap();
    +
    +    let error = units
    +        .quiesce_for_save(Duration::from_millis(10))
    +        .await
    +        .unwrap_err();
    +    assert!(error.has_uncertain_state());
    +    // `quiesce_for_save` left `running` set; the worker's teardown pauses the VM.
    +    assert!(units.is_running());
    +    units.stop().await;
    +    assert!(!units.is_running());
    +}
    +
    diff --git a/openvmm/openvmm_core/src/worker/dispatch.rs b/openvmm/openvmm_core/src/worker/dispatch.rs
    --- a/openvmm/openvmm_core/src/worker/dispatch.rs
    +++ b/openvmm/openvmm_core/src/worker/dispatch.rs
    @@ -4120,6 +4120,9 @@
             let mut worker_rpc = worker_rpc_recv;
     
             loop {
    +            if self.state_units.has_stuck_unit() {
    +                break;
    +            }
                 let event: Event = {
                     let a = rpc_recv.recv().map(Event::VmRpc);
                     let b = worker_rpc.recv().map(Event::WorkerRpc);
    diff --git a/openvmm/openvmm_entry/src/vm_controller/microvm/kvm_tests.rs b/openvmm/openvmm_entry/src/vm_controller/microvm/kvm_tests.rs
    new file mode 100644
    --- /dev/null
    +++ b/openvmm/openvmm_entry/src/vm_controller/microvm/kvm_tests.rs
    @@ -0,0 +1,396 @@
    +// Copyright (c) Microsoft Corporation.
    +// Licensed under the MIT License.
    +
    +//! KVM tests of the VM worker's side of a guest-requested microVM snapshot.
    +//!
    +//! Each test builds the VM configuration from an `openvmm` command line,
    +//! launches the VM worker in this process (as `--single-process` does), and
    +//! takes the controller's place: it receives the guest's snapshot request and
    +//! sends the snapshot requests itself, in orders the controller does not.
    +//!
    +//! The tests need `/dev/kvm` and OpenVMM's Linux direct test kernel and
    +//! initrd (`.packages/underhill-deps-private/x64/{vmlinux,initrd}` after
    +//! `cargo xflowey restore-packages`; `OPENVMM_TEST_LINUX_KERNEL` and
    +//! `OPENVMM_TEST_LINUX_INITRD` select others), so they are ignored by default.
    +//! Run them with
    +//!
    +//! ```text
    +//! cargo nextest run -p openvmm_entry --run-ignored only -E 'test(/kvm_tests::/)'
    +//! ```
    +
    +// The VM worker in this process needs what the `openvmm` binary links.
    +extern crate openvmm_hypervisors as _;
    +extern crate openvmm_resources as _;
    +
    +use crate::Options;
    +use crate::VmResources;
    +use crate::meshworker::VmmMesh;
    +use crate::microvm::MicrovmLaunch;
    +use chipset_resources::microvm::MicrovmSnapshotScratchPolicy;
    +use clap::Parser;
    +use futures::StreamExt;
    +use mesh::CancelContext;
    +use mesh::rpc::RpcSend;
    +use mesh_worker::WorkerEvent;
    +use mesh_worker::WorkerHandle;
    +use openvmm_defs::rpc::SnapshotQuiesceError;
    +use openvmm_defs::rpc::VmRpc;
    +use openvmm_defs::worker::VM_WORKER;
    +use openvmm_defs::worker::VmWorkerParameters;
    +use pal_async::DefaultDriver;
    +use pal_async::DefaultPool;
    +use std::path::Path;
    +use std::path::PathBuf;
    +use std::time::Duration;
    +use test_with_tracing::test;
    +use vmm_core_defs::HaltReason;
    +
    +/// The guest's init: requests a fresh-scratch snapshot (a write to port
    +/// 0x605), and once the request returns, powers off with status 7 (port
    +/// 0x604).
    +const GUEST_INIT: &str = r#"#!/bin/busybox sh
    +mount -t devtmpfs devtmpfs /dev 2>/dev/null || true
    +printf '\000' | dd of=/dev/port bs=1 seek=1541 count=1 conv=notrunc 2>/dev/null
    +printf '\007' | dd of=/dev/port bs=1 seek=1540 count=1 conv=notrunc 2>/dev/null
    +while :; do sleep 1; done
    +"#;
    +/// A guest's init that never requests a snapshot.
    +const GUEST_IDLE_INIT: &str = r#"#!/bin/busybox sh
    +mount -t devtmpfs devtmpfs /dev 2>/dev/null || true
    +while :; do sleep 1; done
    +"#;
    +const GUEST_INIT_PATH: &str = "kvm-test-init";
    +const GUEST_STATUS: u8 = 7;
    +
    +/// Time for the guest to boot and request its snapshot.
    +const BOOT_TIMEOUT: Duration = Duration::from_secs(120);
    +/// Time for the guest to power off once it runs again.
    +const GUEST_TIMEOUT: Duration = Duration::from_secs(60);
    +/// How long a VM that must stay stopped is watched.
    +const STOPPED_WINDOW: Duration = Duration::from_secs(5);
    +/// Time for the VM worker to end and tear the VM down.
    +const EXIT_TIMEOUT: Duration = Duration::from_secs(60);
    +
    +/// How the VM worker ended, as its host reports it.
    +#[derive(Debug, PartialEq)]
    +enum WorkerExit {
    +    /// It returned normally (`WorkerEvent::Stopped`).
    +    Stopped,
    +    /// It returned an error.
    +    Failed(String),
    +    /// Its events ended with no final event: the worker's thread unwound (a
    +    /// panic).
    +    Vanished,
    +    /// It had not ended when the wait timed out.
    +    StillRunning,
    +}
    +
    +/// A microVM whose worker runs in this process, with the test as its
    +/// controller.
    +struct TestVm {
    +    rpc: mesh::Sender<VmRpc>,
    +    halts: mesh::Receiver<HaltReason>,
    +    snapshot_requests: mesh::Receiver<MicrovmSnapshotScratchPolicy>,
    +    quiesce_timeout: Duration,
    +    worker: WorkerHandle,
    +    mesh: VmmMesh,
    +    _microvm: MicrovmLaunch,
    +    _resources: VmResources,
    +}
    +
    +impl TestVm {
    +    /// Launches a 1-VP microVM on KVM that runs [`GUEST_INIT`], with RAM in a
    +    /// snapshot destination's automatic backing under `dir`, and starts it.
    +    async fn start(driver: &DefaultDriver, dir: &Path) -> anyhow::Result<Self> {
    +        Self::start_with_init(driver, dir, GUEST_INIT).await
    +    }
    +
    +    /// As [`Self::start`], with the guest running `init` instead.
    +    async fn start_with_init(
    +        driver: &DefaultDriver,
    +        dir: &Path,
    +        init: &str,
    +    ) -> anyhow::Result<Self> {
    +        let vm = Self::launch(driver, dir, init, None).await?;
    +        anyhow::ensure!(
    +            vm.rpc.call_failable(VmRpc::Resume, ()).await?,
    +            "the new VM was already running"
    +        );
    +        Ok(vm)
    +    }
    +
    +    /// As [`Self::start_with_init`], without starting the VM, and with the
    +    /// worker given `ready_sink` as its restore readiness sink.
    +    async fn launch(
    +        driver: &DefaultDriver,
    +        dir: &Path,
    +        init: &str,
    +        ready_sink: Option<std::fs::File>,
    +    ) -> anyhow::Result<Self> {
    +        anyhow::ensure!(Path::new("/dev/kvm").exists(), "this test needs /dev/kvm");
    +        let kernel = test_artifact("OPENVMM_TEST_LINUX_KERNEL", "vmlinux");
    +        let base_initrd = test_artifact("OPENVMM_TEST_LINUX_INITRD", "initrd");
    +        let initrd = dir.join("initrd");
    +        std::fs::write(
    +            &initrd,
    +            initrd_cpio::inject_into_initrd(
    +                &fs_err::read(&base_initrd)?,
    +                GUEST_INIT_PATH,
    +                init.as_bytes(),
    +                0o100755,
    +            )?,
    +        )?;
    +        let path = |path: &Path| path.to_str().unwrap().to_owned();
    +        let mut opt = Options::try_parse_from([
    +            "openvmm".to_owned(),
    +            "--machine".to_owned(),
    +            "microvm".to_owned(),
    +            "--hypervisor".to_owned(),
    +            "kvm".to_owned(),
    +            "--processors".to_owned(),
    +            "1".to_owned(),
    +            "--memory".to_owned(),
    +            "128M".to_owned(),
    +            "--kernel".to_owned(),
    +            path(&kernel),
    +            "--initrd".to_owned(),
    +            path(&initrd),
    +            "--cmdline".to_owned(),
    +            format!("rdinit=/{GUEST_INIT_PATH}"),
    +            "--snapshot-destination".to_owned(),
    +            path(&dir.join("snapshot")),
    +            "--single-process".to_owned(),
    +        ])?;
    +
    +        // As `run_control_inner` builds and launches the VM worker.
    +        let mesh = VmmMesh::new(driver, opt.single_process)?;
    +        let restore = crate::snapshot_restore::SnapshotRestore::open(&opt)?;
    +        let microvm_restore = crate::microvm::prepare_restore(&mut opt, restore.snapshot())?;
    +        let (vm_config, mut resources) =
    +            crate::vm_config_from_command_line(driver, &mesh, &opt, &microvm_restore).await?;
    +        let mut microvm = MicrovmLaunch::new(
    +            &opt,
    +            &vm_config,
    +            std::mem::take(&mut resources.microvm),
    +            microvm_restore,
    +        )?;
    +        let (rpc, rpc_recv) = mesh::channel();
    +        let (notify_send, halts) = mesh::channel();
    +        let (snapshot_boundary_requests, snapshot_ready, snapshot_requests) =
    +            microvm.snapshot_channels();
    +        let hypervisor =
    +            openvmm_helpers::hypervisor::hypervisor_resource(opt.hypervisor.as_deref().unwrap())?;
    +        let shared_memory = microvm.capture_shared_memory()?;
    +        let restore = restore.into_worker();
    +        let params = VmWorkerParameters {
    +            hypervisor,
    +            cfg: vm_config,
    +            saved_state: None,
    +            shared_memory,
    +            shared_memory_copy_on_write: restore.shared_memory_copy_on_write,
    +            snapshot_restore_guards: restore.guards,
    +            snapshot_boundary_requests,
    +            snapshot_ready,
    +            restore_time: restore.time,
    +            restore_ready_sink: ready_sink,
    +            restore_gate_timeout: microvm.restore_gate_timeout(&opt),
    +            restore_vp_count: opt.microvm.restore_processors,
    +            rpc: rpc_recv,
    +            notify: notify_send,
    +        };
    +        let worker = mesh
    +            .make_host("vm", None)
    +            .await?
    +            .launch_worker(VM_WORKER, params)
    +            .await?;
    +
    +        Ok(Self {
    +            rpc,
    +            halts,
    +            snapshot_requests: snapshot_requests
    +                .ok_or_else(|| anyhow::anyhow!("the microVM has no snapshot-request port"))?,
    +            quiesce_timeout: Duration::from_millis(opt.microvm.snapshot_quiesce_timeout_ms),
    +            worker,
    +            mesh,
    +            _microvm: microvm,
    +            _resources: resources,
    +        })
    +    }
    +
    +    /// Waits until the worker holds the guest's snapshot request at its
    +    /// boundary and notifies the controller.
    +    async fn snapshot_boundary(&mut self) -> anyhow::Result<MicrovmSnapshotScratchPolicy> {
    +        Ok(CancelContext::new()
    +            .with_timeout(BOOT_TIMEOUT)
    +            .until_cancelled(self.snapshot_requests.recv())
    +            .await
    +            .map_err(|_| anyhow::anyhow!("the guest did not request a snapshot in time"))??)
    +    }
    +
    +    /// Returns the guest's next halt within `timeout`, if any.
    +    async fn next_halt(&mut self, timeout: Duration) -> anyhow::Result<Option<HaltReason>> {
    +        match CancelContext::new()
    +            .with_timeout(timeout)
    +            .until_cancelled(self.halts.recv())
    +            .await
    +        {
    +            Ok(halt) => Ok(Some(halt?)),
    +            Err(_) => Ok(None),
    +        }
    +    }
    +
    +    /// Waits up to `timeout` for the VM worker to end on its own, and returns
    +    /// how it ended.
    +    async fn worker_exit(&mut self, timeout: Duration) -> WorkerExit {
    +        let worker = &mut self.worker;
    +        let ended = async move {
    +            while let Some(event) = worker.next().await {
    +                match event {
    +                    WorkerEvent::Stopped => return WorkerExit::Stopped,
    +                    WorkerEvent::Failed(err) => return WorkerExit::Failed(format!("{err:#}")),
    +                    WorkerEvent::Started | WorkerEvent::RestartFailed(_) => {}
    +                }
    +            }
    +            WorkerExit::Vanished
    +        };
    +        CancelContext::new()
    +            .with_timeout(timeout)
    +            .until_cancelled(ended)
    +            .await
    +            .unwrap_or(WorkerExit::StillRunning)
    +    }
    +
    +    async fn shutdown(mut self) -> anyhow::Result<()> {
    +        self.worker.stop();
    +        self.worker.join().await?;
    +        self.mesh.shutdown().await;
    +        Ok(())
    +    }
    +}
    +
    +/// OpenVMM's Linux direct test artifact `name`, or the file `var` names.
    +fn test_artifact(var: &str, name: &str) -> PathBuf {
    +    std::env::var_os(var).map_or_else(
    +        || {
    +            Path::new(env!("CARGO_MANIFEST_DIR"))
    +                .join("../../.packages/underhill-deps-private/x64")
    +                .join(name)
    +        },
    +        PathBuf::from,
    +    )
    +}
    +
    +/// After an uncertain quiesce, the VM worker replies and then ends on its own,
    +/// cleanly (decision 4.23 of the spec readout).
    +///
    +/// A quiesce with a zero timeout cancels the units' `Stop` calls, so the units
    +/// it sent `Stop` to are left `QuiesceUncertain` and the VM is still marked
    +/// running. The controller terminates the VM then. A controller that instead
    +/// releases the boundary (accepted, since the VM is marked running) and pauses
    +/// sends the units `Stop` again, and that reaches a stuck unit.
    +#[test]
    +#[ignore = "needs /dev/kvm and the Linux direct test kernel and initrd"]
    +fn worker_ends_cleanly_after_an_uncertain_quiesce() {
    +    DefaultPool::run_with(async |driver| {
    +        let dir = tempfile::tempdir().unwrap();
    +        let mut vm = TestVm::start(&driver, dir.path()).await.unwrap();
    +        vm.snapshot_boundary().await.unwrap();
    +        let quiesce = vm
    +            .rpc
    +            .call(VmRpc::QuiesceForSnapshot, Duration::ZERO)
    +            .await
    +            .unwrap();
    +        assert!(
    +            matches!(quiesce, Err(SnapshotQuiesceError::Uncertain(_))),
    +            "a quiesce with a zero timeout returned {quiesce:?}"
    +        );
    +
    +        // What a controller may still send after the uncertain reply.
    +        let release = vm
    +            .rpc
    +            .call_failable(VmRpc::ReleaseSnapshotBoundary, ())
    +            .await;
    +        let pause = vm.rpc.call(VmRpc::Pause, ()).await;
    +        let exit = vm.worker_exit(EXIT_TIMEOUT).await;
    +        assert_eq!(
    +            exit,
    +            WorkerExit::Stopped,
    +            "the VM worker did not end cleanly after an uncertain quiesce: \
    +             ReleaseSnapshotBoundary returned {release:?}, Pause returned {pause:?}, \
    +             and the worker's exit within {EXIT_TIMEOUT:?} was {exit:?}"
    +        );
    +        vm.shutdown().await.unwrap();
    +    })
    +}
    +
    +/// After a failed rollback, the VM worker replies and then ends on its own,
    +/// cleanly (decision 4.31).
    +///
    +/// A rollback with a zero timeout cancels the units' `Start` calls, so the
    +/// units it sent `Start` to are left stuck. The controller terminates the VM
    +/// then.
    +#[test]
    +#[ignore = "needs /dev/kvm and the Linux direct test kernel and initrd"]
    +fn worker_ends_cleanly_after_a_failed_rollback() {
    +    DefaultPool::run_with(async |driver| {
    +        let dir = tempfile::tempdir().unwrap();
    +        let mut vm = TestVm::start(&driver, dir.path()).await.unwrap();
    +        vm.snapshot_boundary().await.unwrap();
    +        vm.rpc
    +            .call(VmRpc::QuiesceForSnapshot, vm.quiesce_timeout)
    +            .await
    +            .unwrap()
    +            .expect("QuiesceForSnapshot failed");
    +        let rollback = vm
    +            .rpc
    +            .call_failable(VmRpc::ResumeAfterFailedSnapshot, Duration::ZERO)
    +            .await;
    +        assert!(
    +            rollback.is_err(),
    +            "a rollback with a zero timeout returned {rollback:?}"
    +        );
    +        let exit = vm.worker_exit(EXIT_TIMEOUT).await;
    +        assert_eq!(
    +            exit,
    +            WorkerExit::Stopped,
    +            "the VM worker did not end cleanly after a failed rollback: \
    +             ResumeAfterFailedSnapshot returned {rollback:?}, and the worker's exit \
    +             within {EXIT_TIMEOUT:?} was {exit:?}"
    +        );
    +        vm.shutdown().await.unwrap();
    +    })
    +}
    +
    +/// A failed Resume that leaves no unit stuck does not end the VM worker: the
    +/// next Resume starts the VM (decision 4.31).
    +///
    +/// The worker's restore readiness sink is a file it cannot write, so the
    +/// first start's readiness event fails after the units started, and the
    +/// units are stopped again, cleanly. The sink is used once.
    +#[test]
    +#[ignore = "needs /dev/kvm and the Linux direct test kernel and initrd"]
    +fn worker_keeps_serving_after_a_failed_resume_without_stuck_units() {
    +    DefaultPool::run_with(async |driver| {
    +        let dir = tempfile::tempdir().unwrap();
    +        let sink_path = dir.path().join("ready");
    +        std::fs::write(&sink_path, b"").unwrap();
    +        let read_only_sink = std::fs::File::open(&sink_path).unwrap();
    +        let mut vm = TestVm::launch(&driver, dir.path(), GUEST_INIT, Some(read_only_sink))
    +            .await
    +            .unwrap();
    +        let first = vm.rpc.call_failable(VmRpc::Resume, ()).await;
    +        assert!(
    +            matches!(first, Err(mesh::rpc::RpcError::Call(_))),
    +            "the first Resume, with an unwritable readiness sink, returned {first:?}"
    +        );
    +        let second = vm.rpc.call_failable(VmRpc::Resume, ()).await;
    +        assert!(
    +            matches!(second, Ok(true)),
    +            "after a failed Resume that left no unit stuck, the next Resume returned {second:?}"
    +        );
    +        // The guest runs: it requests its snapshot.
    +        vm.snapshot_boundary().await.unwrap();
    +        vm.shutdown().await.unwrap();
    +    })
    +}
    +
    diff --git a/openvmm/openvmm_entry/Cargo.toml b/openvmm/openvmm_entry/Cargo.toml
    --- a/openvmm/openvmm_entry/Cargo.toml
    +++ b/openvmm/openvmm_entry/Cargo.toml
    @@ -132,6 +132,11 @@
     build_rs_guest_arch.workspace = true
     
     [dev-dependencies]
    +initrd_cpio.workspace = true
    +# The in-process microVM tests link what the `openvmm` binary links: the
    +# resource resolvers and the VM worker, and the KVM backend.
    +openvmm_hypervisors = { workspace = true, features = ["virt_kvm"] }
    +openvmm_resources = { workspace = true, features = ["virt_kvm"] }
     test_with_tracing.workspace = true
     
     [lints]
    diff --git a/openvmm/openvmm_entry/src/vm_controller/microvm.rs b/openvmm/openvmm_entry/src/vm_controller/microvm.rs
    --- a/openvmm/openvmm_entry/src/vm_controller/microvm.rs
    +++ b/openvmm/openvmm_entry/src/vm_controller/microvm.rs
    @@ -554,6 +554,9 @@
         }
     }
     
    +#[cfg(all(test, target_os = "linux", guest_arch = "x86_64"))]
    +mod kvm_tests;
    +
     #[cfg(test)]
     mod tests {
         use super::*;
    diff --git a/Cargo.lock b/Cargo.lock
    --- a/Cargo.lock
    +++ b/Cargo.lock
    @@ -6279,6 +6279,7 @@
      "guid",
      "hyperv_ic_resources",
      "ide_resources",
    + "initrd_cpio",
      "input_core",
      "inspect",
      "inspect_proto",
    @@ -6295,7 +6296,9 @@
      "openvmm_build_info",
      "openvmm_defs",
      "openvmm_helpers",
    + "openvmm_hypervisors",
      "openvmm_pcat_locator",
    + "openvmm_resources",
      "openvmm_ttrpc_vmservice",
      "otel_tracing",
      "pal",
  2. ppenna commented on Nov 5, 2026

    @ppenna
    Contributor

    Re-triaged after #1260 (#1288, microsoft/openvmm#4921), which removes the deadline of the snapshot quiesce:

    • The uncertain quiesce is gone. The capture quiesces with StateUnits::stop and waits for every unit, so no unit is left QuiesceUncertain, SnapshotQuiesceError::Uncertain no longer exists, and the teardown panic after an uncertain quiesce that this issue reports cannot happen.
    • The second window remains, for a start. When the rollback of a failed capture, now StateUnits::start, finds a unit whose task does not answer, the unit stays in the terminal StartUncertain state and the source terminates. In the fork, only a later start refuses a terminal unit: a reset, save, or restore that reached it would still hit run_op's state assertion. state_unit: roll back a partial start instead of panicking openvmm#4872's head makes reset, save, and restore fail while a unit is in a terminal state and has stop stop such units, so the fork gets that once it adopts #4872's form of position 018.
    • A unit whose task ends still makes StateUnits::stop panic, upstream and in the fork; a follow-up pull request on state_unit: roll back a partial start instead of panicking openvmm#4872 makes it fail instead.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions