qemu-io crashes with SIGSEGV when did -c aio_write 9233408 28160 on a image_fuzzer image
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
QEMU |
Expired
|
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.
# cp test.img copy.img
# qemu/qemu-io <path to>/copy.img -c "aio_write 9233408 28160"
from gdb:
Program terminated with signal 11, Segmentation fault.
#0 0x00003fffa0077644 in __memcpy_power7 () from /lib64/libc.so.6
Missing separate debuginfos, use: debuginfo-install cyrus-sasl-
(gdb) bt
#0 0x00003fffa0077644 in __memcpy_power7 () from /lib64/libc.so.6
#1 0x0000000010056738 in qcow2_refcount_area (bs=0x25f56f60, start_offset=
new_
#2 0x0000000010056374 in alloc_refcount_
#3 0x0000000010057520 in update_refcount (bs=0x25f56f60, offset=0, length=524288, addend=1, decrease=false, type=QCOW2_
at block/qcow2-
#4 0x0000000010057c24 in qcow2_alloc_
#5 0x0000000010063684 in do_alloc_
at block/qcow2-
#6 0x0000000010063afc in handle_alloc (bs=0x25f56f60, guest_offset=
at block/qcow2-
#7 0x0000000010064178 in qcow2_alloc_
at block/qcow2-
#8 0x000000001004d3f4 in qcow2_co_pwritev (bs=0x25f56f60, offset=9233408, bytes=28160, qiov=0x25f6fa08, flags=0) at block/qcow2.c:1919
#9 0x00000000100a9648 in bdrv_driver_pwritev (bs=0x25f56f60, offset=9233408, bytes=28160, qiov=0x25f6fa08, flags=16) at block/io.c:898
#10 0x00000000100ab630 in bdrv_aligned_
at block/io.c:1440
#11 0x00000000100ac4ac in bdrv_co_pwritev (child=0x25f627f0, offset=9233408, bytes=28160, qiov=0x25f6fa08, flags=BDRV_REQ_FUA) at block/io.c:1691
#12 0x000000001008da0c in blk_co_pwritev (blk=0x25f49410, offset=9233408, bytes=28160, qiov=0x25f6fa08, flags=BDRV_REQ_FUA) at block/block-
#13 0x000000001008e718 in blk_aio_write_entry (opaque=0x25f6fa70) at block/block-
#14 0x00000000101aa444 in coroutine_
#15 0x00003fffa0022b9c in makecontext () from /lib64/libc.so.6
#16 0x0000000000000000 in ?? ()
(gdb) bt full
#0 0x00003fffa0077644 in __memcpy_power7 () from /lib64/libc.so.6
No symbol table info available.
#1 0x0000000010056738 in qcow2_refcount_area (bs=0x25f56f60, start_offset=
new_
s = 0x25f63210
table_size = 65536
i = 0
end_offset = 636891296
ret = 636786432
new_table = 0x3fff9d940010
data = {d64 = 636841824, d32 = 1}
#2 0x0000000010056374 in alloc_refcount_
s = 0x25f63210
ret = 0
new_block = 524288
blocks_used = 1
meta_offset = 137438953472
#3 0x0000000010057520 in update_refcount (bs=0x25f56f60, offset=0, length=524288, addend=1, decrease=false, type=QCOW2_
at block/qcow2-
block_index = 268794524
refcount = 4563798300
table_index = 0
s = 0x25f63210
start = 0
last = 0
ret = 0
#4 0x0000000010057c24 in qcow2_alloc_
offset = 0
ret = 0
#5 0x0000000010063684 in do_alloc_
at block/qcow2-
s = 0x25f63210
#6 0x0000000010063afc in handle_alloc (bs=0x25f56f60, guest_offset=
at block/qcow2-
---Type <return> to continue, or q <return> to quit---
s = 0x25f63210
l2_index = 17
l2_table = 0x0
entry = 0
nb_clusters = 1
ret = 0
avail_bytes = -1649542304
nb_bytes = 16383
old_m = 0x3fff00000000
#7 0x0000000010064178 in qcow2_alloc_
at block/qcow2-
s = 0x25f63210
start = 9233408
remaining = 28160
cur_bytes = 28160
ret = 0
#8 0x000000001004d3f4 in qcow2_co_pwritev (bs=0x25f56f60, offset=9233408, bytes=28160, qiov=0x25f6fa08, flags=0) at block/qcow2.c:1919
s = 0x25f63210
ret = 0
cur_bytes = 28160
hd_qiov = {iov = 0x25f285a0, niov = 0, nalloc = 1, size = 0}
bytes_done = 0
l2meta = 0x0
#9 0x00000000100a9648 in bdrv_driver_pwritev (bs=0x25f56f60, offset=9233408, bytes=28160, qiov=0x25f6fa08, flags=16) at block/io.c:898
drv = 0x102036f0 <bdrv_qcow2>
sector_num = 636854560
nb_sectors = 598850083
ret = -1802855680
#10 0x00000000100ab630 in bdrv_aligned_
at block/io.c:1440
bs = 0x25f56f60
drv = 0x102036f0 <bdrv_qcow2>
waited = false
ret = 0
end_sector = 18089
#11 0x00000000100ac4ac in bdrv_co_pwritev (child=0x25f627f0, offset=9233408, bytes=28160, qiov=0x25f6fa08, flags=BDRV_REQ_FUA) at block/io.c:1691
---Type <return> to continue, or q <return> to quit---
bs = 0x25f56f60
req = {bs = 0x25f56f60, offset = 9233408, bytes = 28160, type = BDRV_TRACKED_WRITE, serialising = false, overlap_offset = 9233408,
align = 1
head_buf = 0x0
tail_buf = 0x0
local_qiov = {iov = 0x3fff9dadfdb0, niov = -1649541648, nalloc = 16383, size = 9233408}
ret = 0
#12 0x000000001008da0c in blk_co_pwritev (blk=0x25f49410, offset=9233408, bytes=28160, qiov=0x25f6fa08, flags=BDRV_REQ_FUA) at block/block-
ret = 0
bs = 0x25f56f60
#13 0x000000001008e718 in blk_aio_write_entry (opaque=0x25f6fa70) at block/block-
acb = 0x25f6fa70
rwco = 0x25f6fa98
#14 0x00000000101aa444 in coroutine_
arg = {p = 0x25f65a90, i = {636902032, 0}}
self = 0x25f65a90
co = 0x25f65a90
#15 0x00003fffa0022b9c in makecontext () from /lib64/libc.so.6
No symbol table info available.
#16 0x0000000000000000 in ?? ()
No symbol table info available.
Will be attaching image_fuzzer image
I can't reproduce this on commit a93ece47fd9edbd 4558db24300056c 9a57d3bcd4:
# ./qemu-io copy.img -c "aio_write 9233408 28160"
can't open device copy.img: Could not open backing file: Could not open 'backing_img.file': No such file or directory
and on the latest commit, I get a different error that makes me suspect this has been fixed:
# ./qemu-io copy.img -c "aio_write 9233408 28160"
can't open device copy.img: Image does not contain a reference count table
It just doesn't look as if this was fixed explicitly, as the recent refcount changes reference your other fuzzer disclosures, and not this one.
...Max?