All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] RFC: exit on incoming exec migrate failure
@ 2009-12-09 21:10 Andrew Farmer
  2009-12-11 21:19 ` Daniel P. Berrange
  0 siblings, 1 reply; 3+ messages in thread
From: Andrew Farmer @ 2009-12-09 21:10 UTC (permalink / raw)
  To: qemu-devel

Right now, if an incoming migrate through exec fails, the qemu process will end up chewing CPU indefinitely - it looks like it closes the migration FD but doesn't remove its IO handler properly. An easy way to reproduce this is to try launching with -incoming exec:/bin/false. This is obviously useless, but illustrates the issue handily.

One solution might be to retry the command on migrate failure, but that won't really help in all circumstances (for instance, if the migration command is broken!), so it seems equally appropriate to just die if an incoming exec migration fails. The patch is trivial, and follows - does this look sensible? (I'm new to qemu development, but trying to pick it up.)

diff --git a/migration-exec.c b/migration-exec.c
index c830669..0292c19 100644
--- a/migration-exec.c
+++ b/migration-exec.c
@@ -114,7 +114,7 @@ static void exec_accept_incoming_migration(void *opaque)
     ret = qemu_loadvm_state(f);
     if (ret < 0) {
         fprintf(stderr, "load of migration failed\n");
-        goto err;
+        exit(0);
     }
     qemu_announce_self();
     dprintf("successfully loaded vm state\n");
@@ -123,7 +123,6 @@ static void exec_accept_incoming_migration(void *opaque)
     if (autostart)
         vm_start();
 
-err:
     qemu_fclose(f);
 }

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

end of thread, other threads:[~2009-12-14 19:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-09 21:10 [Qemu-devel] RFC: exit on incoming exec migrate failure Andrew Farmer
2009-12-11 21:19 ` Daniel P. Berrange
2009-12-14 19:05   ` Andrew Farmer

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.