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 1585155 - QEMU core dumped when hotplug memory exceeding host hugepages and with discard-data=yes
Summary: QEMU core dumped when hotplug memory exceeding host hugepages and with discar...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm-rhev
Version: 7.6
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: rc
: ---
Assignee: Igor Mammedov
QA Contact: Yumei Huang
URL:
Whiteboard:
Depends On:
Blocks: 1600365 1649160 1651787
TreeView+ depends on / blocked
 
Reported: 2018-06-01 11:32 UTC by Yumei Huang
Modified: 2019-08-22 09:19 UTC (History)
6 users (show)

Fixed In Version: qemu-kvm-rhev-2.12.0-20.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1600365 (view as bug list)
Environment:
Last Closed: 2019-08-22 09:18:46 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2019:2553 0 None None None 2019-08-22 09:19:41 UTC

Description Yumei Huang 2018-06-01 11:32:53 UTC
Description of problem:
Boot a guest, add a memory file backend object with option discard-data=yes, when backend size > host available hugepages, QEMU core dumped.

qemu-kvm: /builddir/build/BUILD/qemu-2.12.0/memory.c:2053: memory_region_get_ram_ptr: Assertion `mr->ram_block' failed.
Aborted (core dumped)


Version-Release number of selected component (if applicable):
qemu-kvm-rhev-2.12.0-2.el7
kernel-3.10.0-891.el7.x86_64

How reproducible:
always

Steps to Reproduce:
1. set hugepages on host

# mount
none on /mnt/kvm_hugepage type hugetlbfs (rw,relatime)

# cat /proc/meminfo  | grep -i huge
AnonHugePages:      8192 kB
HugePages_Total:     512
HugePages_Free:      512
HugePages_Rsvd:        0
HugePages_Surp:        0
Hugepagesize:       2048 kB


2. Boot a guest

# /usr/libexec/qemu-kvm -m 1024,slots=4,maxmem=32G -smp 16,cores=8,threads=1,sockets=2 -numa node -vnc :0 -monitor stdio

 
3. Hotplug memory, add a memory file backend object with discard-data=yes and size=2G

(qemu) object_add memory-backend-file,id=mem1,size=2G,mem-path=/mnt/kvm_hugepage,discard-data=yes


Actual results:
QEMU core dumped:
(qemu) object_add memory-backend-file,id=mem1,size=2G,mem-path=/mnt/kvm_hugepage,discard-data=yes
qemu-kvm: /builddir/build/BUILD/qemu-2.12.0/memory.c:2053: memory_region_get_ram_ptr: Assertion `mr->ram_block' failed.
Aborted (core dumped)


Expected results:
Instead of core dump, qemu prompt error message.


Additional info:
When set discard-data=no, qemu keep running and prompt error message:

(qemu) object_add memory-backend-file,id=mem1,size=2G,mem-path=/mnt/kvm_hugepage,discard-data=no
unable to map backing store for guest RAM: Cannot allocate memory
(qemu) info status
VM status: running

Comment 3 Miroslav Rezanina 2018-12-06 12:39:17 UTC
Fix included in qemu-kvm-rhev-2.12.0-20.el7

Comment 5 Yumei Huang 2018-12-18 06:51:58 UTC
Verify:
qemu-kvm-rhev-2.12.0-20.el7

Same steps with comment0, after step 3, qemu prompts error message instead of core dump.

(qemu) object_add memory-backend-file,id=mem1,size=2G,mem-path=/mnt/kvm_hugepage,discard-data=yes
unable to map backing store for guest RAM: Cannot allocate memory

Comment 7 errata-xmlrpc 2019-08-22 09:18:46 UTC
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.

https://access.redhat.com/errata/RHSA-2019:2553


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