You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit bfaed88
Browse filesBrowse the repository at this point in the historyBrowse files
sidecar_client: leave VP stopped when the driver rejects a start (#5237)
`start_async` marked the VP running before the start ioctl and left it
that
way if the ioctl failed. The sidecar driver rejects a start in
`sidecar_claim` before starting the CPU, so no completion ever arrives:
a
later `run` panicked on the "stopped" assertion and a `wait` would hang.
The
VP state is shared, so re-acquiring the VP accessor did not reset it.
This change returns the VP to stopped when the start fails. It is still
marked
running before the ioctl, because a completion can arrive as soon as the
CPU
starts.
To make this unit-testable, the state transition moves unchanged into
`SidecarClientState::start_vp`, which `start_async` calls with the same
ioctl.
Test changes (the crate's first unit tests):
- A rejected `run` through the real ioctl (`/dev/null` returns `ENOTTY`)
leaves
the VP stopped and reusable with a re-acquired accessor (failed before).
- A rejected start leaves the VP stopped and can be retried (failed
before).
- The VP is marked running while the start request is issued.
0 commit comments