On Tue, Aug 24, 2021 at 10:04:19PM +0400, Marc-André Lureau wrote: > Hi
Hello, Marc-Andre, > > On Tue, Aug 24, 2021 at 7:27 PM Peter Xu <pet...@redhat.com> wrote: > > > Both dump-guest-memory and live migration caches vm state at the beginning. > > Either of them entering the other one will cause race on the vm state, and > > even > > more severe on that (please refer to the crash report in the bug link). > > > > Let's block live migration in dump-guest-memory, and that'll also block > > dump-guest-memory if it detected that we're during a live migration. > > > > How does it detect that migration is in progress? migrate_add_blocker() (and the new migrate_add_blocker_internal()) guaranteed it; it will only succeed if there's no migration, and it should cover both sides of migration (as I think migration_is_idle() should return true on both src/dst when there's one): if (migration_is_idle()) { migration_blockers = g_slist_prepend(migration_blockers, reason); return 0; } error_propagate_prepend(errp, error_copy(reason), "disallowing migration blocker " "(migration in progress) for: "); return -EBUSY; That's why I removed the old check on incoming migration: - if (runstate_check(RUN_STATE_INMIGRATE)) { - error_setg(errp, "Dump not allowed during incoming migration."); - return; - } Because I think it'll cover that case too. Thanks, -- Peter Xu