Bug 622999 - core dumped when starting vm with large pci addr
Summary: core dumped when starting vm with large pci addr
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm   
(Show other bugs)
Version: 6.0
Hardware: All Linux
Target Milestone: rc
: ---
Assignee: Virtualization Maintenance
QA Contact: Virtualization Bugs
Keywords: Reopened
Depends On:
Blocks: 580953
TreeView+ depends on / blocked
Reported: 2010-08-11 02:51 UTC by Cao, Chen
Modified: 2013-01-09 22:59 UTC (History)
4 users (show)

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

Attachments (Terms of Use)

Description Cao, Chen 2010-08-11 02:51:52 UTC
Description of problem:
core dumped when starting vm with pci addr > 0x20

Version-Release number of selected component (if applicable):

How reproducible:

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

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

(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-
#6  0x0000000000419db8 in pci_qdev_init (qdev=0x2bb21a0, base=0x8399e0)
    at /usr/src/debug/qemu-kvm-
#7  0x00000000004bd6e8 in qdev_init (dev=0x2bb21a0)
    at /usr/src/debug/qemu-kvm-
#8  0x00000000004bda69 in qdev_device_add (opts=0x23c85b0)
    at /usr/src/debug/qemu-kvm-
#9  0x0000000000408f09 in device_init_func (opts=<value optimized out>,
    opaque=<value optimized out>) at /usr/src/debug/qemu-kvm-
#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-

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-11 02:57:45 UTC
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.