From: Claudio Fontana <cfontana@suse.de>
To: Stefan Hajnoczi <stefanha@redhat.com>, Fabiano Rosas <farosas@suse.de>
Cc: qemu-devel@nongnu.org, qemu-block@nongnu.org,
Fam Zheng <fam@euphon.net>, Juan Quintela <quintela@redhat.com>,
Peter Xu <peterx@redhat.com>, Leonardo Bras <leobras@redhat.com>,
qemu-stable@nongnu.org
Subject: Re: [PATCH] block-migration: Ensure we don't crash during migration cleanup
Date: Wed, 9 Aug 2023 11:02:05 +0200 [thread overview]
Message-ID: <d94ff8c4-12f6-0e47-d384-26a9e94ca26f@suse.de> (raw)
In-Reply-To: <20230808170823.GA2749198@fedora>
On 8/8/23 19:08, Stefan Hajnoczi wrote:
> On Mon, Jul 31, 2023 at 05:33:38PM -0300, Fabiano Rosas wrote:
>> We can fail the blk_insert_bs() at init_blk_migration(), leaving the
>> BlkMigDevState without a dirty_bitmap and BlockDriverState. Account
>> for the possibly missing elements when doing cleanup.
>>
>> Fix the following crashes:
>>
>> Thread 1 "qemu-system-x86" received signal SIGSEGV, Segmentation fault.
>> 0x0000555555ec83ef in bdrv_release_dirty_bitmap (bitmap=0x0) at ../block/dirty-bitmap.c:359
>> 359 BlockDriverState *bs = bitmap->bs;
>> #0 0x0000555555ec83ef in bdrv_release_dirty_bitmap (bitmap=0x0) at ../block/dirty-bitmap.c:359
>> #1 0x0000555555bba331 in unset_dirty_tracking () at ../migration/block.c:371
>> #2 0x0000555555bbad98 in block_migration_cleanup_bmds () at ../migration/block.c:681
>>
>> Thread 1 "qemu-system-x86" received signal SIGSEGV, Segmentation fault.
>> 0x0000555555e971ff in bdrv_op_unblock (bs=0x0, op=BLOCK_OP_TYPE_BACKUP_SOURCE, reason=0x0) at ../block.c:7073
>> 7073 QLIST_FOREACH_SAFE(blocker, &bs->op_blockers[op], list, next) {
>> #0 0x0000555555e971ff in bdrv_op_unblock (bs=0x0, op=BLOCK_OP_TYPE_BACKUP_SOURCE, reason=0x0) at ../block.c:7073
>> #1 0x0000555555e9734a in bdrv_op_unblock_all (bs=0x0, reason=0x0) at ../block.c:7095
>> #2 0x0000555555bbae13 in block_migration_cleanup_bmds () at ../migration/block.c:690
>>
>> Signed-off-by: Fabiano Rosas <farosas@suse.de>
>> ---
>> migration/block.c | 11 +++++++++--
>> 1 file changed, 9 insertions(+), 2 deletions(-)
>
> Sorry, I missed this patch!
>
> If this needs to be in QEMU 8.1 (-rc3 is being tagged today), please
> reply and provide a justification. At this point only security fixes and
> showstoppers will be merged. Thanks!
>
> Applied to my block-next tree for QEMU 8.2:
> https://gitlab.com/stefanha/qemu/commits/block-next
>
> Stefan
Thanks, and in my personal view I think it's ok for 8.2, IIUC it happens during the migration to file work which is not in 8.1 anyway,
Fabiano correct me here if I am wrong,
Ciao,
Claudio
prev parent reply other threads:[~2023-08-09 9:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-31 20:33 [PATCH] block-migration: Ensure we don't crash during migration cleanup Fabiano Rosas
2023-08-08 8:29 ` Claudio Fontana
2023-08-08 17:08 ` Stefan Hajnoczi
2023-08-09 9:02 ` Claudio Fontana [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=d94ff8c4-12f6-0e47-d384-26a9e94ca26f@suse.de \
--to=cfontana@suse.de \
--cc=fam@euphon.net \
--cc=farosas@suse.de \
--cc=leobras@redhat.com \
--cc=peterx@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-stable@nongnu.org \
--cc=quintela@redhat.com \
--cc=stefanha@redhat.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 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).