qemu-io segfaults at block/io.c:2545
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
QEMU |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
git is at HEAD a93ece47fd9edbd
This is on ppc64le architecture.
Re-production steps:
1. Copy the attached file named test.img to a directory
2. And customize the following command to point to the above directory and run the same.
# mv test.img copy.img
# qemu-io <path to>/copy.img -c "discard 108544 97792"
from gdb:
Program terminated with signal 11, Segmentation fault.
#0 0x00000000100af254 in bdrv_co_pdiscard (bs=0x3ee89ad0, offset=196608, bytes=9728) at block/io.c:2545
2545 if (bs->drv-
Missing separate debuginfos, use: debuginfo-install cyrus-sasl-
(gdb) bt
#0 0x00000000100af254 in bdrv_co_pdiscard (bs=0x3ee89ad0, offset=196608, bytes=9728) at block/io.c:2545
#1 0x000000001008f260 in blk_co_pdiscard (blk=0x3ee79410, offset=108544, bytes=97792) at block/block-
#2 0x0000000010090884 in blk_pdiscard_entry (opaque=
#3 0x00000000101aa444 in coroutine_
#4 0x00003fff7a3d2b9c in makecontext () from /lib64/libc.so.6
#5 0x0000000000000000 in ?? ()
(gdb) bt full
#0 0x00000000100af254 in bdrv_co_pdiscard (bs=0x3ee89ad0, offset=196608, bytes=9728) at block/io.c:2545
num = 9728
req = {bs = 0x3ee89ad0, offset = 108544, bytes = 97792, type = BDRV_TRACKED_
ret = 0
head = 0
tail = 9728
align = 16384
#1 0x000000001008f260 in blk_co_pdiscard (blk=0x3ee79410, offset=108544, bytes=97792) at block/block-
ret = 0
#2 0x0000000010090884 in blk_pdiscard_entry (opaque=
rwco = 0x3fffd7402c58
#3 0x00000000101aa444 in coroutine_
arg = {p = 0x3ee9fbc0, i = {1055521728, 0}}
self = 0x3ee9fbc0
co = 0x3ee9fbc0
#4 0x00003fff7a3d2b9c in makecontext () from /lib64/libc.so.6
No symbol table info available.
#5 0x0000000000000000 in ?? ()
No symbol table info available.
Hi,
And once again, thanks a lot for reporting this bug! Here, too, I've found a fix and I'll send a patch once I've written a test case.
Max