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 677222 - segment fault happens after hot drive add then drive delete
Summary: segment fault happens after hot drive add then drive delete
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm
Version: 6.1
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Markus Armbruster
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks: 580954 677170 678097
TreeView+ depends on / blocked
 
Reported: 2011-02-14 06:01 UTC by Shirley Zhou
Modified: 2015-03-05 00:52 UTC (History)
7 users (show)

Fixed In Version: qemu-kvm-0.12.1.2-2.145.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-05-19 11:28:28 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2011:0534 0 normal SHIPPED_LIVE Important: qemu-kvm security, bug fix, and enhancement update 2011-05-19 11:20:36 UTC

Description Shirley Zhou 2011-02-14 06:01:46 UTC
Description of problem:
do drive add, then do drive delete, segment fault happens.

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

How reproducible:
2/2

Steps to Reproduce:
1.boot guest with cli:

/usr/libexec/qemu-kvm -enable-kvm -m 2G -smp 2,sockets=2,cores=1,threads=1 -name qcow2 -uuid bb312345-50b0-de70-921b-5c360a945678 -monitor stdio -rtc base=localtime -boot c -drive file=/root/test3.img,if=none,id=drive-ide0-0-0,format=qcow2,cache=none -device virtio-blk-pci,drive=drive-ide0-0-0,id=ide0-0-0 -netdev tap,id=hostnet0 -device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:56:ad:a1,bus=pci.0,addr=0x7 -chardev pty,id=serial0 -device isa-serial,chardev=serial0 -usb -device usb-tablet,id=input0 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x8 -vga qxl -spice port=5911,disable-ticketing -drive file=/home/raw.img,if=none,id=drive-ide0-0-1,format=raw,cache=none -device virtio-blk-pci,drive=drive-ide0-0-1,id=ide0-0-1

2. do drive add
(qemu) __com.redhat_drive_add file=/dev/vgtest1/raw,format=raw,id=drive-virtio1

3.delete drive added in above step
(qemu) __com.redhat_drive_del drive-virtio1

Actual results:
segment fault happens after step3
(gdb) bt
#0  0x0000000000472433 in do_drive_del (mon=<value optimized out>, qdict=<value optimized out>, ret_data=<value optimized out>) at /usr/src/debug/qemu-kvm-0.12.1.2/hw/device-hotplug.c:134
#1  0x0000000000413e10 in monitor_call_handler (mon=0x15b3230, cmd=0x58e820, params=<value optimized out>) at /usr/src/debug/qemu-kvm-0.12.1.2/monitor.c:4338
#2  0x0000000000418d60 in handle_user_command (mon=0x15b3230, cmdline=<value optimized out>) at /usr/src/debug/qemu-kvm-0.12.1.2/monitor.c:4375
#3  0x0000000000418e8a in monitor_command_cb (mon=0x15b3230, cmdline=<value optimized out>, opaque=<value optimized out>) at /usr/src/debug/qemu-kvm-0.12.1.2/monitor.c:4930
#4  0x00000000004a580b in readline_handle_byte (rs=0x1fec960, ch=<value optimized out>) at readline.c:369
#5  0x00000000004190ac in monitor_read (opaque=<value optimized out>, buf=0x7fffe99ea6d0 "\r", size=1) at /usr/src/debug/qemu-kvm-0.12.1.2/monitor.c:4916
#6  0x00000000004be1fb in qemu_chr_read (opaque=0x13b9840) at qemu-char.c:171
#7  fd_chr_read (opaque=0x13b9840) at qemu-char.c:657
#8  0x000000000040b95f in main_loop_wait (timeout=1000) at /usr/src/debug/qemu-kvm-0.12.1.2/vl.c:4424
#9  0x000000000042b29a in kvm_main_loop () at /usr/src/debug/qemu-kvm-0.12.1.2/qemu-kvm.c:2165
#10 0x000000000040ef0f in main_loop (argc=<value optimized out>, argv=<value optimized out>, envp=<value optimized out>) at /usr/src/debug/qemu-kvm-0.12.1.2/vl.c:4634
#11 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:6848


Expected results:
drive delete ok.

Additional info:

Comment 2 Markus Armbruster 2011-02-14 12:16:26 UTC
Reproduced.  

Probable cause: we're missing upstream commit commit 850ec113 "blockdev: Fix drive_del not to crash when drive is not in use".

Comment 7 Shirley Zhou 2011-02-16 05:28:52 UTC
Verify this bug with qemu-kvm-0.12.1.2-2.145.el6 as following steps:

1.add one drive via qemu monitor
(qemu) __com.redhat_drive_add file=/dev/vgtest/raw,id=virtio1,format=raw,cache=none
2.delete this drive 
(qemu) __com.redhat_drive_del virtio1
3. add two drive
(qemu) __com.redhat_drive_add file=/dev/vgtest/raw,id=virtio1,format=raw,cache=none
(qemu)__com.redhat_drive_add file=/root/data.img,id=virtio2,format=qcow2,cache=none
4. delete these drive one by one
(qemu) __com.redhat_drive_del virtio1
(qemu) __com.redhat_drive_del virtio2

After above steps, guest running fine. So this bug has been resolved.

Comment 10 errata-xmlrpc 2011-05-19 11:28:28 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2011-0534.html

Comment 11 errata-xmlrpc 2011-05-19 13:01:36 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2011-0534.html


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