qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Use multifd state to determine if multifd cleanup is needed
@ 2024-10-07 15:44 Shivam Kumar
  2024-10-07 16:26 ` Peter Xu
  0 siblings, 1 reply; 9+ messages in thread
From: Shivam Kumar @ 2024-10-07 15:44 UTC (permalink / raw)
  To: qemu-devel; +Cc: peterx, farosas, Shivam Kumar

If the client calls the QMP command to reset the migration
capabilities after the migration status is set to failed or cancelled
but before multifd cleanup starts, multifd cleanup can be skipped as
it will falsely assume that multifd was not used for migration. This
will eventually lead to source QEMU crashing due to the following
assertion failure:

yank_unregister_instance: Assertion `QLIST_EMPTY(&entry->yankfns)`
failed

Check multifd state to determine whether multifd was used or not for
the migration rather than checking the state of multifd migration
capability.

Signed-off-by: Shivam Kumar <shivam.kumar1@nutanix.com>
---
 migration/multifd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/migration/multifd.c b/migration/multifd.c
index 9b200f4ad9..427c9a7956 100644
--- a/migration/multifd.c
+++ b/migration/multifd.c
@@ -487,7 +487,7 @@ void multifd_send_shutdown(void)
 {
     int i;
 
-    if (!migrate_multifd()) {
+    if (!multifd_send_state) {
         return;
     }
 
-- 
2.22.3



^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2024-10-09 13:20 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-07 15:44 [PATCH] Use multifd state to determine if multifd cleanup is needed Shivam Kumar
2024-10-07 16:26 ` Peter Xu
2024-10-08 12:09   ` Shivam Kumar
2024-10-08 14:00     ` Peter Xu
2024-10-08 14:20   ` Fabiano Rosas
2024-10-08 15:03     ` Peter Xu
2024-10-08 18:40       ` Fabiano Rosas
2024-10-09 10:02         ` Shivam Kumar
2024-10-09 13:19           ` Fabiano Rosas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).