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 841176 - cpu_set a new cpu online will cause QEMU core dump
Summary: cpu_set a new cpu online will cause QEMU core dump
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm
Version: 7.0
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Igor Mammedov
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-07-18 10:42 UTC by Sibiao Luo
Modified: 2012-08-01 10:08 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-08-01 10:08:19 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Sibiao Luo 2012-07-18 10:42:18 UTC
Description of problem:
boot a rhel7 guest with "-smp 2,sockets=2,cores=1,threads=1,maxcpus=6", check the infos for each CPU after it boot up successfully, and then cpu_set a new cpu online via HMP monitor, QEMU core dump will occur.

Version-Release number of selected component (if applicable):
host info:
# uname -r && rpm -q qemu-kvm
3.3.0-0.20.el7.x86_64
qemu-kvm-1.0-17.1.el7.x86_64
guest info:
RHEL-7.0-x86_64

How reproducible:
100%

Steps to Reproduce:
1.boot rhel7 guest with "-smp 2,sockets=2,cores=1,threads=1,maxcpus=6".
eg:# /usr/bin/qemu-kvm -enable-kvm -smp 2,sockets=2,cores=1,threads=1,maxcpus=6 -m 2G -usb -device usb-tablet,id=input0 -name sluo-test -drive file=/home/RHEL-7.0-20120521.n.2_x86_64.qcow2,if=none,id=drive-virtio-disk-0,format=qcow2,cache=none,werror=stop,rerror=stop -device virtio-blk-pci,drive=drive-virtio-disk-0,id=virtio0,bootindex=1 -netdev tap,script=/etc/qemu-ifup,id=netdev0 -device virtio-net-pci,netdev=netdev0,id=device-net0 -vnc :1 -monitor stdio -boot menu=on
2.check the infos for each CPU.
(qemu) info cpus
* CPU #0: pc=0x00000000000fefc6 (halted) thread_id=24624
  CPU #1: pc=0x00000000000ff0a2 (halted) thread_id=24626
3.cpu_set a new cpu online.
(qemu) cpu_set 2 online
  
Actual results:
after the step 3, the QEMU core dump.
(qemu) cpu_set 2 online
qemu-kvm: /builddir/build/BUILD/qemu-kvm-1.0/hw/qdev.c:96: qdev_create_from_info: Assertion `bus->allow_hotplug' failed.

Program received signal SIGABRT, Aborted.
0x00007ffff2fcf965 in raise () from /lib64/libc.so.6

(gdb) bt
#0  0x00007ffff2fcf965 in raise () from /lib64/libc.so.6
#1  0x00007ffff2fd1118 in abort () from /lib64/libc.so.6
#2  0x00007ffff2fc86e2 in __assert_fail_base () from /lib64/libc.so.6
#3  0x00007ffff2fc8792 in __assert_fail () from /lib64/libc.so.6
#4  0x000055555569eca5 in qdev_create_from_info (bus=0x55555649a180, info=0x555555b8f300) at /usr/src/debug/qemu-kvm-1.0/hw/qdev.c:96
#5  0x000055555569fc39 in qdev_create (bus=bus@entry=0x0, name=name@entry=0x55555582babe "apic") at /usr/src/debug/qemu-kvm-1.0/hw/qdev.c:112
#6  0x0000555555782d72 in apic_init (apic_id=2 '\002', env=0x555556e1fcc0) at /usr/src/debug/qemu-kvm-1.0/hw/pc.c:886
#7  pc_new_cpu (cpu_model=<optimized out>) at /usr/src/debug/qemu-kvm-1.0/hw/pc.c:952
#8  0x00005555556f6937 in qemu_system_cpu_hot_add (cpu=2, state=<optimized out>) at /usr/src/debug/qemu-kvm-1.0/hw/acpi_piix4.c:592
#9  0x0000555555759779 in handle_user_command (mon=mon@entry=0x55555652ca20, cmdline=<optimized out>) at /usr/src/debug/qemu-kvm-1.0/monitor.c:4161
#10 0x0000555555759a9e in monitor_command_cb (mon=0x55555652ca20, cmdline=<optimized out>, opaque=<optimized out>) at /usr/src/debug/qemu-kvm-1.0/monitor.c:4777
#11 0x00005555556b138b in readline_handle_byte (rs=0x55555652ce90, ch=<optimized out>) at readline.c:370
#12 0x0000555555759847 in monitor_read (opaque=<optimized out>, buf=<optimized out>, size=<optimized out>) at /usr/src/debug/qemu-kvm-1.0/monitor.c:4763
#13 0x00005555556a3aba in qemu_chr_be_write (len=<optimized out>, buf=0x7fffffffcc70 "\r", s=0x5555563b37d0) at qemu-char.c:179
#14 fd_chr_read (opaque=0x5555563b37d0) at qemu-char.c:673
#15 0x000055555561d677 in qemu_iohandler_poll (readfds=readfds@entry=0x7fffffffdd20, writefds=writefds@entry=0x7fffffffdda0, xfds=xfds@entry=0x7fffffffde20, 
    ret=ret@entry=1) at iohandler.c:156
#16 0x0000555555686961 in main_loop_wait (nonblocking=<optimized out>) at main-loop.c:463
#17 0x00005555555c8e49 in main_loop () at /usr/src/debug/qemu-kvm-1.0/vl.c:1482
#18 main (argc=<optimized out>, argv=<optimized out>, envp=<optimized out>) at /usr/src/debug/qemu-kvm-1.0/vl.c:3528
(gdb) q

Expected results:
should cpu_set a new cpu online successfully without any problem and the guest can work well.

Additional info:
BTW, I also have tried the latest qemu-kvm version '1.1.50 (qemu-kvm-devel)' from upstream, still hit this issue.

Comment 2 Igor Mammedov 2012-08-01 10:08:19 UTC
upstream qemu (not qemu-kvm) doesn't/won't have cpu_set command and upstream qemu-kvm hotplug is known to be broken. My understanding is that rhel7 qemu will be based on upstream qemu (qemu-kvm) so all effort is directed there now and rhel7 should inherit CPU hotlug from there.
Interface to add/remove vCPU is not defined yet for sure, it might be device_add/del.


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