[PATCH 0/8] migration fixes

Fabiano Rosas posted 8 patches 9 months, 1 week ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20230918172822.19052-1-farosas@suse.de
Maintainers: Juan Quintela <quintela@redhat.com>, Peter Xu <peterx@redhat.com>, Leonardo Bras <leobras@redhat.com>
migration/migration.c    | 145 +++++++++++++++------------------------
migration/migration.h    |  14 +++-
migration/postcopy-ram.c |  38 +++++++++-
3 files changed, 106 insertions(+), 91 deletions(-)
[PATCH 0/8] migration fixes
Posted by Fabiano Rosas 9 months, 1 week ago
This series contains fixes for the two currently know failures that
show up in migration tests plus a set of fixes for some theoretical
race conditions around QEMUFile handling.

Patch 1 addresses the issue found in the postcopy/preempt/plain test:
https://gitlab.com/qemu-project/qemu/-/issues/1886

Patch 7 fixes a rare crash during the postocpy/preempt/recovery/plain test:

  Thread 7 "return path" received signal SIGSEGV, Segmentation fault.
      0x00005555560e4893 in qemu_file_get_error_obj (f=0x0, errp=0x0) at ../migration/qemu-file.c:154
      154         return f->last_error;

CI run: https://gitlab.com/farosas/qemu/-/pipelines/1008652837

Fabiano Rosas (7):
  migration: Fix possible race when setting rp_state.error
  migration: Fix possible races when shutting down the return path
  migration: Fix possible race when shutting down to_dst_file
  migration: Remove redundant cleanup of postcopy_qemufile_src
  migration: Consolidate return path closing code
  migration: Replace the return path retry logic
  migration: Move return path cleanup to main migration thread

Peter Xu (1):
  migration: Fix race that dest preempt thread close too early

 migration/migration.c    | 145 +++++++++++++++------------------------
 migration/migration.h    |  14 +++-
 migration/postcopy-ram.c |  38 +++++++++-
 3 files changed, 106 insertions(+), 91 deletions(-)

-- 
2.35.3
Re: [PATCH 0/8] migration fixes
Posted by Fabiano Rosas 9 months ago
Fabiano Rosas <farosas@suse.de> writes:

> This series contains fixes for the two currently know failures that
> show up in migration tests plus a set of fixes for some theoretical
> race conditions around QEMUFile handling.
>
> Patch 1 addresses the issue found in the postcopy/preempt/plain test:
> https://gitlab.com/qemu-project/qemu/-/issues/1886
>
> Patch 7 fixes a rare crash during the postocpy/preempt/recovery/plain test:
>
>   Thread 7 "return path" received signal SIGSEGV, Segmentation fault.
>       0x00005555560e4893 in qemu_file_get_error_obj (f=0x0, errp=0x0) at ../migration/qemu-file.c:154
>       154         return f->last_error;
>
> CI run: https://gitlab.com/farosas/qemu/-/pipelines/1008652837
>
> Fabiano Rosas (7):
>   migration: Fix possible race when setting rp_state.error
>   migration: Fix possible races when shutting down the return path
>   migration: Fix possible race when shutting down to_dst_file
>   migration: Remove redundant cleanup of postcopy_qemufile_src
>   migration: Consolidate return path closing code
>   migration: Replace the return path retry logic
>   migration: Move return path cleanup to main migration thread
>
> Peter Xu (1):
>   migration: Fix race that dest preempt thread close too early
>
>  migration/migration.c    | 145 +++++++++++++++------------------------
>  migration/migration.h    |  14 +++-
>  migration/postcopy-ram.c |  38 +++++++++-
>  3 files changed, 106 insertions(+), 91 deletions(-)

