1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
graphic: 0.701
performance: 0.498
device: 0.489
semantic: 0.387
other: 0.345
network: 0.323
socket: 0.244
debug: 0.225
PID: 0.214
vnc: 0.204
files: 0.202
permissions: 0.141
KVM: 0.099
boot: 0.070
[BUG][CPU hot-plug]CPU hot-plugs cause the qemu process to coredump
Hello,Recently, when I was developing CPU hot-plugs under the loongarch
architecture,
I found that there was a problem with qemu cpu hot-plugs under x86
architecture,
which caused the qemu process coredump when repeatedly inserting and
unplugging
the CPU when the TCG was accelerated.
The specific operation process is as follows:
1.Use the following command to start the virtual machine
qemu-system-x86_64 \
-machine q35Â \
-cpu Broadwell-IBRS \
-smp 1,maxcpus=4,sockets=4,cores=1,threads=1 \
-m 4G \
-drive file=~/anolis-8.8.qcow2Â \
-serial stdio  \
-monitor telnet:localhost:4498,server,nowait
2.Enter QEMU Monitor via telnet for repeated CPU insertion and unplugging
telnet 127.0.0.1 4498
(qemu) device_add
Broadwell-IBRS-x86_64-cpu,socket-id=1,core-id=0,thread-id=0,id=cpu1
(qemu) device_del cpu1
(qemu) device_add
Broadwell-IBRS-x86_64-cpu,socket-id=1,core-id=0,thread-id=0,id=cpu1
3.You will notice that the QEMU process has a coredump
# malloc(): unsorted double linked list corrupted
Aborted (core dumped)
|