AMDEPYC / AMDEPYC/sev-certify

Clean up QEMU processes in sev_verify

Abierto
#266 0 comentarios 0 reacciones 0 asignados Ver en GitHub
enhancement
Lenguaje dominante
Python
Estrellas
3
Forks
7
Merge medio
1 d 21 h
PR fusionados (30 d)
8

Descripción

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.

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.