AMDEPYC / AMDEPYC/sev-certify

Clean up QEMU processes in sev_verify

Offen
#266 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
enhancement
Vorherrschende Sprache
Python
Sterne
3
Forks
7
Ø Merge
1 T. 21 Std.
Gemergte PRs (30 T.)
8

Beschreibung

Killing `sev_verify` (with CTRL-C for instance) while a VM is still up does NOT kill the qemu process, resulting in an orphan process that needs to get cleaned up, as well as blocking the next run from completing:

```
── 3.0.0-0 ──
attestation-test Launch an SEV-SNP guest and verify attestation report
Artifacts: artifacts/3.0/3.0.0-0/attestation_test
├─ Calculate measurement ······································· 117ms [PASS]
├─ Launch SEV-SNP guest ········································· 2.0s [ERR!]
│ QEMU exited immediately with code 1: qemu-system-x86_64: -device vhost-vsock-pci,guest-cid=3,id=vsock0: vhost-vsock: unable to set guest cid: Address already in use
│ [Hint] A previous VM may still be running. Try: sudo kill $(pgrep -f 'qemu.*guest-cid')
```

Implement a cleanup function + signal handler to call it. Brownie points to handle a crash or SIGKILL (where signal handlers cannot catch and trigger a cleanup), or if sev_verify can auto-handle `address already in use` when it pertains to an orphan process from a previous run.

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

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