Bug 1903024

Summary: Failed to hotunplug pc-dimm device
Product: Red Hat Enterprise Linux 8 Reporter: Xujun Ma <xuma>
Component: qemu-kvmAssignee: Virtualization Maintenance <virt-maint>
qemu-kvm sub component: General QA Contact: Virtualization Bugs <virt-bugs>
Status: CLOSED DUPLICATE Docs Contact:
Severity: high    
Priority: high CC: jinzhao, juzhang, mdeng, qzhang, virt-maint
Version: 8.4   
Target Milestone: rc   
Target Release: 8.0   
Hardware: ppc64le   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-12-02 02:04:58 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Xujun Ma 2020-12-01 07:16:00 UTC
Description of problem:
Failed to hotunplug pc-dimm device

Version-Release number of selected component (if applicable):
host:
kernel-4.18.0-252.el8.ppc64le
qemu-kvm-4.2.0-35.module+el8.4.0+8705+34397d87.ppc64le
guest:
kernel-4.18.0-252.el8.ppc64le

How reproducible:
100%

Steps to Reproduce:
1.Boot guest with command
/usr/libexec/qemu-kvm \
	-smp 4  \
	-m 4G,slots=16,maxmem=20G \
	-nodefaults \
	-device spapr-vty,id=serial111,chardev=serial \
	-chardev socket,path=serial,id=serial,server,nowait,signal=off \
	-device virtio-scsi-pci,bus=pci.0 \
	-device scsi-hd,id=scsi-hd0,drive=scsi-hd0-dr0,bootindex=0 \
	-drive file=rhel840-ppc64le-virtio-scsi.qcow2,if=none,id=scsi-hd0-dr0,format=qcow2,cache=none \
	-device virtio-net-pci,netdev=net0,id=nic0,mac=52:54:00:c4:e7:84 \
	-netdev tap,id=net0,script=/etc/qemu-ifup,downscript=/etc/qemu-ifdown,vhost=on \
	-mon chardev=monitor,mode=readline -chardev socket,path=monitor,id=monitor,server,nowait,signal=off \
2.Run hotplug and unplug command for a loop
echo "object_add memory-backend-ram,id=mem1,size=4G"|nc -U monitor;
for((i=1;i<=50;i++));do echo "device_add pc-dimm,id=dimm1,memdev=mem1,node=0" |nc -U monitor;sleep 5;echo "device_del dimm1" |nc -U monitor;sleep 5;done
3.

Actual results:
Failed to hotunplug pc-dimm device in the 15 loop.
QEMU 4.2.0 monitor - type 'help' for more information
(qemu) device_add pc-dimm,id=dimm1,memdev=mem1,node=0
(qemu) QEMU 4.2.0 monitor - type 'help' for more information
(qemu) device_del dimm1
(qemu) QEMU 4.2.0 monitor - type 'help' for more information
(qemu) device_add pc-dimm,id=dimm1,memdev=mem1,node=0
(qemu) QEMU 4.2.0 monitor - type 'help' for more information
(qemu) device_del dimm1
(qemu) QEMU 4.2.0 monitor - type 'help' for more information
(qemu) device_add pc-dimm,id=dimm1,memdev=mem1,node=0
(qemu) QEMU 4.2.0 monitor - type 'help' for more information
(qemu) device_del dimm1
(qemu) QEMU 4.2.0 monitor - type 'help' for more information
(qemu) device_add pc-dimm,id=dimm1,memdev=mem1,node=0
(qemu) QEMU 4.2.0 monitor - type 'help' for more information
(qemu) device_del dimm1
(qemu) QEMU 4.2.0 monitor - type 'help' for more information
(qemu) device_add pc-dimm,id=dimm1,memdev=mem1,node=0
(qemu) QEMU 4.2.0 monitor - type 'help' for more information
(qemu) device_del dimm1
(qemu) QEMU 4.2.0 monitor - type 'help' for more information
(qemu) device_add pc-dimm,id=dimm1,memdev=mem1,node=0
(qemu) QEMU 4.2.0 monitor - type 'help' for more information
(qemu) device_del dimm1
(qemu) QEMU 4.2.0 monitor - type 'help' for more information
(qemu) device_add pc-dimm,id=dimm1,memdev=mem1,node=0
(qemu) QEMU 4.2.0 monitor - type 'help' for more information
(qemu) device_del dimm1
(qemu) QEMU 4.2.0 monitor - type 'help' for more information
(qemu) device_add pc-dimm,id=dimm1,memdev=mem1,node=0
(qemu) QEMU 4.2.0 monitor - type 'help' for more information
(qemu) device_del dimm1
(qemu) QEMU 4.2.0 monitor - type 'help' for more information
(qemu) device_add pc-dimm,id=dimm1,memdev=mem1,node=0
(qemu) QEMU 4.2.0 monitor - type 'help' for more information
(qemu) device_del dimm1
(qemu) QEMU 4.2.0 monitor - type 'help' for more information
(qemu) device_add pc-dimm,id=dimm1,memdev=mem1,node=0
(qemu) QEMU 4.2.0 monitor - type 'help' for more information
(qemu) device_del dimm1
(qemu) QEMU 4.2.0 monitor - type 'help' for more information
(qemu) device_add pc-dimm,id=dimm1,memdev=mem1,node=0
(qemu) QEMU 4.2.0 monitor - type 'help' for more information
(qemu) device_del dimm1
(qemu) QEMU 4.2.0 monitor - type 'help' for more information
(qemu) device_add pc-dimm,id=dimm1,memdev=mem1,node=0
(qemu) QEMU 4.2.0 monitor - type 'help' for more information
(qemu) device_del dimm1
(qemu) QEMU 4.2.0 monitor - type 'help' for more information
(qemu) device_add pc-dimm,id=dimm1,memdev=mem1,node=0
(qemu) QEMU 4.2.0 monitor - type 'help' for more information
(qemu) device_del dimm1
(qemu) QEMU 4.2.0 monitor - type 'help' for more information
(qemu) device_add pc-dimm,id=dimm1,memdev=mem1,node=0
(qemu) QEMU 4.2.0 monitor - type 'help' for more information
(qemu) device_del dimm1
(qemu) QEMU 4.2.0 monitor - type 'help' for more information
(qemu) device_add pc-dimm,id=dimm1,memdev=mem1,node=0
Duplicate ID 'dimm1' for device
Try "help device_add" for more information
(qemu) QEMU 4.2.0 monitor - type 'help' for more information
(qemu) device_del dimm1
Error: Memory unplug already in progress for device dimm1


