Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 990237 - qemu-kvm exits when hotplugging a cpu with --no-acpi
qemu-kvm exits when hotplugging a cpu with --no-acpi
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm (Show other bugs)
6.5
x86_64 Linux
unspecified Severity low
: rc
: ---
Assigned To: Igor Mammedov
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-30 11:53 EDT by Peter Krempa
Modified: 2013-12-05 05:10 EST (History)
11 users (show)

See Also:
Fixed In Version: qemu-kvm-0.12.1.2-2.390.el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-11-21 02:05:49 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
[RHEL-6.5 qemu-kvm PATCH] Do not quit QEMU if cpu-set is called in non ACPI mode (1020 bytes, patch)
2013-07-31 03:57 EDT, Igor Mammedov
no flags Details | Diff


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2013:1553 normal SHIPPED_LIVE Important: qemu-kvm security, bug fix, and enhancement update 2013-11-20 16:40:29 EST

  None (edit)
Description Peter Krempa 2013-07-30 11:53:04 EDT
Description of problem:
When attempting to start a new cpu on a machine without ACPI qemu-kvm exits instead of reporting an error to the monitor and forbidding the hotplug that is not possible without ACPI.

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

How reproducible:
Always.

Steps to Reproduce:
1. Start qemu-kvm with free cpu sockets and -no-acpi
2. try to hotplug a cpu
3. qemu exits

Actual results:
qemu-kvm exits with:

Unknown cpu model: <84><8B>^?
Unable to support requested x86 CPU definition

(note the binary characters, probably another issue)

Expected results:
qemu-kvm forbids hotplug of the cpus via a monitor message

Additional info:
Comment 2 Igor Mammedov 2013-07-31 03:57:11 EDT
Created attachment 780984 [details]
[RHEL-6.5 qemu-kvm PATCH] Do not quit QEMU if cpu-set is called in non ACPI mode
Comment 6 Markus Armbruster 2013-08-14 07:08:19 EDT
Alternate reproducer that crashes rather than terminates QEMU:

$ qemu-kvm -nodefaults -vnc :0 -monitor stdio -S -smp 2 -no-acpi
QEMU 0.12.1 monitor - type 'help' for more information
(qemu) cpu_set 1 offline
Segmentation fault (core dumped)
Comment 10 zhonglinzhang 2013-09-09 04:41:04 EDT
Reproduce with qemu-kvm-0.12.1.2-2.356.el6.x86_64

Steps to Reproduce:
1. Boot a guest with following command line:
/usr/libexec/qemu-kvm -M pc -nodefaults  -cpu SandyBridge -enable-kvm -m 4G -smp 4,sockets=1,cores=4,threads=1 -no-acpi  .........................

2. Check cpu in qemu monitor:
(qemu) info cpus
* CPU #0: pc=0xffffffff8103eccb (halted) thread_id=15109 
  CPU #1: pc=0x00000000000f58a7 (halted) thread_id=15110 
  CPU #2: pc=0x00000000000f58a7 (halted) thread_id=15111 
  CPU #3: pc=0x00000000000f58a7 (halted) thread_id=15112

3. (qemu) cpu_set 1 offline

Actual Results:
qemu-kvm core dump
(gdb) bt
#0  disable_processor (cpu=<value optimized out>, state=<value optimized out>, mon=0x7ffff88d8820)
    at /usr/src/debug/qemu-kvm-0.12.1.2/hw/acpi.c:974
#1  qemu_system_cpu_hot_add (cpu=<value optimized out>, state=<value optimized out>, mon=0x7ffff88d8820)
    at /usr/src/debug/qemu-kvm-0.12.1.2/hw/acpi.c:1002
#2  0x00007ffff7dec189 in handle_user_command (mon=0x7ffff88d8820, cmdline=<value optimized out>)
    at /usr/src/debug/qemu-kvm-0.12.1.2/monitor.c:4368
#3  0x00007ffff7dec1ea in monitor_command_cb (mon=0x7ffff88d8820, cmdline=<value optimized out>, 
    opaque=<value optimized out>) at /usr/src/debug/qemu-kvm-0.12.1.2/monitor.c:5001
#4  0x00007ffff7e49fbd in readline_handle_byte (rs=0x7ffff9cdfd80, ch=<value optimized out>)
    at /usr/src/debug/qemu-kvm-0.12.1.2/readline.c:369
