Bug 971799 - qemu should not crash when if=scsi although it's unsupportable device
Summary: qemu should not crash when if=scsi although it's unsupportable device
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm-rhev
Version: 7.0
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: rc
: ---
Assignee: Markus Armbruster
QA Contact: Xueqiang Wei
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-06-07 09:57 UTC by xu
Modified: 2017-08-02 03:22 UTC (History)
14 users (show)

(edit)
Clone Of:
(edit)
Last Closed: 2017-08-01 23:27:12 UTC


Attachments (Terms of Use)
backtrace (4.24 KB, text/x-log)
2013-06-07 09:57 UTC, xu
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2017:2392 normal SHIPPED_LIVE Important: qemu-kvm-rhev security, bug fix, and enhancement update 2017-08-01 20:04:36 UTC

Description xu 2013-06-07 09:57:49 UTC
Created attachment 758088 [details]
backtrace

Description of problem:

start a guest with command:
qemu-kvm -drive if=scsi,file=/root/test/autotest-devel/client/tests/virt/shared/data/images/rhel64-64.qcow2,format=qcow2,media=disk,id=disk0 -vnc :0 -enable-kvm  -smp 2 -m 4096
then, qemu crash with error that "qemu-kvm: Unknown device 'lsi53c895a' for bus 'PCI'"
When the image is connected as an ide disk(if=ide) the vm works fine;

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

qemu-kvm-1.5.0-2.el7.x86_64


How reproducible:

100%

Steps to Reproduce:
1. boot guest with command:
qemu-kvm -drive if=scsi,file=/root/test/autotest-devel/client/tests/virt/shared/data/images/rhel64-64.qcow2,format=qcow2,media=disk,id=disk0 -vnc :0 -enable-kvm  -smp 2 -m 4096


Actual results:

unexpectedly crashes

Expected results:


Additional info:
see backtrack in attachment

Comment 2 Markus Armbruster 2013-06-13 07:51:34 UTC
We don't support -drive if=scsi (see Virtualization Administration
Guide chapter 18.3 qemu-kvm Whitelist / Disk options).

Under the hood, -drive if=scsi creates a lsi53c895a SCSI HBA per bus.
This fails, because we don't ship the lsi53c895a device model.

We could make it fail more nicely, but I'm not sure it's worthwhile.

Comment 3 xu 2013-07-22 08:29:25 UTC
(In reply to Markus Armbruster from comment #2)
> We don't support -drive if=scsi (see Virtualization Administration
> Guide chapter 18.3 qemu-kvm Whitelist / Disk options).
> 
> Under the hood, -drive if=scsi creates a lsi53c895a SCSI HBA per bus.
> This fails, because we don't ship the lsi53c895a device model.
> 
> We could make it fail more nicely, but I'm not sure it's worthwhile.

Hi  Markus Armbruster,

yes, lsi53c895a isn't on rhel7.0  and I think it's worth to report fail more nicely not crash directly;

Thanks,
Xu

Comment 7 CongLi 2017-03-23 02:16:56 UTC
Hi Markus,

Will this bug be fixed in qemu-kvm or qemu-kvm-rhev?
If both, QE would clone this bug to qemu-kvm-rhev too.

Thanks.

Comment 8 Markus Armbruster 2017-03-23 06:09:26 UTC
Uh, I missed the component is qemu-kvm!  I intend to fix it in qemu-kvm-rhev, because the rebase to 2.9 makes the fix trivial.  I'm adjusting the component accordingly.  Feel free to clone if you want this bug tracked for qemu-kvm, too.  A fix seems unlikely unless we rebase, though, simply because non-trivial change just to fix how if=scsi fails is hard to justify.

Thanks for catching my mistake early!

