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 619168 - qemu should more clearly indicate internal detection of this host out-of-memory condition at startup..
Summary: qemu should more clearly indicate internal detection of this host out-of-memo...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm
Version: 6.1
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: john cooper
QA Contact: Virtualization Bugs
URL:
Whiteboard: abrt_hash:841543466c446020eb7a11ccd0e...
Depends On: 612453
Blocks: 580953
TreeView+ depends on / blocked
 
Reported: 2010-07-28 18:39 UTC by john cooper
Modified: 2014-07-25 03:46 UTC (History)
10 users (show)

Fixed In Version: qemu-kvm-0.12.1.2-2.114.el6
Doc Type: Bug Fix
Doc Text:
Cause In the case of certain memory allocation failures, qemu exits with only a self inflicted SIGABORT rather than clearly indicating this cause for failure to the user. Consequence Confusion and possible unhappiness on behalf of the qemu user. Change The condition of allocation failure is detected. Result A message is emitted clearly indication the failure cause.
Clone Of: 612453
Environment:
Last Closed: 2011-05-19 11:29:07 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
gdb stack trace of abort (3.24 KB, application/octet-stream)
2010-09-04 23:51 UTC, john cooper
no flags Details
posix_memalign failure patch (491 bytes, patch)
2010-09-04 23:54 UTC, john cooper
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2011:0534 0 normal SHIPPED_LIVE Important: qemu-kvm security, bug fix, and enhancement update 2011-05-19 11:20:36 UTC

Comment 2 RHEL Program Management 2010-07-28 18:57:46 UTC
This issue has been proposed when we are only considering blocker
issues in the current Red Hat Enterprise Linux release.

** If you would still like this issue considered for the current
release, ask your support representative to file as a blocker on
your behalf. Otherwise ask that it be considered for the next
Red Hat Enterprise Linux release. **

Comment 3 john cooper 2010-09-04 23:49:02 UTC
I just hit this myself consistently on a system with substantial
memory pressure: 4GB total and ~10% free.  Launching with -m 1024
the abort triggers faithfully and with -m 512 qemu launches
successfully.  From the user's perspective of stumbling into this
caveat myself it's rather ugly and isn't at a minor usage issue.
Providing a clue to the cause of failure is trivial.  Dump attached.
Patch attached.

Still not sure why the about() is in there unless as a debug
aid such that a core image exists to help puzzle out the
posix_memalign() failure.  Although in this case the cause is
clear.

Odd this apparently hasn't been more widely seen.  Likely
related not only to memory pressure but perhaps a host memory
fragmentation sensitivity as well.

Comment 4 john cooper 2010-09-04 23:51:04 UTC
Created attachment 443114 [details]
gdb stack trace of abort

Comment 5 john cooper 2010-09-04 23:54:00 UTC
Created attachment 443115 [details]
posix_memalign failure patch

Comment 6 john cooper 2010-09-04 23:57:51 UTC
Disregard above patch -- already upstream as
d2d5adcb58d32e8ac6c168c4c2e72cf0f90dcab0.

Comment 14 juzhang 2011-01-13 10:30:53 UTC
Reproduced on qemu-kvm-0.12.1.2-2.113.el6.x86_64,when assign to guest memory higher than host free memory,guest aborted without notification.
/usr/libexec/qemu-kvm -m 4G -smp 2 -drive file=/root/zhangjunyi/win2008-64bit.img,if=none,id=test,boot=on,cache=none,format=raw,werror=stop,rerror=stop -device virtio-blk-pci,drive=test -cpu qemu64,+sse2,+x2apic -monitor stdio -boot c -netdev tap,id=hostnet0,vhost=on -device virtio-net-pci,netdev=hostnet0,id=net0,mac=22:11:22:45:66:94 -vnc :10 -qmp tcp:0:4445,server,nowait -chardev socket,path=/tmp/amit/test0,server,nowait,id=test0 -chardev socket,path=/tmp/amit/test1,server,nowait,id=test1 -chardev socket,path=/tmp/amit/test2,server,nowait,id=test2 -chardev socket,path=/tmp/amit/test3,server,nowait,id=test3 -chardev socket,path=/tmp/amit/test4,server,nowait,id=test4 -device virtio-serial -device virtconsole,chardev=test0,name=console.0 -device virtserialport,chardev=test1,name=test1 -device virtserialport,chardev=test2,name=test2 -device virtserialport,chardev=test3,name=test3 -device virtserialport,chardev=test4,name=test4 -serial file:/tmp/amit/test-serial.log
Aborted

Verified on qemu-kvm-0.12.1.2-2.129.el6.x86_64,when assign to guest memory higher than host free memory,guest aborted with message "Failed to allocate 4294967296 B: Cannot allocate memory".
#/usr/libexec/qemu-kvm -m 4G -smp 2 -drive file=/root/zhangjunyi/win2008-64bit.img,if=none,id=test,boot=on,cache=none,format=raw,werror=stop,rerror=stop -device virtio-blk-pci,drive=test -cpu qemu64,+sse2,+x2apic -monitor stdio -boot c -netdev tap,id=hostnet0,vhost=on -device virtio-net-pci,netdev=hostnet0,id=net0,mac=22:11:22:45:66:94 -vnc :10 -qmp tcp:0:4445,server,nowait -chardev socket,path=/tmp/amit/test0,server,nowait,id=test0 -chardev socket,path=/tmp/amit/test1,server,nowait,id=test1 -chardev socket,path=/tmp/amit/test2,server,nowait,id=test2 -chardev socket,path=/tmp/amit/test3,server,nowait,id=test3 -chardev socket,path=/tmp/amit/test4,server,nowait,id=test4 -device virtio-serial -device virtconsole,chardev=test0,name=console.0 -device virtserialport,chardev=test1,name=test1 -device virtserialport,chardev=test2,name=test2 -device virtserialport,chardev=test3,name=test3 -device virtserialport,chardev=test4,name=test4 -serial file:/tmp/amit/test-serial.log
Failed to allocate 4294967296 B: Cannot allocate memory

According to above description,this issue has been fixed.

Comment 16 john cooper 2011-05-05 14:33:17 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Cause
    In the case of certain memory allocation failures, qemu
exits with only a self inflicted SIGABORT rather than
clearly indicating this cause for failure to the user.

Consequence
    Confusion and possible unhappiness on behalf of the
qemu user.

Change
    The condition of allocation failure is detected.


Result
    A message is emitted clearly indication the failure cause.

Comment 17 john cooper 2011-05-05 14:33:55 UTC
Added CCFR

Comment 18 errata-xmlrpc 2011-05-19 11:29:07 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2011-0534.html

Comment 19 errata-xmlrpc 2011-05-19 12:46:44 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2011-0534.html


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