]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: Grab a QUERY job when formatting domain XML
authorMichal Privoznik <mprivozn@redhat.com>
Wed, 11 Dec 2024 12:26:45 +0000 (13:26 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Thu, 12 Dec 2024 13:46:25 +0000 (14:46 +0100)
commit6cc93bf28842526be2fd596a607ebca796b7fb2e
tree04b4a009845410a59a9ad4f628ae6805a82b86a2
parent56d448ad0ff124a1d1d7cb4d87a710953a6c755f
qemu: Grab a QUERY job when formatting domain XML

It may happen that, for instance after daemon restart, that one
thread is still in qemuProcessReconnect(), i.e. filling in
runtime information by talking to QEMU on monitor. If another
thread then tries to format domain XML (which is currently
guarded by plain mutex on virDomainObj) it'll produce incomplete
and misleading information (e.g. current size of virtio-mem).
This happens because the reconnecting thread talks to QEMU on
monitor and thus unlocks the domain object frequently allowing
the XML formatting thread to acquire the mutex meanwhile.

Resolves: https://issues.redhat.com/browse/RHEL-71042
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/qemu/qemu_driver.c