[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] migrate/multifd: fix coredump when the multifd thread cleanu
From: |
Fabiano Rosas |
Subject: |
Re: [PATCH] migrate/multifd: fix coredump when the multifd thread cleanup |
Date: |
Wed, 21 Jun 2023 11:22:44 -0300 |
z00619469 via <qemu-devel@nongnu.org> writes:
> From: c00454449 <chenyuhui5@huawei.com>
>
> There is a coredump while trying to destroy mutex when
> p->running is false but p->mutex is not unlock.
> Make sure all mutexes has been released before destroy them.
>
> Signed-off-by: c00454449 <chenyuhui5@huawei.com>
> ---
> migration/multifd.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/migration/multifd.c b/migration/multifd.c
> index b7ad7002e0..7dcdb2d3a0 100644
> --- a/migration/multifd.c
> +++ b/migration/multifd.c
> @@ -523,9 +523,7 @@ void multifd_save_cleanup(void)
> for (i = 0; i < migrate_multifd_channels(); i++) {
> MultiFDSendParams *p = &multifd_send_state->params[i];
>
> - if (p->running) {
The need for this flag is dubious IMO. Commit 10351fbad1
("migration/multifd: Join all multifd threads in order to avoid leaks")
already moved the other join outside of it. If we figure out another way
to deal with the sem_sync lockup we could probably remove this
altogether.