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 1432302 - Memory-backend-ram is in use when try to remove it from a guest attached with memory back file and pci_dimm beforehand
Summary: Memory-backend-ram is in use when try to remove it from a guest attached with...
Keywords:
Status: CLOSED DUPLICATE of bug 1245892
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm-rhev
Version: 7.4
Hardware: All
OS: Unspecified
high
high
Target Milestone: rc
: ---
Assignee: Igor Mammedov
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-03-15 03:27 UTC by Min Deng
Modified: 2017-04-06 07:13 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-04-06 07:13:47 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Min Deng 2017-03-15 03:27:27 UTC
Description of problem:
Memory-backend-ram is in use when try to remove it from a guest attached with memory back file and pci_dimm beforehand.
Version-Release number of selected component (if applicable):
ppc64le:
kernel-3.10.0-600.el7.ppc64le
qemu-kvm-rhev-2.8.0-6.el7.ppc64le
1:SLOF-20160223-6.gitdbbfda4.el7
x86:
kernel-3.10.0-595.el7.x86_64
qemu-kvm-rhev-2.8.0-6.el7.x86_64

How reproducible:
Always
Steps to Reproduce:
1.boot up guest with following cli,
  /usr/libexec/qemu-kvm -name virt-tests-vm1 -sandbox off -machine pseries-rhel7.4.0 -nodefaults -vga std -chardev socket,id=hmp_id_humanmonitor1,path=/tmp/monitor-humanmonitor1-20151207-185515-CKlGrjUv,server,nowait -mon chardev=hmp_id_humanmonitor1,mode=readline -chardev socket,id=qmp_id_qmp1,path=/tmp/monitor-qmp1-20151207-185515-CKlGrjUv,server,nowait -mon chardev=qmp_id_qmp1,mode=control -chardev socket,id=hmp_id_catch_monitor,path=/tmp/monitor-catch_monitor-20151207-185515-CKlGrjUv,server,nowait -mon chardev=hmp_id_catch_monitor,mode=readline -chardev socket,id=serial_id_serial0,path=/tmp/serial-serial0-20151207-185515-CKlGrjUv,server,nowait -device virtio-scsi-pci,id=virtio_scsi_pci0,bus=pci.0,addr=03,disable-legacy=off,disable-modern=on -drive id=drive_image1,if=none,cache=none,snapshot=off,aio=native,format=qcow2,file=rhel74-ppc64le-virtio-scsi-latest.qcow2 -device scsi-hd,id=image1,drive=drive_image1 -numa node -qmp tcp:0:4444,server,nowait -vnc :1 -rtc base=utc,clock=host,driftfix=slew -boot order=cdn,once=c,menu=off,strict=off -enable-kvm -monitor stdio -device pci-ohci,id=usb1 -device usb-kbd,id=input0 -device usb-mouse,id=input1 -device usb-tablet,id=input2 -netdev tap,script=/etc/qemu-ifup,downscript=/etc/qemu-down,id=hostnet1,vhost=on -device virtio-net-pci,netdev=hostnet1,id=net1,mac=00:52:11:36:3f:00 -m 4G,slots=32,maxmem=40G -object memory-backend-ram,id=mem1,size=1G  -device pc-dimm,id=dimm1,memdev=mem1
2.Execute unplug operation from HMP
(qemu) device_del dimm1
(qemu) object_del mem1


Actual results:
object 'mem1' is in use, can not be removed.

Expected results:
From QE's perspective,it should be removed as well.


Additional info:
The issue won't happen when the guest was not attached memory-backend-ram and pci_dimm beforehand.
Steps,
(qemu) object_add memory-backend-ram,id=mem1,size=1G
(qemu) device_add pc-dimm,id=dimm1,memdev=mem1
(qemu) device_del dimm1
(qemu) object_del mem1

Comment 2 Yumei Huang 2017-03-16 02:15:59 UTC
In my view, this bug might be duplicate of bz1245892 [1].

[1]Bug 1245892 - hot-unhotplug guest memory fail most of the time because it is in use

Hi Igor,
Could you please help clarify ? Thanks!

Comment 3 Igor Mammedov 2017-03-16 08:29:50 UTC
memory backend is not removable until dimm it's linked to is removed, so one should not try to remove it untill 'device_del dimmX' gets confirmation (i.e. DEVICE_DELETED event) since device_del is async op and it's upto guest to decide
if it can be removed or not.

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

Comment 4 Min Deng 2017-03-22 09:56:05 UTC
(In reply to Igor Mammedov from comment #3)
> memory backend is not removable until dimm it's linked to is removed, so one
> should not try to remove it untill 'device_del dimmX' gets confirmation
> (i.e. DEVICE_DELETED event) since device_del is async op and it's upto guest
> to decide
> if it can be removed or not.
> 
> *** This bug has been marked as a duplicate of bug 1245892 ***

  Thanks for your reply.As far as QE know the implementation mechanism are different for x86 and power,if I was wrong please correct me.
  Thus the bug should not be marked as duplicated simply from QE's opinions.In case of any potential risks I just open it for further investigation on power platform.Thanks a lot.

Best Regards
Min

Comment 5 David Gibson 2017-04-06 00:26:34 UTC
Min,

Sorry for the delay.  I'm not really sure what your question is.

I think Igor is probably right and this is due to the Power variant of bug 1245892, but that is a bit difficult to confirm until we have a fix for that bug.

Comment 6 Min Deng 2017-04-06 07:13:47 UTC
(In reply to David Gibson from comment #5)
> Min,
> 
> Sorry for the delay.  I'm not really sure what your question is.
> 
> I think Igor is probably right and this is due to the Power variant of bug
> 1245892, but that is a bit difficult to confirm until we have a fix for that
> bug.

  QE get your points and close it now.
  Thanks 
  Min

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


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