[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-block] qemu-img: block/io.c:2122: bdrv_co_block_status: Assertion

From: Richard W.M. Jones
Subject: [Qemu-block] qemu-img: block/io.c:2122: bdrv_co_block_status: Assertion `*pnum && QEMU_IS_ALIGNED(*pnum, align) && align > offset - aligned_offset' failed.
Date: Thu, 28 Mar 2019 13:25:11 +0000
User-agent: Mutt/1.5.21 (2010-09-15)

Not sure if this is a bug in qemu or nbdkit or the NBD protocol, so I
didn't file a bug yet.

When returning NBD_CMD_BLOCK_STATUS extents which aren't aligned to a
sector size, qemu-img gives an assert failure.

This is reproducible using the block-status branch here:


$ ./nbdkit --filter=log --filter=truncate -U - \
           data data="1" size=511 truncate=64K logfile=/dev/stdout \
           --run 'qemu-img convert $nbd /var/tmp/out'
2019-03-28 13:20:33.308114 connection=1 Connect size=0x10000 write=1 flush=0 
rotational=0 trim=1 zero=1 fua=0
2019-03-28 13:20:33.308619 connection=1 Read id=1 offset=0x0 count=0x200 ...
2019-03-28 13:20:33.308644 connection=1 ...Read id=1 return=0 (Success)
2019-03-28 13:20:33.309073 connection=1 Extents id=2 offset=0x0 count=0x10000 
req_one=1 ...
2019-03-28 13:20:33.309099 connection=1 ...Extents id=2 extents=[{ offset=0x0, 
length=0x1ff, type=0 }, { offset=0x1ff, length=0xfe01, type=3 }] return=0
qemu-img: block/io.c:2122: bdrv_co_block_status: Assertion `*pnum && 
QEMU_IS_ALIGNED(*pnum, align) && align > offset - aligned_offset' failed.
nbdkit: external command was killed by signal 6

The stack trace is:

Thread 1 (Thread 0x7f2994c183c0 (LWP 21625)):
#0  0x00007f299e63a0f5 in raise () from /lib64/libc.so.6
#1  0x00007f299e624895 in abort () from /lib64/libc.so.6
#2  0x00007f299e624769 in __assert_fail_base.cold () from /lib64/libc.so.6
#3  0x00007f299e632596 in __assert_fail () from /lib64/libc.so.6
#4  0x000055610ec56297 in bdrv_co_block_status (bs=0x55610f52a820, 
    address@hidden, offset=0, bytes=65536, 
    address@hidden, address@hidden, 
    file=0x7f29937a2ef8) at block/io.c:2122
#5  0x000055610ec56040 in bdrv_co_block_status (address@hidden, 
    address@hidden, address@hidden, 
    address@hidden, address@hidden, 
    address@hidden, file=0x0) at block/io.c:2134
#6  0x000055610ec5637b in bdrv_co_block_status_above (file=0x0, 
    map=<optimized out>, pnum=0x7ffe26ab78d0, bytes=65536, 
    offset=<optimized out>, want_zero=<optimized out>, base=0x0, 
    bs=<optimized out>) at block/io.c:2212
#7  bdrv_block_status_above_co_entry (opaque=0x7ffe26ab7820) at block/io.c:2242
#8  0x000055610ecd808b in coroutine_trampoline (i0=<optimized out>, 
    i1=<optimized out>) at util/coroutine-ucontext.c:116
#9  0x00007f299e64f730 in ?? () from /lib64/libc.so.6
#10 0x00007ffe26ab7050 in ?? ()
#11 0x0000000000000000 in ?? ()


Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
libguestfs lets you edit virtual machines.  Supports shell scripting,
bindings from many languages.  http://libguestfs.org

reply via email to

[Prev in Thread] Current Thread [Next in Thread]