All of lore.kernel.org
 help / color / mirror / Atom feed
From: Fabiano Rosas <farosas@suse.de>
To: Peter Xu <peterx@redhat.com>
Cc: "Denis V. Lunev" <den@virtuozzo.com>,
	"Denis V. Lunev" <den@openvz.org>,
	qemu-devel@nongnu.org,
	"Marc-André Lureau" <marcandre.lureau@redhat.com>,
	"Laurent Vivier" <lvivier@redhat.com>
Subject: Re: [PATCH 0/2] migration: fix a source hang on cancel before the channel connects
Date: Fri, 27 Nov 2026 11:21:08 -0300	[thread overview]
Message-ID: <87jylyqrsb.fsf@suse.de> (raw)
In-Reply-To: <awmFhmY655FPdXI8@zhexu-thinkpadt14gen5.rmtcaon.csb>

Peter Xu <peterx@redhat.com> writes:

> On Fri, Nov 27, 2026 at 09:49:50AM -0300, Fabiano Rosas wrote:
>> >> One of the cancel tests issues migrate_cancel(to), that puts the error
>> >> in s->error and since QEMU keeps running, a subsequent migration
>> >> crashes. We free the error at migrate_init() and migrate_prepare() for
>> >> similar reasons I think.
>> >
>> > But this is migrate_incoming, which means if something got wrong, instead
>> > of retrying, we should kill the qemu and re-initiate?  I don't know if we
>> > could have other loopholes on this path to be invoked more than once.. as I
>> > never expected it to run twice (either success and take over, or halted for
>> > query error only, or killed).
>> >
>> 
>> I think this is only about calling cancel _without_ any migration:
>> 
>> $ (echo "migrate_cancel"; echo "quit") | ~/qemu-system-x86_64 -S -monitor stdio -incoming defer -trace migration_cancel
>> QEMU 11.1.92 monitor - type 'help' for more information
>> (qemu) migrate_cancel
>> migration_cancel 
>> (qemu) quit
>> migration_cancel
>> 
>> So a state check in there could be good enough.
>
> Ouch, so it runs through even without migration? :(
>
> If the "state check" you mentioned means failing migrate_cancel() when
> !migration_is_running(), I definitely agree.

Are there any consequences for the user in failing the command? We could
also simply skip.

I'll pickup patch 2 from Denis and put into a series along with this^
check.


  reply	other threads:[~2026-11-27 14:21 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-25 19:31 [PATCH 0/2] migration: fix a source hang on cancel before the channel connects Denis V. Lunev
2026-11-25 19:31 ` [PATCH 1/2] migration: fix " Denis V. Lunev
2026-11-25 19:31 ` [PATCH 2/2] tests/qtest/migration: test " Denis V. Lunev
2026-11-26 19:33   ` Peter Xu
2026-11-25 23:26 ` [PATCH 0/2] migration: fix a source hang on " Fabiano Rosas
2026-11-26 14:02   ` Denis V. Lunev
2026-11-26 14:38     ` Fabiano Rosas
2026-11-26 19:32       ` Peter Xu
2026-11-26 19:39         ` Peter Xu
2026-11-26 21:20         ` Fabiano Rosas
2026-11-27 12:22           ` Peter Xu
2026-11-27 12:49             ` Fabiano Rosas
2026-11-27 13:28               ` Peter Xu
2026-11-27 14:21                 ` Fabiano Rosas [this message]
2026-11-27 14:59                   ` Peter Xu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87jylyqrsb.fsf@suse.de \
    --to=farosas@suse.de \
    --cc=den@openvz.org \
    --cc=den@virtuozzo.com \
    --cc=lvivier@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=peterx@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.