From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: Yu Zhang <yu.zhang@ionos.com>, Het Gala <het.gala@nutanix.com>,
qemu-devel <qemu-devel@nongnu.org>,
Li Zhijian <lizhijian@fujitsu.com>,
Fabiano Rosas <farosas@suse.de>, Peter Xu <peterx@redhat.com>
Cc: Jinpu Wang <jinpu.wang@ionos.com>,
Alexei Pastuchov <alexei.pastuchov@ionos.com>,
Elmar Gerdes <elmar.gerdes@ionos.com>
Subject: Re: Problem with migration/rdma
Date: Wed, 6 Mar 2024 17:30:32 +0100 [thread overview]
Message-ID: <04da4267-8fe8-4653-90a2-f64e3be64037@linaro.org> (raw)
In-Reply-To: <CAHEcVy7HXSwn4Ow_Kog+Q+TN6f_kMeiCHevz1qGM-fbxBPp1hQ@mail.gmail.com>
Cc'ing RDMA migration reviewers/maintainers:
$ ./scripts/get_maintainer.pl -f migration/rdma.c
Li Zhijian <lizhijian@fujitsu.com> (reviewer:RDMA Migration)
Peter Xu <peterx@redhat.com> (maintainer:Migration)
Fabiano Rosas <farosas@suse.de> (maintainer:Migration)
On 5/3/24 22:32, Yu Zhang wrote:
> Hello Het and all,
>
> while I was testing qemu-8.2, I saw a lot of our migration test cases failed.
> After debugging the commits of the 8.2 branch, I saw the issue and mad a diff:
>
> diff --git a/migration/rdma.c b/migration/rdma.c
> index 6a29e53daf..f10d56f556 100644
> --- a/migration/rdma.c
> +++ b/migration/rdma.c
> @@ -3353,9 +3353,9 @@ static int qemu_rdma_accept(RDMAContext *rdma)
> goto err_rdma_dest_wait;
> }
>
> - isock->host = rdma->host;
> + isock->host = g_strdup_printf("%s", rdma->host);
> isock->port = g_strdup_printf("%d", rdma->port);
>
> which was introduced by the commit below:
>
> commit 3fa9642ff7d51f7fc3ba68e6ccd13a939d5bd609 (HEAD)
> Author: Het Gala <het.gala@nutanix.com>
> Date: Mon Oct 23 15:20:45 2023 -0300
>
> migration: convert rdma backend to accept MigrateAddress
>
> RDMA based transport backend for 'migrate'/'migrate-incoming' QAPIs
> accept new wire protocol of MigrateAddress struct.
>
> It is achived by parsing 'uri' string and storing migration parameters
> required for RDMA connection into well defined InetSocketAddress struct.
> ...
>
> A debug line
> isock->host = rdma->host;
> isock->port = g_strdup_printf("%d", rdma->port);
> +fprintf(stdout, "QEMU: %s, host %s, port %s\n", __func__,
> isock->host, isock->port);
>
> produced this error:
> QEMU: qemu_rdma_accept, host ::, port 8089
> corrupted size vs. prev_size in fastbins
>
> on the target host, which may indicate a crash related to the memory
> allocation or a memory
> corruption of the data. With the patch, it doesn't happen any more,
> and the migration is fine.
> Could you be kind to test this and confirm the issue?
>
> Furthermore, I'm confused by the two struct:
>
> struct InetSocketAddressBase {
> char *host;
> char *port;
> };
>
> struct InetSocketAddress {
> /* Members inherited from InetSocketAddressBase: */
> char *host;
> char *port;
>
> To my understanding, they are used to consolidate the separated data
> to a well-defined
> struct "MigrateAddress", while the struct whose member receive their
> data has a different type:
>
> typedef struct RDMAContext {
> char *host;
> int port;
> ...
> }
>
> Is there any reason to keep "port" like this (char* instead of int) or
> can we improve it?
> Thank you so much for any of your comments!
>
> Best regards,
>
> Yu Zhang @ IONOS Compute Platform
> 05.03.2024
>
next prev parent reply other threads:[~2024-03-06 16:31 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-05 21:32 Yu Zhang
2024-03-06 16:30 ` Philippe Mathieu-Daudé [this message]
2024-03-07 2:41 ` Problem with migration/rdma Zhijian Li (Fujitsu) via
2024-03-07 3:36 ` Peter Xu
2024-03-08 6:27 ` Yu Zhang
2024-03-08 6:55 ` Peter Xu
2024-03-08 7:03 ` Zhijian Li (Fujitsu) via
2024-03-08 7:14 ` Peter Xu
[not found] ` <CAOQbQt0+UbfZNPrticjLD4X+S2KR4r+yWPATnhEhTRuxbwvGiQ@mail.gmail.com>
[not found] ` <CAHEcVy78iCXVGmwr-2snpFwOyCxv3wxYrYJonK6nZF9UfbX_bw@mail.gmail.com>
2024-03-11 11:14 ` Yu Zhang
2024-03-11 14:30 ` Het Gala
2024-03-11 14:46 ` Peter Xu
2024-03-11 14:53 ` Het Gala
2024-03-11 15:16 ` Yu Zhang
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=04da4267-8fe8-4653-90a2-f64e3be64037@linaro.org \
--to=philmd@linaro.org \
--cc=alexei.pastuchov@ionos.com \
--cc=elmar.gerdes@ionos.com \
--cc=farosas@suse.de \
--cc=het.gala@nutanix.com \
--cc=jinpu.wang@ionos.com \
--cc=lizhijian@fujitsu.com \
--cc=peterx@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=yu.zhang@ionos.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 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).