Ping
Re: [PATCH 0/8] migration fixes
Posted by Peter Xu 9 months ago
On Wed, Sep 27, 2023 at 09:39:33AM -0300, Fabiano Rosas wrote:
> Fabiano Rosas <farosas@suse.de> writes:
> 
> > This series contains fixes for the two currently know failures that
> > show up in migration tests plus a set of fixes for some theoretical
> > race conditions around QEMUFile handling.
> >
> > Patch 1 addresses the issue found in the postcopy/preempt/plain test:
> > https://gitlab.com/qemu-project/qemu/-/issues/1886
> >
> > Patch 7 fixes a rare crash during the postocpy/preempt/recovery/plain test:
> >
> >   Thread 7 "return path" received signal SIGSEGV, Segmentation fault.
> >       0x00005555560e4893 in qemu_file_get_error_obj (f=0x0, errp=0x0) at ../migration/qemu-file.c:154
> >       154         return f->last_error;
> >
> > CI run: https://gitlab.com/farosas/qemu/-/pipelines/1008652837
> >
> > Fabiano Rosas (7):
> >   migration: Fix possible race when setting rp_state.error
> >   migration: Fix possible races when shutting down the return path
> >   migration: Fix possible race when shutting down to_dst_file
> >   migration: Remove redundant cleanup of postcopy_qemufile_src
> >   migration: Consolidate return path closing code
> >   migration: Replace the return path retry logic
> >   migration: Move return path cleanup to main migration thread
> >
> > Peter Xu (1):
> >   migration: Fix race that dest preempt thread close too early
> >
> >  migration/migration.c    | 145 +++++++++++++++------------------------
> >  migration/migration.h    |  14 +++-
> >  migration/postcopy-ram.c |  38 +++++++++-
> >  3 files changed, 106 insertions(+), 91 deletions(-)
> 
> Ping

Stefan,

This is the series I mentioned to you before that will solve all known
migration-test intermittent failures.  It covers two bugs we're aware of.

I've already provided all R-bs on the patches.

Feel free to merge this series if you want even before Juan's back.

Thanks!

-- 
Peter Xu
Re: [PATCH 0/8] migration fixes
Posted by Stefan Hajnoczi 9 months ago
Applied, thanks.

Please update the changelog at https://wiki.qemu.org/ChangeLog/8.2 for any user-visible changes.
Re: [PATCH 0/8] migration fixes
Posted by Stefan Hajnoczi 9 months ago
On Mon, Sep 18, 2023 at 02:28:14PM -0300, Fabiano Rosas wrote:
> This series contains fixes for the two currently know failures that
> show up in migration tests plus a set of fixes for some theoretical
> race conditions around QEMUFile handling.
> 
> Patch 1 addresses the issue found in the postcopy/preempt/plain test:
> https://gitlab.com/qemu-project/qemu/-/issues/1886
> 
> Patch 7 fixes a rare crash during the postocpy/preempt/recovery/plain test:
> 
>   Thread 7 "return path" received signal SIGSEGV, Segmentation fault.
>       0x00005555560e4893 in qemu_file_get_error_obj (f=0x0, errp=0x0) at ../migration/qemu-file.c:154
>       154         return f->last_error;
> 
> CI run: https://gitlab.com/farosas/qemu/-/pipelines/1008652837
> 
> Fabiano Rosas (7):
>   migration: Fix possible race when setting rp_state.error
>   migration: Fix possible races when shutting down the return path
>   migration: Fix possible race when shutting down to_dst_file
>   migration: Remove redundant cleanup of postcopy_qemufile_src
>   migration: Consolidate return path closing code
>   migration: Replace the return path retry logic
>   migration: Move return path cleanup to main migration thread
> 
> Peter Xu (1):
>   migration: Fix race that dest preempt thread close too early
> 
>  migration/migration.c    | 145 +++++++++++++++------------------------
>  migration/migration.h    |  14 +++-
>  migration/postcopy-ram.c |  38 +++++++++-
>  3 files changed, 106 insertions(+), 91 deletions(-)

Applied to staging.

