From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
To: Lukas Straub <lukasstraub2@web.de>
Cc: Juan Quintela <quintela@redhat.com>,
qemu-devel <qemu-devel@nongnu.org>,
Hailiang Zhang <zhang.zhanghailiang@huawei.com>
Subject: Re: [PATCH v2 6/6] migration/migration.c: Fix hang in ram_save_host_page
Date: Mon, 1 Jun 2020 17:54:44 +0100 [thread overview]
Message-ID: <20200601165444.GJ2743@work-vm> (raw)
In-Reply-To: <e79085bbe2d46dfa007dd41820194d5e2d4fcd80.1590007004.git.lukasstraub2@web.de>
* Lukas Straub (lukasstraub2@web.de) wrote:
> migration_rate_limit will erroneously ratelimit a shutdown socket,
> which causes the migration thread to hang in ram_save_host_page
> if the socket is shutdown.
>
> Fix this by explicitly testing if the socket has errors or was
> shutdown in migration_rate_limit.
>
> Signed-off-by: Lukas Straub <lukasstraub2@web.de>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
and queued this one (the others in the series are the same as the v1)
> ---
> migration/migration.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/migration/migration.c b/migration/migration.c
> index 187ac0410c..e8bd32d48c 100644
> --- a/migration/migration.c
> +++ b/migration/migration.c
> @@ -3347,6 +3347,10 @@ bool migration_rate_limit(void)
> bool urgent = false;
> migration_update_counters(s, now);
> if (qemu_file_rate_limit(s->to_dst_file)) {
> +
> + if (qemu_file_get_error(s->to_dst_file)) {
> + return false;
> + }
> /*
> * Wait for a delay to do rate limiting OR
> * something urgent to post the semaphore.
> --
> 2.20.1
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
prev parent reply other threads:[~2020-06-01 16:55 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-20 20:42 [PATCH v2 0/6] colo: migration related bugfixes Lukas Straub
2020-05-20 20:42 ` [PATCH v2 1/6] migration/colo.c: Use event instead of semaphore Lukas Straub
2020-05-20 20:42 ` [PATCH v2 2/6] migration/colo.c: Use cpu_synchronize_all_states() Lukas Straub
2020-05-20 20:42 ` [PATCH v2 3/6] migration/colo.c: Flush ram cache only after receiving device state Lukas Straub
2020-05-20 20:42 ` [PATCH v2 4/6] migration/colo.c: Relaunch failover even if there was an error Lukas Straub
2020-05-20 20:42 ` [PATCH v2 5/6] migration/colo.c: Move colo_notify_compares_event to the right place Lukas Straub
2020-05-20 20:42 ` [PATCH v2 6/6] migration/migration.c: Fix hang in ram_save_host_page Lukas Straub
2020-06-01 16:54 ` Dr. David Alan Gilbert [this message]
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=20200601165444.GJ2743@work-vm \
--to=dgilbert@redhat.com \
--cc=lukasstraub2@web.de \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
--cc=zhang.zhanghailiang@huawei.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.