Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1096575

Summary: qemu-kvm will core dump when boot two scsi-hd devices with the same "scsi-id and lun"(no specify memory size)
Product: Red Hat Enterprise Linux 7 Reporter: Jun Li <juli>
Component: qemu-kvmAssignee: Fam Zheng <famz>
Status: CLOSED DUPLICATE QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.0CC: acathrow, hhuang, juzhang, michen, qiguo, qzhang, sluo, virt-maint, xfu
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1096577 (view as bug list) Environment:
Last Closed: 2014-06-11 06:10:42 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1096577    

Description Jun Li 2014-05-12 04:53:15 UTC
Description of problem:
boot qemu-kvm attach two scsi-hd devices with the same "scsi-id and lun" and do not specify the memory size(using the defaults memory size), qemu-kvm will core dump.

Version-Release number of selected component (if applicable):
qemu-kvm-1.5.3-60.el7_0.2.x86_64
3.10.0-123.el7.x86_64
seabios-bin-1.7.2.2-12.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1.boot qemu-kvm using the following cli:
# gdb --agrs /usr/libexec/qemu-kvm \
-device virtio-scsi-pci,id=scsi0 \
-drive file=/home/juli/sn1.qcow2,if=none,id=disk1 \
-device scsi-hd,drive=disk1,id=sys-disk1,scsi-id=0,lun=0,bootindex=0 \
-boot menu=on -monitor stdio -S \
-drive file=/home/juli/sn1.qcow2,if=none,id=disk2 \
-device scsi-hd,drive=disk2,id=sys-disk2,scsi-id=0,lun=0,bootindex=3 
2.
3.

Actual results:
(gdb) bt
#0  qdev_get_fw_dev_path_helper (dev=0x555556b00480, 
    p=p@entry=0x7fffffffddd0 "0", size=128) at hw/core/qdev.c:506
#1  0x00005555556718b3 in qdev_get_fw_dev_path (dev=<optimized out>)
    at hw/core/qdev.c:525
#2  0x00005555557439c5 in get_boot_devices_list (
    size=size@entry=0x7fffffffded0) at vl.c:1229
#3  0x00005555556a1220 in fw_cfg_machine_ready (n=0x555556aa6bd0, 
    data=<optimized out>) at hw/nvram/fw_cfg.c:503
#4  0x0000555555854ca7 in notifier_list_notify (
    list=list@entry=0x5555560602c8 <machine_init_done_notifiers>, 
    data=data@entry=0x0) at util/notify.c:39
#5  0x0000555555601ec4 in qemu_run_machine_init_done_notifiers () at vl.c:2692
#6  main (argc=<optimized out>, argv=<optimized out>, envp=<optimized out>)
    at vl.c:4333


Expected results:
No core dump.

Additional info:
When set -m 512M, qemu-kvm will core dump, too.
# gdb --args /usr/libexec/qemu-kvm -device virtio-scsi-pci,id=scsi0 -drive file=/home/juli/sn1.qcow2,if=none,id=disk1 -device scsi-hd,drive=disk1,id=sys-disk1,scsi-id=0,lun=0,bootindex=0 -boot menu=on -monitor stdio -S -drive file=/home/juli/sn1.qcow2,if=none,id=disk2 -device scsi-hd,drive=disk2,id=sys-disk2,scsi-id=0,lun=0,bootindex=3 -m 512M
(gdb) bt
#0  0x0000555555671027 in qdev_get_fw_dev_path_helper (dev=0x7, 
    p=p@entry=0x7fffffffddc0 "0", size=128) at hw/core/qdev.c:504
#1  0x000055555567103d in qdev_get_fw_dev_path_helper (dev=0x555556ac61c0, 
    p=p@entry=0x7fffffffddc0 "0", size=128) at hw/core/qdev.c:506
#2  0x00005555556718b3 in qdev_get_fw_dev_path (dev=<optimized out>)
    at hw/core/qdev.c:525
#3  0x00005555557439c5 in get_boot_devices_list (
    size=size@entry=0x7fffffffdec0) at vl.c:1229
#4  0x00005555556a1220 in fw_cfg_machine_ready (n=0x555556acc260, 
    data=<optimized out>) at hw/nvram/fw_cfg.c:503
#5  0x0000555555854ca7 in notifier_list_notify (
    list=list@entry=0x5555560602c8 <machine_init_done_notifiers>, 
    data=data@entry=0x0) at util/notify.c:39
#6  0x0000555555601ec4 in qemu_run_machine_init_done_notifiers () at vl.c:2692
#7  main (argc=<optimized out>, argv=<optimized out>, envp=<optimized out>)
    at vl.c:4333
----
When set memory size >=889M, will no core dump.

Comment 2 Fam Zheng 2014-06-11 06:10:42 UTC

*** This bug has been marked as a duplicate of bug 1096576 ***