From: Peter Xu <peterx@redhat.com>
To: Leonardo Bras <leobras.c@gmail.com>, lukasstraub2@web.de
Cc: qemu-devel@nongnu.org, lukasstraub2@web.de, berrange@redhat.com,
"Dr. David Alan Gilbert" <dgilbert@redhat.com>,
Juan Quintela <quintela@redhat.com>
Subject: Re: [PATCH v3 1/1] yank: Unregister function when using TLS migration
Date: Tue, 1 Jun 2021 10:50:24 -0400 [thread overview]
Message-ID: <YLZJME3kiFe0rMRe@t490s> (raw)
In-Reply-To: <20210601054030.1153249-1-leobras.c@gmail.com>
On Tue, Jun 01, 2021 at 02:40:31AM -0300, Leonardo Bras wrote:
> After yank feature was introduced in migration, whenever migration
> is started using TLS, the following error happens in both source and
> destination hosts:
>
> (qemu) qemu-kvm: ../util/yank.c:107: yank_unregister_instance:
> Assertion `QLIST_EMPTY(&entry->yankfns)' failed.
>
> This happens because of a missing yank_unregister_function() when using
> qio-channel-tls.
>
> Fix this by also allowing TYPE_QIO_CHANNEL_TLS object type to perform
> yank_unregister_function() in channel_close() and multifd_load_cleanup().
>
> Also, inside migration_channel_connect() and
> migration_channel_process_incoming() move yank_register_function() so
> it only runs once on a TLS migration.
Slightly inaccurate I guess, as it was run once too before this patch, but not
paired for tls?
IIUC when we call the 2nd time at below chunk we won't register again:
if (object_dynamic_cast(OBJECT(ioc), TYPE_QIO_CHANNEL_SOCKET)) {
yank_register_function(MIGRATION_YANK_INSTANCE,
migration_yank_iochannel,
QIO_CHANNEL(ioc));
}
Because the 2nd call will be TYPE_QIO_CHANNEL_TLS, so object_dynamic_cast()
will return with a failure, I think (note, TYPE_QIO_CHANNEL_TLS's parent is
TYPE_QIO_CHANNEL, not TYPE_QIO_CHANNEL_SOCKET).
>
> Fixes: b5eea99ec2f ("migration: Add yank feature", 2021-01-13)
> Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=1964326
> Signed-off-by: Leonardo Bras <leobras.c@gmail.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Thanks Leo!
I have one pure question not directly related to Leo's patch (probably for
Lukas?): we check OBJECT(ioc)->ref == 1 when unregister each function. In what
case will the ref be not one?
--
Peter Xu
next prev parent reply other threads:[~2021-06-01 14:51 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-01 5:40 [PATCH v3 1/1] yank: Unregister function when using TLS migration Leonardo Bras
2021-06-01 11:00 ` Lukas Straub
2021-06-01 17:48 ` Leonardo Brás
2021-06-01 14:50 ` Peter Xu [this message]
2021-06-01 15:32 ` Lukas Straub
2021-06-01 16:04 ` Peter Xu
2021-06-01 20:49 ` Leonardo Brás
2021-06-08 17:51 ` Dr. David Alan Gilbert
2021-06-14 11:57 ` Dr. David Alan Gilbert
2021-06-27 11:10 ` Alexander Graf
2021-06-28 11:28 ` Dr. David Alan Gilbert
2021-06-28 13:12 ` Alexander Graf
2021-06-28 16:35 ` Daniel P. Berrangé
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=YLZJME3kiFe0rMRe@t490s \
--to=peterx@redhat.com \
--cc=berrange@redhat.com \
--cc=dgilbert@redhat.com \
--cc=leobras.c@gmail.com \
--cc=lukasstraub2@web.de \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
/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.