Comment 9 CongLi 2017-03-23 06:20:07 UTC
(In reply to Markus Armbruster from comment #8)
> Uh, I missed the component is qemu-kvm!  I intend to fix it in
> qemu-kvm-rhev, because the rebase to 2.9 makes the fix trivial.  I'm
> adjusting the component accordingly.  Feel free to clone if you want this
> bug tracked for qemu-kvm, too.  A fix seems unlikely unless we rebase,
> though, simply because non-trivial change just to fix how if=scsi fails is
> hard to justify.

Thanks Markus!

QE also prefer to fix this issue in qemu-kvm-rhev.

Comment 12 Miroslav Rezanina 2017-05-23 08:17:10 UTC
Fix included in qemu-kvm-rhev-2.9.0-6.el7

Comment 14 Xueqiang Wei 2017-05-25 07:57:40 UTC
reproduced it on qemu-kvm-rhev-2.9.0-5.el7

the output like:
QEMU 2.9.0 monitor - type 'help' for more information
(qemu) qemu-kvm: Unknown device 'lsi53c895a' for bus 'PCI'
a.sh: line 34: 31854 Aborted                 /usr/libexec/qemu-kvm -S -name 'avocado-vt-vm1' -sandbox off -machine pc -nodefaults -vga cirrus -chardev socket,id=qmp_id_qmpmonitor1,path=/var/tmp/avocado_gIIpiH/monitor-qmpmonitor1-20170517-050538-MGAJgF33,server,nowait -mon chardev=qmp_id_qmpmonitor1,mode=control -chardev socket,id=qmp_id_catch_monitor,path=/var/tmp/avocado_gIIpiH/monitor-catch_monitor-20170517-050538-MGAJgF33,server,nowait -mon chardev=qmp_id_catch_monitor,mode=control -device pvpanic,ioport=0x505,id=idIdVKNW -chardev socket,id=serial_id_serial0,path=/var/tmp/avocado_gIIpiH/serial-serial0-20170517-050538-MGAJgF33,server,nowait -device isa-serial,chardev=serial_id_serial0 -chardev socket,id=seabioslog_id_20170517-050538-MGAJgF33,path=/var/tmp/avocado_gIIpiH/seabios-20170517-050538-MGAJgF33,server,nowait -device isa-debugcon,chardev=seabioslog_id_20170517-050538-MGAJgF33,iobase=0x402 -device ich9-usb-ehci1,id=usb1,addr=0x1d.7,multifunction=on,bus=pci.0 -device ich9-usb-uhci1,id=usb1.0,multifunction=on,masterbus=usb1.0,addr=0x1d.0,firstport=0,bus=pci.0 -device ich9-usb-uhci2,id=usb1.1,multifunction=on,masterbus=usb1.0,addr=0x1d.2,firstport=2,bus=pci.0 -device ich9-usb-uhci3,id=usb1.2,multifunction=on,masterbus=usb1.0,addr=0x1d.4,firstport=4,bus=pci.0 -device virtio-scsi-pci,id=virtio_scsi_pci0,bus=pci.0,addr=0x3 -drive id=drive_image1,if=scsi,snapshot=off,aio=native,cache=none,format=qcow2,file=/home/kvm_autotest_root/images/rhel73-64-virtio-scsi.qcow2,media=disk -device scsi-hd,id=image1,drive=drive_image1,bootindex=0 -device virtio-net-pci,mac=9a:ae:af:b0:b1:b2,id=idosYv4r,vectors=4,netdev=idf8nwBs,bus=pci.0,addr=0x4 -netdev tap,id=idf8nwBs,vhost=on -m 2451 -smp 2,cores=1,threads=1,sockets=2 -cpu 'Opteron_G2',+kvm_pv_unhalt -device usb-tablet,id=usb-tablet1,bus=usb1.0,port=1 -vnc :0 -rtc base=utc,clock=host,driftfix=slew -boot order=cdn,once=c,menu=off,strict=off -monitor stdio


Tested on qemu-kvm-rhev-2.9.0-6.el7 not hit this issue. So verify it.

QEMU 2.9.0 monitor - type 'help' for more information
(qemu) c

Comment 16 errata-xmlrpc 2017-08-01 23:27:12 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2017:2392

Comment 17 errata-xmlrpc 2017-08-02 01:04:50 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2017:2392

Comment 18 errata-xmlrpc 2017-08-02 01:56:50 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2017:2392

Comment 19 errata-xmlrpc 2017-08-02 02:37:35 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2017:2392

Comment 20 errata-xmlrpc 2017-08-02 03:02:18 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2017:2392

Comment 21 errata-xmlrpc 2017-08-02 03:22:27 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2017:2392


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