All of lore.kernel.org
 help / color / mirror / Atom feed
From: Swapnil Ingle <swapnil.ingle@nutanix.com>
To: "qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Subject: qemu-img convert asserts while converting from vhdx to raw
Date: Tue, 28 Jul 2020 16:53:50 +0000	[thread overview]
Message-ID: <8906F385-C6C0-4F60-A15C-07B2AE7F0B7A@nutanix.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 4217 bytes --]

Hey Guys,

We are seeing following assert when trying to convert disk image from vhdx to raw.
This issue is seen only for disk with 4k logical sector size.

$ qemu-img convert -f vhdx -O raw 4KTest1.vhdx test.raw
qemu-img: util/iov.c:388: qiov_slice: Assertion `offset + len <= qiov->size' failed.
Aborted

$ qemu-img --version
qemu-img version 5.0.91 (v5.1.0-rc1-2-g3cbc897-dirty)
Copyright (c) 2003-2020 Fabrice Bellard and the QEMU Project developers

 $ qemu-img check -r all 4KTest1.vhdx
No errors were found on the image.

$ qemu-img info 4KTest1.vhdx
image: 4KTest1.vhdx
file format: vhdx
virtual size: 10 GiB (10737418240 bytes)
disk size: 35.7 GiB
cluster_size: 33554432

The vhdx disk metadata is following,

VhdFormat : VHDX
VhdType : Dynamic
LogicalSectorSize : 4096
PhysicalSectorSize : 4096
BlockSize : 33554432

Following is the backtrace of the assert,

#0  0x00007ffff64cf387 in raise () from /lib64/libc.so.6
#1  0x00007ffff64d0a78 in abort () from /lib64/libc.so.6
#2  0x00007ffff64c81a6 in __assert_fail_base () from /lib64/libc.so.6
#3  0x00007ffff64c8252 in __assert_fail () from /lib64/libc.so.6
#4  0x00005555556abf5a in qiov_slice (qiov=0x7ffff4122a20, offset=0, len=2096640, head=0x7ffff4122648, tail=0x7ffff4122650,
    niov=0x7ffff4122640) at util/iov.c:388
#5  0x00005555556ac0f6 in qemu_iovec_init_extended (qiov=0x7ffff4122730, head_buf=0x0, head_len=0, mid_qiov=0x7ffff4122a20, mid_offset=0,
    mid_len=2096640, tail_buf=0x0, tail_len=0) at util/iov.c:429
#6  0x00005555556ac438 in qemu_iovec_init_slice (qiov=0x7ffff4122730, source=0x7ffff4122a20, offset=0, len=2096640) at util/iov.c:495
#7  0x0000555555609bd6 in bdrv_driver_preadv (bs=0x555555982a80, offset=15841886208, bytes=2096640, qiov=0x7ffff4122a20, qiov_offset=0,
    flags=0) at block/io.c:1134
#8  0x000055555560ad55 in bdrv_aligned_preadv (child=0x5555559891f0, req=0x7ffff4122900, offset=15841886208, bytes=2096640, align=1,
    qiov=0x7ffff4122a20, qiov_offset=0, flags=0) at block/io.c:1515
#9  0x000055555560b67b in bdrv_co_preadv_part (child=0x5555559891f0, offset=15841886208, bytes=2096640, qiov=0x7ffff4122a20, qiov_offset=0,
    flags=0) at block/io.c:1756
#10 0x000055555560b4b4 in bdrv_co_preadv (child=0x5555559891f0, offset=15841886208, bytes=2096640, qiov=0x7ffff4122a20, flags=0)
    at block/io.c:1714
#11 0x00005555555e3266 in vhdx_co_readv (bs=0x55555597b370, sector_num=4194304, nb_sectors=4095, qiov=0x7ffff4122e10) at block/vhdx.c:1208
#12 0x0000555555609da1 in bdrv_driver_preadv (bs=0x55555597b370, offset=2147483136, bytes=2097152, qiov=0x7ffff4122e10, qiov_offset=0,
    flags=0) at block/io.c:1169
#13 0x000055555560ad55 in bdrv_aligned_preadv (child=0x555555989150, req=0x7ffff4122cb0, offset=2147483136, bytes=2097152, align=512,
    qiov=0x7ffff4122e10, qiov_offset=0, flags=0) at block/io.c:1515
#14 0x000055555560b67b in bdrv_co_preadv_part (child=0x555555989150, offset=2147483136, bytes=2097152, qiov=0x7ffff4122e10, qiov_offset=0,
    flags=0) at block/io.c:1756
#15 0x000055555560b4b4 in bdrv_co_preadv (child=0x555555989150, offset=2147483136, bytes=2097152, qiov=0x7ffff4122e10, flags=0)
    at block/io.c:1714
#16 0x00005555555f34c3 in blk_do_preadv (blk=0x55555597b010, offset=2147483136, bytes=2097152, qiov=0x7ffff4122e10, flags=0)
    at block/block-backend.c:1211
#17 0x00005555555f351b in blk_co_preadv (blk=0x55555597b010, offset=2147483136, bytes=2097152, qiov=0x7ffff4122e10, flags=0)
    at block/block-backend.c:1223
#18 0x000055555557347b in blk_co_pread (blk=0x55555597b010, offset=2147483136, bytes=2097152, buf=0x7fffefdff000, flags=0)
    at /home/swapnil/dev/github/qemu/include/sysemu/block-backend.h:140
#19 0x00005555555771aa in convert_co_read (s=0x7fffffffdc30, sector_num=4194303, nb_sectors=4096, buf=0x7fffefdff000 "") at qemu-img.c:1830
#20 0x000055555557785c in convert_co_do_copy (opaque=0x7fffffffdc30) at qemu-img.c:2007
#21 0x00005555556a9e4e in coroutine_trampoline (i0=1436133568, i1=21845) at util/coroutine-ucontext.c:173
#22 0x00007ffff64e1190 in ?? () from /lib64/libc.so.6
#23 0x00007fffffffd2e0 in ?? ()
#24 0x0000000000000000 in ?? ()

Thanks and Regards,
-Swapnil


[-- Attachment #2: Type: text/html, Size: 18777 bytes --]

             reply	other threads:[~2020-07-28 16:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-28 16:53 Swapnil Ingle [this message]
2020-07-29 10:56 ` qemu-img convert asserts while converting from vhdx to raw Max Reitz
2020-08-05 15:54   ` Swapnil Ingle

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=8906F385-C6C0-4F60-A15C-07B2AE7F0B7A@nutanix.com \
    --to=swapnil.ingle@nutanix.com \
    --cc=qemu-devel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.