gdb: Ctrl-C then continue cancels the guest call

Offen
#1,973 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Anfängerfreundlichkeit
75/100
Issue-Typ
Bug
Klarheit
Klar beschrieben
Aktivitätsstatus
Aktiv
Tech-Stack
rust

Rechercherichtung

Start in src/hyperlight_host/src/hypervisor/hyperlight_vm/mod.rs around the Cancelled arm at line 769 and read how handle_debug(Interrupt) and cancel_requested control the run loop. The issue reports a gdb example test confirming the reproduction, but does not name its file. Update the behavior so the loop continues after a debug stop unless cancellation was requested; confirm the gdb interrupt and detach reproduction no longer returns ExecutionCanceledByHost.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

S-confirmed

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.

Vorherrschende Sprache
Rust
Sterne
4.8k
Forks
223
Ø Merge
1 T. 18 Std.
Gemergte PRs (30 T.)
65

Entwicklungsumgebung

In Codespaces öffnen

Startet den Dev-Container des Projekts im Browser, mit Ihrem eigenen GitHub-Konto.

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus hyperlight-dev/hyperlight

Alle Issues in hyperlight-dev/hyperlight

Ähnliche Issues

Weitere Issues zu Rust

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.