Hello, Peter,
I submitted one issue as the link:
With libvirtd debug log level. The issue I reproduced with work flows.
Thank You!
13520781732@xxxxxx
From: Peter KrempaDate: 2021-08-16 17:17CC: libvir-listSubject: Re: Issue report: Snapshot-create-as block while the vm's process is killed out.On Mon, Aug 16, 2021 at 11:04:12 +0800, 13520781732@xxxxxx wrote:>> Hello,>> I have meet one issues while using snapshot-create-as with external file.>> Centos 8,> Libivirt 7.0.0> Qemu: 5.2.0>> While making one snapshot with memory and disk extaernal file, and killing the process of the vm qemu same time mostly, the snapshot-create-as command blocked.> So it will failed to start the vm again for "cannot acquire state change lock (held by monitor=remoteDispatchDomainSnapshotCreateXML)".[...]>>> The call work flow one is:> qemuSnapshotCreateActiveExternal -> qemuSaveImageCreate -> qemuMigrationSrcToFile -> qemuMigrationSrcWaitForCompletion -> virDomainObjWait>> The others is similar :> qemuSnapshotCreateXML -> ...>>> It may be resume after the restart libvirtd.service.>> Is it correct that the stat change lock should be unlocked while the vm is terminal or shutdown and how to fix it?The function handling the shutdown of the monitor is supposed to wake upall waiting threads, which should prevent such a problem.In this case the log attached is not enough to see what's reallyhappening, so please attach a full debug log and ideally report theissue in our gitlab issue tracker:https://gitlab.com/libvirt/libvirt/-/issues/newGuidance on how to setup logging for debugging can be found at:https://libvirt.org/kbase/debuglogs.html#less-verbose-logging-for-qemu-vms