AMDEPYC / AMDEPYC/sev-certify

Clean up QEMU processes in sev_verify

オープン
#266 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
enhancement
主要言語
Python
スター
3
フォーク
7
平均マージ
1日 21時間
マージ済み PR(30日)
8

説明

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.

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。