#5  0x00007ffff7dec410 in monitor_read (opaque=<value optimized out>, buf=0x7fffffffba90 "\r", size=1)
    at /usr/src/debug/qemu-kvm-0.12.1.2/monitor.c:4987
#6  0x00007ffff7e600cb in qemu_chr_read (opaque=0x7ffff86db700)
    at /usr/src/debug/qemu-kvm-0.12.1.2/qemu-char.c:180
#7  fd_chr_read (opaque=0x7ffff86db700) at /usr/src/debug/qemu-kvm-0.12.1.2/qemu-char.c:688
#8  0x00007ffff7ddf29f in main_loop_wait (timeout=1000) at /usr/src/debug/qemu-kvm-0.12.1.2/vl.c:3975
#9  0x00007ffff7e0197a in kvm_main_loop () at /usr/src/debug/qemu-kvm-0.12.1.2/qemu-kvm.c:2244
#10 0x00007ffff7de2008 in main_loop (argc=37, argv=<value optimized out>, envp=<value optimized out>)
    at /usr/src/debug/qemu-kvm-0.12.1.2/vl.c:4187
#11 main (argc=37, argv=<value optimized out>, envp=<value optimized out>)
    at /usr/src/debug/qemu-kvm-0.12.1.2/vl.c:6525



Verify with qemu-kvm-0.12.1.2-2.400.el6.x86_64
steps as above
Actual Results: 
qemu-kvm no core dump
(qemu) cpu_set 1 offline
CPU hot add is disabled by -no-acpi option


Based on above information, so this issue has been fixed.
Comment 11 zhonglinzhang 2013-09-13 03:56:31 EDT
(In reply to zhonglinzhang from comment #10)
> Reproduce with qemu-kvm-0.12.1.2-2.356.el6.x86_64
> 
> Steps to Reproduce:
> 1. Boot a guest with following command line:
> /usr/libexec/qemu-kvm -M pc -nodefaults  -cpu SandyBridge -enable-kvm -m 4G
> -smp 4,sockets=1,cores=4,threads=1 -no-acpi  .........................
> 
> 2. Check cpu in qemu monitor:
> (qemu) info cpus
> * CPU #0: pc=0xffffffff8103eccb (halted) thread_id=15109 
>   CPU #1: pc=0x00000000000f58a7 (halted) thread_id=15110 
>   CPU #2: pc=0x00000000000f58a7 (halted) thread_id=15111 
>   CPU #3: pc=0x00000000000f58a7 (halted) thread_id=15112
> 
> 3. (qemu) cpu_set 1 offline
> 
> Actual Results:
> qemu-kvm core dump
> (gdb) bt
> #0  disable_processor (cpu=<value optimized out>, state=<value optimized
> out>, mon=0x7ffff88d8820)
>     at /usr/src/debug/qemu-kvm-0.12.1.2/hw/acpi.c:974
> #1  qemu_system_cpu_hot_add (cpu=<value optimized out>, state=<value
> optimized out>, mon=0x7ffff88d8820)
>     at /usr/src/debug/qemu-kvm-0.12.1.2/hw/acpi.c:1002
> #2  0x00007ffff7dec189 in handle_user_command (mon=0x7ffff88d8820,
> cmdline=<value optimized out>)
>     at /usr/src/debug/qemu-kvm-0.12.1.2/monitor.c:4368
> #3  0x00007ffff7dec1ea in monitor_command_cb (mon=0x7ffff88d8820,
> cmdline=<value optimized out>, 
>     opaque=<value optimized out>) at
> /usr/src/debug/qemu-kvm-0.12.1.2/monitor.c:5001
> #4  0x00007ffff7e49fbd in readline_handle_byte (rs=0x7ffff9cdfd80, ch=<value
> optimized out>)
>     at /usr/src/debug/qemu-kvm-0.12.1.2/readline.c:369
> #5  0x00007ffff7dec410 in monitor_read (opaque=<value optimized out>,
> buf=0x7fffffffba90 "\r", size=1)
>     at /usr/src/debug/qemu-kvm-0.12.1.2/monitor.c:4987
> #6  0x00007ffff7e600cb in qemu_chr_read (opaque=0x7ffff86db700)
>     at /usr/src/debug/qemu-kvm-0.12.1.2/qemu-char.c:180
> #7  fd_chr_read (opaque=0x7ffff86db700) at
> /usr/src/debug/qemu-kvm-0.12.1.2/qemu-char.c:688
> #8  0x00007ffff7ddf29f in main_loop_wait (timeout=1000) at
> /usr/src/debug/qemu-kvm-0.12.1.2/vl.c:3975
> #9  0x00007ffff7e0197a in kvm_main_loop () at
> /usr/src/debug/qemu-kvm-0.12.1.2/qemu-kvm.c:2244
> #10 0x00007ffff7de2008 in main_loop (argc=37, argv=<value optimized out>,
> envp=<value optimized out>)
>     at /usr/src/debug/qemu-kvm-0.12.1.2/vl.c:4187
> #11 main (argc=37, argv=<value optimized out>, envp=<value optimized out>)
>     at /usr/src/debug/qemu-kvm-0.12.1.2/vl.c:6525
> 
> 
> 
> Verify with qemu-kvm-0.12.1.2-2.400.el6.x86_64
> steps as above
> Actual Results: 
> qemu-kvm no core dump
> (qemu) cpu_set 1 offline
> CPU hot add is disabled by -no-acpi option
> 
> 
> Based on above information, so this issue has been fixed.




