|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v2] libxl: wait for QEMU exit before restarting a domain
On 2026-11-10 18:22, Jan Beulich wrote: > On 10.11.2026 11:02, Jiaqing Zhao wrote: >> The PID-based device model destruction path returns immediately after >> sending SIGHUP, before QEMU has necessarily exited. When an HVM guest >> reboots with VNC enabled, the new QEMU process may fail to bind the VNC >> port because the old process still holds it. >> >> Wait for QEMU to exit in a child process after signaling it for at most >> 10 seconds. If waiting fails or times out, log the error and retain the >> existing domain destruction behaviour. >> >> Signed-off-by: Jiaqing Zhao <Zhao.Jiaqing@xxxxxxx> >> --- >> v2: >> * Share the fork, error handling and child exit handling between UID and >> PID-based destruction paths. >> * Reduce the device-model stop timeout from 60 to 10 seconds. > > As per my v1 comments I continue to question this. I looked further into QEMU's shutdown path. After receiving SIGHUP, QEMU calls bdrv_drain_all() to wait for outstanding block I/O requests and bdrv_flush_all() to flush its block devices. These could take longer than 10 seconds on slow storage. While this does not identify the timeout you observed with SR-IOV, my earlier measurements are insufficient to prove that 10s is enough. I'll restore the 60s timeout in v3. >> * Handle unexpected errors from kill(pid, 0) explicitly. >> * Fix misspelled "signaling" in commit message. >> * Coding style fixes against tools/libs/light/CODING_STYLE. >> --- >> Cc: Anthony PERARD <anthony.perard@xxxxxxxxxx> >> Cc: Juergen Gross <jgross@xxxxxxxx> >> Cc: Roger Pau Monné <roger@xxxxxxxxxxxxxx> > > You will want to use a correct address here (.org rather than .com). > > Jan That was my mistake, sorry. By the way, on MAINTAINERS:390, Roger's address uses .com, maybe it need to be fixed?
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |