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 736644 - mem lack cause qemu_memalign crash
Summary: mem lack cause qemu_memalign crash
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm
Version: 6.2
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Virtualization Maintenance
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-09-08 10:49 UTC by Suqin Huang
Modified: 2013-01-10 00:17 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-09-12 07:14:36 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Suqin Huang 2011-09-08 10:49:47 UTC
Description of problem:
echo large mem to /proc/sys/vm/nr_hugepage, and then run guest.

Version-Release number of selected component (if applicable):
qemu-kvm-0.12.1.2-2.188.el6.x86_64

How reproducible:
100%

Steps to Reproduce:
1. echo large mem to /proc/sys/vm/nr_hugepage
2. run guest

usr/libexec/qemu-kvm -monitor stdio -drive file='/home/Auto/autotest-devel/client/tests/kvm/images/RHEL-Server-6.1-64-virtio.qcow2',index=0,if=none,id=drive-virtio-disk1,media=disk,cache=none,format=qcow2,aio=native -device virtio-blk-pci,bus=pci.0,addr=0x4,drive=drive-virtio-disk1,id=virtio-disk1 -device virtio-net-pci,netdev=idCnizDC,mac=00:e6:4a:94:f2:20,id=ndev00idCnizDC,bus=pci.0,addr=0x3 -netdev tap,id=idCnizDC,vhost=on,script='/home/Auto/autotest-devel/client/tests/kvm/scripts/qemu-ifup-switch',downscript='no' -m 4G -smp 2,cores=2,threads=1,sockets=1 -cpu cpu64-rhel6,+sse2,+x2apic -vnc :2 -rtc base=utc,clock=host,driftfix=none -M rhel6.2.0 -boot order=cdn,once=c,menu=off   -usbdevice tablet -no-kvm-pit-reinjection -enable-kvm

3.
  
Actual results:
guest crash

Expected results:
quest quit with mem lack warning

Additional info:

gdb) 
#0  0x00000033f4432945 in raise () from /lib64/libc.so.6
#1  0x00000033f4434125 in abort () from /lib64/libc.so.6
#2  0x0000000000482b50 in qemu_memalign (alignment=2097152, size=8589934592) at osdep.c:112
#3  0x00000000004e9a32 in qemu_ram_alloc_from_ptr (dev=<value optimized out>, name=<value optimized out>, size=8589934592, host=<value optimized out>)
    at /usr/src/debug/qemu-kvm-0.12.1.2/exec.c:2730
#4  0x0000000000451253 in pc_init1 (ram_size=3758096384, boot_device=0x7fff883a1b80 "d", 
    kernel_filename=0x7fff883a45e1 "/home/Auto/autotest-devel/client/tests/kvm/images/rhel61-64/vmlinuz", 
    kernel_cmdline=0x7fff883a4703 "ks=cdrom nicdelay=60 console=ttyS0,115200 console=tty0", 
    initrd_filename=0x7fff883a462d "/home/Auto/autotest-devel/client/tests/kvm/images/rhel61-64/initrd.img", cpu_model=0x7fff883a45bf "cpu64-rhel6,+sse2,+x2apic", 
    pci_enabled=1) at /usr/src/debug/qemu-kvm-0.12.1.2/hw/pc.c:1114
#5  0x000000000040d1ff in main (argc=<value optimized out>, argv=<value optimized out>, envp=<value optimized out>) at /usr/src/debug/qemu-kvm-0.12.1.2/vl.c:6081

Comment 2 Dor Laor 2011-09-12 07:14:36 UTC
This is works as designed. If we're using static huge pages we expect to get enough of them. If you do not have enough (reserved before), just use THP instead.

Comment 3 Suqin Huang 2011-09-12 07:38:59 UTC
Hi Dor,
I think it should quit but not crash

Comment 4 Dor Laor 2011-09-14 21:24:54 UTC
(In reply to comment #3)
> Hi Dor,
> I think it should quit but not crash

You're right but we barely have the bandwidth to change it, raising an exception is not that awkward solution


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