[libvirt] [PATCH] qemu: migration: Don't crash on access to 'current' job

Jiri Denemark jdenemar at redhat.com
Mon Apr 30 11:03:55 UTC 2018


On Fri, Apr 27, 2018 at 16:26:36 +0200, Peter Krempa wrote:
> When a VM is destroyed while being migrated (waiting in
> qemuMigrationSrcWaitForCompletion) the private object cleanup code frees
> the 'current' job info. Since the migration code attempts to setup
> various aspects of the current job even on failure this results into a
> crash.
> 
> Job data is cleared in qemuDomainObjPrivateDataClear since commit
> 888aa4b6b9db
> 
> Signed-off-by: Peter Krempa <pkrempa at redhat.com>
> ---
> I'm not certain that there isn't any other bigger root cause for this,
> but if the job is not present due to the VM being destroyed, it does not
> make much sense to set any data.

In other words, the crash happens when the domain is destroyed during
migration. I think it would make more sense to change the code after the
"error" label to skip everything but qemuMigrationSrcStopTunnel() if the
domain is not active anymore. It doesn't make sense to cancel the
migration and drive mirrors if the QEMU process is already gone.

Jirka




More information about the libvir-list mailing list