dmesg in the guest:
[  252.911762] pseries-hotplug-mem: Attempting to hot-remove 16 LMB(s) at 80000010
[  253.020976] Offlined Pages 4096
[  253.055256] Offlined Pages 4096
[  253.085625] Offlined Pages 4096
[  253.110270] Offlined Pages 4096
[  253.132497] Offlined Pages 4096
[  253.160455] Offlined Pages 4096
[  253.223452] Offlined Pages 4096
[  253.251284] Offlined Pages 4096
[  253.281638] Offlined Pages 4096
[  253.308033] Offlined Pages 4096
[  253.368658] Offlined Pages 4096
[  253.390495] Offlined Pages 4096
[  253.410955] Offlined Pages 4096
[  253.431035] Offlined Pages 4096
[  253.547874] Offlined Pages 4096
[  253.571757] pseries-hotplug-mem: Memory indexed-count-remove failed, adding any removed LMBs
[  253.574060] radix-mmu: Mapped 0x0000000100000000-0x0000000110000000 with 2.00 MiB pages
[  253.580330] radix-mmu: Mapped 0x0000000110000000-0x0000000120000000 with 2.00 MiB pages
[  253.588992] radix-mmu: Mapped 0x0000000120000000-0x0000000130000000 with 2.00 MiB pages
[  253.602504] radix-mmu: Mapped 0x0000000130000000-0x0000000140000000 with 2.00 MiB pages
[  253.617876] radix-mmu: Mapped 0x0000000140000000-0x0000000150000000 with 2.00 MiB pages
[  253.634560] radix-mmu: Mapped 0x0000000150000000-0x0000000160000000 with 2.00 MiB pages
[  253.642112] radix-mmu: Mapped 0x0000000160000000-0x0000000170000000 with 2.00 MiB pages
[  253.662792] radix-mmu: Mapped 0x0000000170000000-0x0000000180000000 with 2.00 MiB pages
[  253.687809] radix-mmu: Mapped 0x0000000180000000-0x0000000190000000 with 2.00 MiB pages
[  253.707920] radix-mmu: Mapped 0x0000000190000000-0x00000001a0000000 with 2.00 MiB pages
[  253.718375] radix-mmu: Mapped 0x00000001a0000000-0x00000001b0000000 with 2.00 MiB pages
[  253.744106] radix-mmu: Mapped 0x00000001b0000000-0x00000001c0000000 with 2.00 MiB pages
[  253.765718] radix-mmu: Mapped 0x00000001c0000000-0x00000001d0000000 with 2.00 MiB pages
[  253.784612] radix-mmu: Mapped 0x00000001d0000000-0x00000001e0000000 with 2.00 MiB pages
[  253.786238] radix-mmu: Mapped 0x00000001e0000000-0x00000001f0000000 with 2.00 MiB pages
Expected results:
Hotunplug sccessfully.
Additional info:

Comment 1 Min Deng 2020-12-02 01:21:34 UTC
Hi Xujun,
It seems you reported the same issue to the same two bugs.
Bug 1903024 - Failed to hotunplug pc-dimm device 
Bug 1903023 - Failed to hotunplug pc-dimm device
By the way, and are those duplicated with Bug 1901837 ? 

Thanks 
Min

Comment 2 Xujun Ma 2020-12-02 02:04:58 UTC
(In reply to Min Deng from comment #1)
> Hi Xujun,
> It seems you reported the same issue to the same two bugs.
> Bug 1903024 - Failed to hotunplug pc-dimm device 
> Bug 1903023 - Failed to hotunplug pc-dimm device
> By the way, and are those duplicated with Bug 1901837 ? 
> 
> Thanks 
> Min

I don't know why bugzilla tool create it again.close it.

*** This bug has been marked as a duplicate of bug 1901837 ***