Skip to content

migration: Fix RP shutdown order

Fabiano Rosas qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2migration: Join the return path thread before releasing to_dst_filemigration/migration.c+9 -130 replies
2/2migration: Use migrate_has_error() in close_return_path_on_source()migration/migration.c+1 -20 replies

Reviews trailers per patch

1 of 2 patches has a Reviewed-by or Acked-by.

PatchCédric Le GoaterPeter Xu
1/2T-b
2/2R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/2] migration: Fix RP shutdown order

These were extracted from:
[PATCH 00/14] migration: Improve error reporting
https://lore.kernel.org/r/[email protected]

We're currently relying on the presence of a QEMUFile error in the to_dst_file to infer whether the return path file (rp_state.from_dst_file) might be hanging at a recvmsg() system call.

This has always been buggy because we actually clear the to_dst_file pointer and close the file before attempting any of the above.

Move the RP cleanup before the to_dst_file cleanup, at both the migrate_fd_cleanup() and postcopy_pause() paths to make sure we reference a valid and open to_dst_file.

Also replace the error checking to use s->error instead of f->last_error. This removes one more dependency on QEMUFile::last_error.

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

Cédric Le Goater (1):
migration: Use migrate_has_error() in close_return_path_on_source()

Fabiano Rosas (1):
migration: Join the return path thread before releasing to_dst_file

 migration/migration.c | 25 ++++++++++---------------
 1 file changed, 10 insertions(+), 15 deletions(-)
Signature · 1 line
2.35.3