In "Steps to Reproduce" step 3
(qemu) cpu_set 1 online
core dump
(gdb) bt
#0  enable_processor (cpu=<value optimized out>, state=<value optimized out>, mon=0x7ffff9ce32d0)
    at /usr/src/debug/qemu-kvm-0.12.1.2/hw/acpi.c:968
#1  qemu_system_cpu_hot_add (cpu=<value optimized out>, state=<value optimized out>, mon=0x7ffff9ce32d0)
    at /usr/src/debug/qemu-kvm-0.12.1.2/hw/acpi.c:1000
#2  0x00007ffff7dec189 in handle_user_command (mon=0x7ffff9ce32d0, cmdline=<value optimized out>)
    at /usr/src/debug/qemu-kvm-0.12.1.2/monitor.c:4368
#3  0x00007ffff7dec1ea in monitor_command_cb (mon=0x7ffff9ce32d0, cmdline=<value optimized out>, 
    opaque=<value optimized out>) at /usr/src/debug/qemu-kvm-0.12.1.2/monitor.c:5001
#4  0x00007ffff7e49fbd in readline_handle_byte (rs=0x7ffff9cf4010, ch=<value optimized out>)
    at /usr/src/debug/qemu-kvm-0.12.1.2/readline.c:369
#5  0x00007ffff7dec410 in monitor_read (opaque=<value optimized out>, buf=0x7fffffffb9e0 "\r", size=1)
    at /usr/src/debug/qemu-kvm-0.12.1.2/monitor.c:4987
#6  0x00007ffff7e600cb in qemu_chr_read (opaque=0x7ffff86dbc60)
    at /usr/src/debug/qemu-kvm-0.12.1.2/qemu-char.c:180
#7  fd_chr_read (opaque=0x7ffff86dbc60) at /usr/src/debug/qemu-kvm-0.12.1.2/qemu-char.c:688
#8  0x00007ffff7ddf29f in main_loop_wait (timeout=1000) at /usr/src/debug/qemu-kvm-0.12.1.2/vl.c:3975
#9  0x00007ffff7e0197a in kvm_main_loop () at /usr/src/debug/qemu-kvm-0.12.1.2/qemu-kvm.c:2244
#10 0x00007ffff7de2008 in main_loop (argc=41, argv=<value optimized out>, envp=<value optimized out>)
    at /usr/src/debug/qemu-kvm-0.12.1.2/vl.c:4187
#11 main (argc=41, argv=<value optimized out>, envp=<value optimized out>)
    at /usr/src/debug/qemu-kvm-0.12.1.2/vl.c:6525




Verify step 3 
(qemu) cpu_set 1 online
CPU hot add is disabled by -no-acpi option
no core dump





Based on above information, so this issue has been fixed.
Comment 13 errata-xmlrpc 2013-11-21 02:05:49 EST
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.

http://rhn.redhat.com/errata/RHSA-2013-1553.html

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