From: Peter Xu <peterx@redhat.com>
To: Michael Tokarev <mjt@tls.msk.ru>
Cc: farosas@suse.de, Marco.Cavenati@eurecom.fr,
qemu-devel@nongnu.org, qemu-trivial@nongnu.org
Subject: Re: [PATCH] migration: fix SEEK_CUR offset calculation in qio_channel_block_seek
Date: Tue, 26 Aug 2025 17:27:44 -0400 [thread overview]
Message-ID: <aK4m0MtycEi32--U@x1.local> (raw)
In-Reply-To: <dc23eaca-15f5-40be-89d0-2247cfe1f716@tls.msk.ru>
On Tue, Aug 26, 2025 at 11:32:20PM +0300, Michael Tokarev wrote:
> Hi!
>
> This is
>
> commit c0b32426ce56182c1ce2a12904f3a702c2ecc460
> Author: Marco Cavenati <Marco.Cavenati@eurecom.fr>
> Date: Wed Mar 26 17:22:30 2025 +0100
>
> migration: fix SEEK_CUR offset calculation in qio_channel_block_seek
>
> which went to 10.0.0-rc2, and has been cherry-picked to
> 7.2 and 9.2 stable series.
>
> Reportedly it breaks migration in 7.2.18 and up. Which is
> kinda strange, as it shouldn't do any harm?
>
> https://bugs.debian.org/1112044
>
> any guess what's going on?
The only thing I can think of is, when it used to save to some file /
snapshot, then if the old image was stored with some wrong offsets (due to
wrong seek()s) then a new QEMU with correct offsets will instead read wrong
data even if they started to do the right things..
The reporter says:
This occurs during live-migrating a guest onto a host with u15,
migrating it back fixes the softlocks. A reset is required to fix
it but is only required when the receiving host is on the latest
version.
So it's a host-to-host live migration. Is that using TCP as URI? The
problem is I don't even think TCP layer should use io_seek at all.
qio_channel_io_seek() is only used in below (except VFIO when used with
multifd, that doesn't look like what the reporter was using..):
*** migration/file.c:
file_start_outgoing_migration[121] if (offset && qio_channel_io_seek(ioc, offset, SEEK_SET, errp) < 0) {
file_start_incoming_migration[190] qio_channel_io_seek(QIO_CHANNEL(fioc), offset, SEEK_SET, errp) < 0) {
*** migration/qemu-file.c:
qemu_set_offset[611] ret = qio_channel_io_seek(f->ioc, off, whence, &err);
qemu_get_offset[624] ret = qio_channel_io_seek(f->ioc, 0, SEEK_CUR, &err);
All these references are about file migrations, not generic live
migrations..
--
Peter Xu
next prev parent reply other threads:[~2025-08-26 21:29 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-26 16:22 [PATCH] migration: fix SEEK_CUR offset calculation in qio_channel_block_seek Marco Cavenati
2025-03-26 16:48 ` Daniel P. Berrangé
2025-03-29 5:41 ` Michael Tokarev
2025-03-31 12:26 ` Fabiano Rosas
2025-08-26 20:32 ` Michael Tokarev
2025-08-26 21:27 ` Peter Xu [this message]
2025-08-26 21:52 ` Fabiano Rosas
2025-08-27 6:59 ` [PATCH] virtio: Call set_features during reset (was: migration: fix SEEK_CUR offset calculation in qio_channel_block_seek) Michael Tokarev
2025-08-28 0:57 ` [PATCH] migration: fix SEEK_CUR offset calculation in qio_channel_block_seek Akihiko Odaki
2025-08-29 8:34 ` [PATCH] virtio: Call set_features during reset Michael Tokarev
2025-08-29 14:40 ` Akihiko Odaki
2025-08-29 15:14 ` Michael Tokarev
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=aK4m0MtycEi32--U@x1.local \
--to=peterx@redhat.com \
--cc=Marco.Cavenati@eurecom.fr \
--cc=farosas@suse.de \
--cc=mjt@tls.msk.ru \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@nongnu.org \
/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).