Bug 622999 - core dumped when starting vm with large pci addr
core dumped when starting vm with large pci addr
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm (Show other bugs)
6.0
All Linux
medium Severity medium
: rc
: ---
Assigned To: Virtualization Maintenance
Virtualization Bugs
: Reopened
Depends On:
Blocks: 580953
  Show dependency treegraph
 
Reported: 2010-08-10 22:51 EDT by Cao, Chen
Modified: 2013-01-09 17:59 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-08-11 12:59:05 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Cao, Chen 2010-08-10 22:51:52 EDT
Description of problem:
core dumped when starting vm with pci addr > 0x20


Version-Release number of selected component (if applicable):
qemu-kvm-0.12.1.2-2.108.el6.x86_64


How reproducible:
frequently


Steps to Reproduce:
1. start vm with (pci addr = 0x92, 0x93)
qemu-kvm -name 'vm1' -chardev socket,id=human_monitor_f5dI,path=/tmp/monitor-humanmonitor1-20100810-181354-WbJi,server,nowait -mon chardev=human_monitor_f5dI,mode=readline -chardev socket,id=serial_Zm5R,path=/tmp/serial-20100810-181354-WbJi,server,nowait -device isa-serial,chardev=serial_Zm5R -drive file='/tests/kvm/images/RHEL-Server-5.5-PAE-virtio.qcow2',index=0,if=none,id=drive-virtio-disk1,media=disk,cache=none,snapshot=on,boot=on,format=qcow2,aio=native -device virtio-blk-pci,bus=pci.0,addr=0x92,drive=drive-virtio-disk1,id=virtio-disk1 -device virtio-net-pci,netdev=idopXlAo,id=ndev00idopXlAo,mac='02:B7:5E:9A:35:8a',bus=pci.0,addr=0x93 -netdev tap,id=idopXlAo,ifname='virtio_0_8000',script='/tests/kvm/scripts/qemu-ifup-switch',downscript='no',vhost=on -m 4096 -smp 2 -vnc :0 -spice port=8000,disable-ticketing -rtc base=utc,clock=host -M rhel6.0.0 -usbdevice tablet -cpu qemu64,+sse2 -no-kvm-pit-reinjection

2. 
3.
  
Actual results:
segfault and core dumped


Expected results:
error msg should be poped when the addr is illegal (or not supported),
and qemu-kvm exits


Additional info:
# uname -r
2.6.32-59.el6.x86_64

(gdb) bt
#0  0x0000003e49c48007 in vfprintf () from /lib64/libc.so.6
#1  0x0000003e49c493b0 in buffered_vfprintf () from /lib64/libc.so.6
#2  0x0000003e49c4451e in vfprintf () from /lib64/libc.so.6
#3  0x0000003e49cf9007 in __vfprintf_chk () from /lib64/libc.so.6
#4  0x0000000000475317 in error_report (
    fmt=0x582eb8 "PCI: devfn %d not available for %s, in use by %s")
    at qemu-error.c:206
#5  0x0000000000419a0b in do_pci_register_device (pci_dev=0x2bb21a0,
    bus=0x2b8a010, name=<value optimized out>, devfn=1168, config_read=0,
    config_write=0, header_type=0 '\000')
    at /usr/src/debug/qemu-kvm-0.12.1.2/hw/pci.c:646
#6  0x0000000000419db8 in pci_qdev_init (qdev=0x2bb21a0, base=0x8399e0)
    at /usr/src/debug/qemu-kvm-0.12.1.2/hw/pci.c:1485
#7  0x00000000004bd6e8 in qdev_init (dev=0x2bb21a0)
    at /usr/src/debug/qemu-kvm-0.12.1.2/hw/qdev.c:275
#8  0x00000000004bda69 in qdev_device_add (opts=0x23c85b0)
    at /usr/src/debug/qemu-kvm-0.12.1.2/hw/qdev.c:250
#9  0x0000000000408f09 in device_init_func (opts=<value optimized out>,
    opaque=<value optimized out>) at /usr/src/debug/qemu-kvm-0.12.1.2/vl.c:4963
#10 0x0000000000475c3a in qemu_opts_foreach (list=<value optimized out>,
    func=0x408f00 <device_init_func>, opaque=0x0,
    abort_on_failure=<value optimized out>) at qemu-option.c:903
#11 0x000000000040de30 in main (argc=<value optimized out>,
    argv=<value optimized out>, envp=<value optimized out>)
    at /usr/src/debug/qemu-kvm-0.12.1.2/vl.c:6425


also reproduced with the same backtrace when pci addr is 0x21, 0x22:
qemu-kvm -name 'vm1' -chardev socket,id=human_monitor_jJSI,path=/tmp/monitor-humanmonitor1-20100810-181354-WbJi,server,nowait -mon chardev=human_monitor_jJSI,mode=readline -chardev socket,id=serial_b7LS,path=/tmp/serial-20100810-181354-WbJi,server,nowait -device isa-serial,chardev=serial_b7LS -drive file='/root/autotest/client/tests/kvm/images/RHEL-Server-5.5-64-virtio.qcow2',index=0,if=none,id=drive-virtio-disk1,media=disk,cache=none,snapshot=on,boot=on,format=qcow2,aio=native -device virtio-blk-pci,bus=pci.0,addr=0x21,drive=drive-virtio-disk1,id=virtio-disk1 -device virtio-net-pci,netdev=idopXlAo,id=ndev00idopXlAo,mac='02:B7:5E:9A:35:8a',bus=pci.0,addr=0x22 -netdev tap,id=idopXlAo,ifname='virtio_0_8000',script='/root/autotest/client/tests/kvm/scripts/qemu-ifup-switch',downscript='no',vhost=on -m 4096 -smp 2 -vnc :0 -spice port=8000,disable-ticketing -rtc base=utc,clock=host -M rhel6.0.0 -usbdevice tablet -cpu qemu64,+sse2 -no-kvm-pit-reinjection
Comment 1 Cao, Chen 2010-08-10 22:57:45 EDT
or is it a problem of void error_report(const char *fmt, ...)?

make this bug block tier1, and change if it is not a big problem.

Note You need to log in before you can comment on or make changes to this bug.