Menu

#411 CPU hotplug causes segfault

open
nobody
None
7
2012-10-09
2009-03-22
Technologov
No

Host: kvm-84 on Intel or AMD. (RHEL 5/x64)

When I use empty VM and add CPU hotplug several times I get a segfault.

Empty VM is started with PXE networking.

qemu-kvm -boot n

Now I connect to Qemu monitor and use:
(qemu) cpu_set 1 online
(qemu) cpu_set 2 online
(qemu) cpu_set 3 online
(qemu) cpu_set 4 online
(qemu) cpu_set 5 online

When I add several CPUs like this - Qemu/KVM userspace will crash.

Very easy to reproduce.

GDB:
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x43c2b940 (LWP 3667)]
0x0000000000459167 in cpu_get_apic_tpr (env=0x1cef87b0)
at /root/Linstall/kvm-84rc1/qemu/hw/apic.c:316
316 {
(gdb) c
Continuing.
[Thread 0x4322a940 (LWP 3666) exited]
[Thread 0x43c2b940 (LWP 3667) exited]
[Thread 0x41e28940 (LWP 3660) exited]
[Thread 0x42829940 (LWP 3661) exited]

Program terminated with signal SIGSEGV, Segmentation fault.
The program no longer exists.

Dmesg:
There are no interesting messages in dmesg.

-Alexey, 22.3.2009.

Discussion

  • Glauber de Oliveira Costa

    Can you get a backtrace for all threads in qemu in the moment of the crash?

    thanks

     
  • Technologov

    Technologov - 2009-03-23
     
  • Technologov

    Technologov - 2009-03-23

    Full GDB output attached.

    -Alexey, 23.3.2009.
    File Added: gdb_of_cpu_hotplug_crash.txt

     
  • Gleb Natapov

    Gleb Natapov - 2009-03-23

    It is a known problem (at least by me). There is a race when APIC is accessed before it is created.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.