From: Fabiano Rosas <farosas@suse.de>
To: Prasad Pandit <ppandit@redhat.com>
Cc: Peter Xu <peterx@redhat.com>,
qemu-devel@nongnu.org, Prasad Pandit <pjp@fedoraproject.org>
Subject: Re: [PATCH] migration: introduce MIGRATION_STATUS_FAILING
Date: Wed, 14 Jan 2026 09:16:02 -0300 [thread overview]
Message-ID: <871pjspeyl.fsf@suse.de> (raw)
In-Reply-To: <CAE8KmOw+g3gZYJfay=9gwkhtkviA_K9BapfmJBhD+BzTCcxLxg@mail.gmail.com>
Prasad Pandit <ppandit@redhat.com> writes:
> On Tue, 13 Jan 2026 at 01:15, Fabiano Rosas <farosas@suse.de> wrote:
>> There are failures that happen _because_ we cancelled. As I've mentioned
>> somewhere else before, the cancellation is not "informed" to all threads
>> running migration code, there are some code paths that will simply fail
>> as a result of migration_cancel(). We need to allow cancelling to work
>> in a possibly stuck thread (such as a blocked recv in the return path),
>> but this means we end up calling qemu_file_shutdown indiscriminately.
>> In these cases, parts of the code would set FAILED, but that failure is
>> a result of cancelling. We've determined that migrate-cancel should
>> always lead to CANCELLED and a new migration should always be possible.
>
> * I see.
>
>> This is ok, call it an error and done.
>>
>> > OTOH, if we cancel while processing an error/failure, end user
>> > may not see that error because we report - migration was cancelled.
>> >
>>
>> This is interesting, I _think_ it wouldn't be possible to cancel while
>> handling an error due to BQL locked, the migrate-cancel wouldn't be
>> issued while migration_cleanup is ongoing. However, I don't think we ever
>> tested this scenario in particular. Maybe you could try to catch
>> something by modifying the /migration/cancel tests, if you're willing.
>
> * I have made a note of looking at it at a later time.
>
>> Aside from the QAPI states, there are some internal states we already
>> track with separate flags, e.g.:
>>
>> rp_thread_created, start_postcopy, migration_thread_running,
>> switchover_acked, postcopy_package_loaded, fault_thread_quit,
>> preempt_thread_status, load_threads_abort.
>>
>> A bit array could maybe cover all of these and more.
>>
>> ---
>>
>> You could send a PoC patch with your idea fixing this FAILING bug? We'd
>> need a trigger for migrate, set_caps, etc and the failed event.
>>
>> If that new patch doesn't get consensus then we merge this one and work
>> on a new design as time permits.
>
> * Considering the above wider coverage area, I think it is best to
> first fix the issue at hand and then move to this new change. For now
> I'll try to rebase my current patch on your v3: cleanup early
> connection code series. Once that is through, I'll take the states
> change patch. Hope that's okay.
>
Ok, go ahead.
> Thank you.
> ---
> - Prasad
next prev parent reply other threads:[~2026-01-14 12:17 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-22 11:48 [PATCH] migration: introduce MIGRATION_STATUS_FAILING Prasad Pandit
2025-12-22 14:29 ` Fabiano Rosas
2025-12-23 11:17 ` Prasad Pandit
2025-12-23 15:04 ` Fabiano Rosas
2026-01-06 10:54 ` Prasad Pandit
2026-01-06 14:53 ` Peter Xu
2025-12-23 15:30 ` Peter Xu
2025-12-23 16:01 ` Fabiano Rosas
2026-01-06 11:45 ` Prasad Pandit
2026-01-06 13:47 ` Fabiano Rosas
2026-01-07 10:49 ` Prasad Pandit
2026-01-07 13:23 ` Fabiano Rosas
2026-01-12 13:05 ` Prasad Pandit
2026-01-12 19:45 ` Fabiano Rosas
2026-01-13 11:59 ` Prasad Pandit
2026-01-14 12:16 ` Fabiano Rosas [this message]
2026-01-06 15:09 ` Peter Xu
2026-01-07 11:11 ` Prasad Pandit
2026-01-07 17:03 ` Peter Xu
2025-12-23 15:17 ` Peter Xu
2025-12-23 15:36 ` Fabiano Rosas
2025-12-23 16:27 ` Peter Xu
2026-01-06 10:49 ` Prasad Pandit
2026-01-06 15:23 ` Peter Xu
2026-01-07 11:01 ` Prasad Pandit
2026-01-07 17:07 ` 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=871pjspeyl.fsf@suse.de \
--to=farosas@suse.de \
--cc=peterx@redhat.com \
--cc=pjp@fedoraproject.org \
--cc=ppandit@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.