Skip to content

gdb: Ctrl-C then continue cancels the guest call #1973

Open

Description

@ludfjig

After gdb interrupts a running guest, continue or detach makes the guest call fail with ExecutionCanceledByHost.

The Cancelled arm handles the debug stop, then always falls through to break Err(RunVmError::ExecutionCancelledByHost) (hyperlight_vm/mod.rs#L769). kill_from_debugger sets only the debug bit, so the cancel was never requested. The behavior dates back to #924.

Repro: attach gdb to a sandbox calling SpinForMs(15000), interrupt, then detach. The call returns ExecutionCanceledByHost. Confirmed with a gdb example test.

Fix: after handle_debug(Interrupt) returns, continue the run loop unless cancel_requested is set.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    S-needs-triageThe issue has not yet been reviewed.

    Type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions