qemu-kvm crashes in qcow2 code
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
qemu-kvm (Fedora) |
Fix Released
|
Medium
|
|||
qemu-kvm (Ubuntu) |
Fix Released
|
High
|
Unassigned | ||
Precise |
Won't Fix
|
High
|
Unassigned |
Bug Description
qemu-kvm machines die randomly when under heavy load.
(see also possibly similar RHEL bug: https:/
Note that we have a qcow2 cluster size of 64k.
Here is the head of the apport crash dump:
ProblemType: Crash
Package: qemu-kvm 1.0+noroms-
Architecture: amd64
Date: Thu Sep 5 14:11:25 2013
DistroRelease: Ubuntu 12.04
ExecutablePath: /usr/bin/
ExecutableTimes
ProcCmdline: /usr/bin/kvm -name instance-00003544 -S -M pc-1.0 -cpu core2duo,
ProcCwd: /
ProcEnviron: PATH=(custom, no user)
-------
And here is the backtrace:
warning: Can't read pathname for load map: Input/output error.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_
Core was generated by `/usr/bin/kvm -name instance-00003544 -S -M pc-1.0 -cpu core2duo,
Program terminated with signal 6, Aborted.
#0 0x00007f359b5e4425 in raise () from /lib/x86_
(gdb) bt
#0 0x00007f359b5e4425 in raise () from /lib/x86_
#1 0x00007f359b5e7b8b in abort () from /lib/x86_
#2 0x00007f359f81d3db in qcow2_cache_
#3 qcow2_cache_do_get (bs=0x7f35a1183cd0, c=0x7f35a11859c0, offset=84475904, table=0x7f35a8b
at block/qcow2-
#4 0x00007f359f81de6c in l2_load (l2_table=
#5 qcow2_get_
at block/qcow2-
#6 0x00007f359f81e706 in qcow2_read (nb_sectors=104, buf=0x7f35931f7200 "", sector_
#7 copy_sectors (bs=0x7f35a1183cd0, start_sect=
at block/qcow2-
#8 0x00007f359f81eae3 in qcow2_alloc_
#9 0x00007f359f8222ad in qcow2_co_writev (bs=0x7f35a1183cd0, sector_
#10 0x00007f359f81495a in bdrv_co_do_writev (bs=<optimized out>, sector_
#11 0x00007f359f8149ee in bdrv_co_do_rw (opaque=
#12 0x00007f359f844eab in coroutine_
#13 0x00007f359b5f6650 in ?? () from /lib/x86_
#14 0x00007fffeb9b3ae0 in ?? ()
#15 0x0000000000000000 in ?? ()
Changed in qemu-kvm (Ubuntu): | |
importance: | Undecided → High |
Changed in qemu-kvm (Fedora): | |
importance: | Unknown → Medium |
status: | Unknown → Fix Released |
Description of problem:
Install guest with virtio-scsi interface and cluster_size=4096, when formating disk qemu-kvm gets Aborted.
Version-Release number of selected component (if applicable):
# uname -r;rpm -q qemu-kvm 259.el6. x86_64 0.12.1. 2-2.269. el6.scsifixes. x86_64
2.6.32-
qemu-kvm-
How reproducible:
3/3
Steps to Reproduce:
1. Create a qcow2 image with cluster_size=4096
e.g
# qemu-img create -f qcow2 sysdisk.qcow2 20G -o cluster_size=4096
2.Install guest
/usr/libexec/ qemu-kvm -cpu cpu64-rhel6 -rtc base=localtime, clock=host, driftfix= slew -M rhel6.3.0 -enable-kvm -name rhel6.3-64 -smp 4,cores= 2,threads= 1,sockets= 2 -m 4G -uuid c944829b- 9aa0-46a2- b3d0-493c135da2 4d -boot menu=on -drive file=/home/ sysdisk. qcow2,if= none,id= drive-virtio- disk0,format= qcow2,cache= none,aio= native, media=disk, werror= stop,rerror= stop -device virtio- scsi-pci, id=bus1 -device scsi-hd, bus=bus1. 0,drive= drive-virtio- disk0,id= virtio- scsi-pci0 -netdev tap,id= hostnet0, vhost=on, script= /etc/qemu- ifup-switch -device virtio- net-pci, netdev= hostnet0, id=net0, mac=44: 37:E6:5E: A3:F7 -spice port=9000, disable- ticketing -vga qxl -global qxl-vga. vram_size= 67108864 -device virtio- balloon- pci,id= balloon0, bus=pci. 0,addr= 0x6 -monitor stdio -usb -device usb-tablet, id=input1 -drive file=/home/ RHEL6.3- 20120329. 0-Server- x86_64- DVD1.iso, if=none, id=drive- virtio- disk1,format= raw,cache= none,aio= native, media=cdrom -device virtio- scsi-pci, id=bus2 -device scsi-cd, bus=bus2. 0,drive= drive-virtio- disk1,id= virtio- scsi-pci1, bootindex= 1
3.
Actual results:
When formating disk, qemu-kvm gets Aborted.
Program received signal SIGABRT, Aborted.
0x00007ffff57788a5 in raise () from /lib64/libc.so.6
(gdb) bt find_entry_ to_replace (bs=0x7ffff8854c30, c=0x7ffff87027d0, offset=3279413248, 0x7fffd75764b8, read_from_ disk=false) at block/qcow2- cache.c: 209 764b8, read_from_ disk=false) cache.c: 229 table=0x7fffd75 76548, new_l2_ offset= 0x7fffd7576550, l2_index= 0x7fffd757655c) at block/qcow2- cluster. c:180 table=0x7fffd75 76548, new_l2_ offset= 0x7fffd7576550, l2_index= 0x7fffd757655c) at block/qcow2- cluster. c:512 cluster_ offset (bs=0x7ffff8854c30, offset=6463520768, n_start=0, n_end=1008, num=0x7fffd757666c, 76600) at block/qcow2- cluster. c:714 sectors= 1008, 0x7fffd855e838) at block/qcow2.c:555 num=12624064, nb_sectors=1008, qiov=0x7fffd855 e838, 0x7fffd855e890) at block.c:3032 trampoline (i0=<value optimized out>, i1=<value...
#0 0x00007ffff57788a5 in raise () from /lib64/libc.so.6
#1 0x00007ffff577a085 in abort () from /lib64/libc.so.6
#2 0x00007ffff7e3c42e in qcow2_cache_
table=
#3 qcow2_cache_do_get (bs=0x7ffff8854c30, c=0x7ffff87027d0, offset=3279413248, table=0x7fffd75
at block/qcow2-
#4 0x00007ffff7e3a299 in l2_allocate (bs=0x7ffff8854c30, offset=6463520768, new_l2_
new_
#5 get_cluster_table (bs=0x7ffff8854c30, offset=6463520768, new_l2_
new_
#6 0x00007ffff7e3a6e6 in qcow2_alloc_
m=0x7fffd75
#7 0x00007ffff7e363bf in qcow2_co_writev (bs=0x7ffff8854c30, sector_num=<value optimized out>, remaining_
qiov=
#8 0x00007ffff7e215fa in bdrv_co_do_writev (bs=0x7ffff8854c30, sector_
flags=<value optimized out>) at block.c:1734
#9 0x00007ffff7e216a1 in bdrv_co_do_rw (opaque=
#10 0x00007ffff7e26b6b in coroutine_