Thanks,
Stefan
Re: [PATCH 0/8] migration fixes
Posted by Michael Tokarev 8 months, 3 weeks ago
18.09.2023 20:28, Fabiano Rosas wrote:
> This series contains fixes for the two currently know failures that
> show up in migration tests plus a set of fixes for some theoretical
> race conditions around QEMUFile handling.
> 
> Patch 1 addresses the issue found in the postcopy/preempt/plain test:
> https://gitlab.com/qemu-project/qemu/-/issues/1886
> 
> Patch 7 fixes a rare crash during the postocpy/preempt/recovery/plain test:
> 
>    Thread 7 "return path" received signal SIGSEGV, Segmentation fault.
>        0x00005555560e4893 in qemu_file_get_error_obj (f=0x0, errp=0x0) at ../migration/qemu-file.c:154
>        154         return f->last_error;
> 
> CI run: https://gitlab.com/farosas/qemu/-/pipelines/1008652837
> 
> Fabiano Rosas (7):
>    migration: Fix possible race when setting rp_state.error
>    migration: Fix possible races when shutting down the return path
>    migration: Fix possible race when shutting down to_dst_file
>    migration: Remove redundant cleanup of postcopy_qemufile_src
>    migration: Consolidate return path closing code
>    migration: Replace the return path retry logic
>    migration: Move return path cleanup to main migration thread
> 
> Peter Xu (1):
>    migration: Fix race that dest preempt thread close too early
> 
>   migration/migration.c    | 145 +++++++++++++++------------------------
>   migration/migration.h    |  14 +++-
>   migration/postcopy-ram.c |  38 +++++++++-
>   3 files changed, 106 insertions(+), 91 deletions(-)

What can be done for -stable?

At least the whole thing applies cleanly to 8.1.

Thanks,

/mjt
Re: [PATCH 0/8] migration fixes
Posted by Peter Xu 8 months, 3 weeks ago
On Tue, Oct 03, 2023 at 01:55:35AM +0300, Michael Tokarev wrote:
> 18.09.2023 20:28, Fabiano Rosas wrote:
> > This series contains fixes for the two currently know failures that
> > show up in migration tests plus a set of fixes for some theoretical
> > race conditions around QEMUFile handling.
> > 
> > Patch 1 addresses the issue found in the postcopy/preempt/plain test:
> > https://gitlab.com/qemu-project/qemu/-/issues/1886
> > 
> > Patch 7 fixes a rare crash during the postocpy/preempt/recovery/plain test:
> > 
> >    Thread 7 "return path" received signal SIGSEGV, Segmentation fault.
> >        0x00005555560e4893 in qemu_file_get_error_obj (f=0x0, errp=0x0) at ../migration/qemu-file.c:154
> >        154         return f->last_error;
> > 
> > CI run: https://gitlab.com/farosas/qemu/-/pipelines/1008652837
> > 
> > Fabiano Rosas (7):
> >    migration: Fix possible race when setting rp_state.error
> >    migration: Fix possible races when shutting down the return path
> >    migration: Fix possible race when shutting down to_dst_file
> >    migration: Remove redundant cleanup of postcopy_qemufile_src
> >    migration: Consolidate return path closing code
> >    migration: Replace the return path retry logic
> >    migration: Move return path cleanup to main migration thread
> > 
> > Peter Xu (1):
> >    migration: Fix race that dest preempt thread close too early
> > 
> >   migration/migration.c    | 145 +++++++++++++++------------------------
> >   migration/migration.h    |  14 +++-
> >   migration/postcopy-ram.c |  38 +++++++++-
> >   3 files changed, 106 insertions(+), 91 deletions(-)
> 
> What can be done for -stable?
> 
> At least the whole thing applies cleanly to 8.1.

It seems v8.0.5 needs at least a few conflict resolutions.

I'd say we go apply those to 8.1.1, and we can skip 8.0 unless someone
requests for it.

Thanks,

-- 
Peter Xu
Re: [PATCH 0/8] migration fixes
Posted by Michael Tokarev 8 months, 3 weeks ago
03.10.2023 02:29, Peter Xu:
> On Tue, Oct 03, 2023 at 01:55:35AM +0300, Michael Tokarev wrote:

>> What can be done for -stable?
>>
>> At least the whole thing applies cleanly to 8.1.
> 
> It seems v8.0.5 needs at least a few conflict resolutions.

As I stated in recent 8.0.5 stable announce, it was the last
from 8.0.x series unless someone really needs a new version.
So far no one said anything, so be it the last one :)

> I'd say we go apply those to 8.1.1, and we can skip 8.0 unless someone
> requests for it.

Okay, that's exactly what I thought, - queued whole thing,
will fire up some testing tomorrow.

THank you!

/mjt